summaryrefslogtreecommitdiff
path: root/rtems/config/rtems-bsp-net.cfg
blob: dde6d36e2917891ce5e3d15f99995480a3040fec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#
# RTEMS BSP Network Support
#

#
# Check if the BSP libpath has been defined?
#
%if !%{defined rtems_bsp_libpath}
 %error No BSP library path found
%endif

#
# BSP library check
#
%define rtems_bsp_check_lib %{_sbdir}/sb/rtems-build-dep -c %{rtems_bsp_cc} -L %{rtems_bsp_libpath}

#
# Check for the various networking libraries?
#
%define rtems_bsp_net_libbsd %(%{rtems_bsp_check_lib} -l bsd)
%define rtems_bsp_net_legacy %(%{rtems_bsp_check_lib} -l networking)
%define rtems_bsp_net_lwip   %(%{rtems_bsp_check_lib} -l lwip)

%if %{rtems_bsp_net_libbsd} == not-found && \
    %{rtems_bsp_net_legacy} == not-found && \
    %{rtems_bsp_net_lwip} == not-found
 %error No networking libraries found
%endif

%if %{rtems_bsp_net_libbsd} == found
 %define rtems_bsp_net_libs -lbsd
%else
 %if %{rtems_bsp_net_legacy} == found
  %define rtems_bsp_net_libs -lnetworking
 %else
  %if %{rtems_bsp_net_lwip} == found
   %define rtems_bsp_net_libs -llwip
  %endif
 %endif
%endif

#
# Update the libraries
#
%define rtems_bsp_libs %{rtems_bsp_libs} %{rtems_bsp_net_libs}
%define host_libs      %{rtems_bsp_libs}