VirtualBox

source: vbox/trunk/src/VBox/Devices/Network/lwip-new/Makefile.kmk@ 60756

Last change on this file since 60756 was 56292, checked in by vboxsync, 10 years ago

Devices: Updated (C) year.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.7 KB
Line 
1# $Id: Makefile.kmk 56292 2015-06-09 14:20:46Z vboxsync $
2## @file
3# Adds sources list and defines required to LWIP pre-1.5.0 compilation
4#
5
6#
7# Copyright (C) 2006-2015 Oracle Corporation
8#
9# This file is part of VirtualBox Open Source Edition (OSE), as
10# available from http://www.virtualbox.org. This file is free software;
11# you can redistribute it and/or modify it under the terms of the GNU
12# General Public License (GPL) as published by the Free Software
13# Foundation, in version 2 as it comes in the "COPYING" file of the
14# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16#
17
18LWIP_INCS += \
19 src/include \
20 src/include/ipv4 \
21 src/include/ipv6 \
22 vbox/include \
23 vbox
24
25LWIP_SOURCES += \
26 src/api/api_lib.c \
27 src/api/api_msg.c \
28 src/api/err.c \
29 src/api/netbuf.c \
30 src/api/netdb.c \
31 src/api/netifapi.c \
32 src/api/sockets.c \
33 src/api/tcpip.c \
34 src/core/def.c \
35 src/core/dhcp.c \
36 src/core/dns.c \
37 src/core/inet_chksum.c \
38 src/core/init.c \
39 src/core/ipv4/autoip.c \
40 src/core/ipv4/icmp.c \
41 src/core/ipv4/igmp.c \
42 src/core/ipv4/ip4.c \
43 src/core/ipv4/ip4_addr.c \
44 src/core/ipv4/ip_frag.c \
45 src/core/ipv6/dhcp6.c \
46 src/core/ipv6/ethip6.c \
47 src/core/ipv6/icmp6.c \
48 src/core/ipv6/inet6.c \
49 src/core/ipv6/ip6.c \
50 src/core/ipv6/ip6_addr.c \
51 src/core/ipv6/ip6_frag.c \
52 src/core/ipv6/mld6.c \
53 src/core/ipv6/nd6.c \
54 src/core/mem.c \
55 src/core/memp.c \
56 src/core/netif.c \
57 src/core/pbuf.c \
58 src/core/raw.c \
59 src/core/stats.c \
60 src/core/sys.c \
61 src/core/tcp.c \
62 src/core/tcp_in.c \
63 src/core/tcp_out.c \
64 src/core/timers.c \
65 src/core/udp.c \
66 src/netif/etharp.c \
67 vbox/sys_arch.c \
68 vbox/VBoxLwipCore.cpp
69
70# LWIP_SOURCES += \
71# src/core/snmp/asn1_dec.c \
72# src/core/snmp/asn1_enc.c \
73# src/core/snmp/mib2.c \
74# src/core/snmp/mib_structs.c \
75# src/core/snmp/msg_in.c \
76# src/core/snmp/msg_out.c \
77
78# LWIP_SOURCES += \
79# src/netif/slipif.c \
80
81# LWIP_SOURCES += \
82# src/netif/ppp/auth.c \
83# src/netif/ppp/chap.c \
84# src/netif/ppp/chpms.c \
85# src/netif/ppp/fsm.c \
86# src/netif/ppp/ipcp.c \
87# src/netif/ppp/lcp.c \
88# src/netif/ppp/magic.c \
89# src/netif/ppp/md5.c \
90# src/netif/ppp/pap.c \
91# src/netif/ppp/ppp.c \
92# src/netif/ppp/ppp_oe.c \
93# src/netif/ppp/randm.c \
94# src/netif/ppp/vj.c
95
96
97
98define _def_vbox_lwip_use # VAR_BaseName, path/to/lwip/dir
99 $(strip $1)_SOURCES += \
100 $(foreach file, $(LWIP_SOURCES), $(strip $2)/$(file))
101
102 # if individual lwip files need special settings, add them here:
103 # $(strip $2)/src/foo/bar.c_CFLAGS += -magic
104endef
105
106
107define def_vbox_lwip_flags # PROTO_BaseName, VAR_BaseName, path/to/lwip/dir
108 # add anything configured for the component via PROTO_BaseName
109 $(foreach suffix, INCS DEFS,
110 $(if $(value $(strip $1)_LWIP_$(suffix)),
111 $(eval #
112 $(strip $2)_$(suffix) += $(value $(strip $1)_LWIP_$(suffix))
113 )))
114
115 # add lwip's own includes
116 $(strip $2)_INCS += $(foreach incdir, $(LWIP_INCS), $(strip $3)/$(incdir))
117
118 # disable lwip assertions for some build types
119 $(strip $2)_DEFS.release += LWIP_NOASSERT
120 $(strip $2)_DEFS.profile += LWIP_NOASSERT
121 $(strip $2)_DEFS.kprofile += LWIP_NOASSERT
122endef
123
124
125###
126### Call this if you want to expose lwip to your component as a whole.
127### In this case individual lwip files (added to _SOURCES of your
128### component) will pick up lwip includes etc from your component
129### settings.
130###
131### This is, for example, how NetworkServices/NAT uses it.
132###
133define def_vbox_lwip_public # VAR_BaseName, path/to/lwip/dir
134 $(eval $(call _def_vbox_lwip_use, $1, $2))
135 $(eval $(call def_vbox_lwip_flags, $1, $1, $2))
136endef
137
138
139###
140### Call this if you want to expose lwip only to a few selected files.
141### In this case each lwip file is configured with lwip includes etc
142### separately and you are supposed to call def_vbox_lwip_flags
143### yourself for those of your files that use lwip.
144###
145### This is, for example, how Devices uses it.
146###
147define def_vbox_lwip_private # VAR_BaseName, path/to/lwip/dir
148 $(eval $(call _def_vbox_lwip_use, $1, $2))
149 $(foreach file, $(LWIP_SOURCES), \
150 $(eval $(call def_vbox_lwip_flags, $1, $(strip $2)/$(file), $2)))
151endef
152
153
154ifeq ($(USERNAME), vvl)
155$(foreach lwip_file, $(LWIP_SOURCES), $(eval $(lwip_file)_DEFS=RTMEM_WRAP_TO_EF_APIS))
156
157LWIPTEST_SOURCES= Network/lwip-new/test/unit/core/test_mem.c \
158 Network/lwip-new/test/unit/etharp/test_etharp.c \
159 Network/lwip-new/test/unit/lwip_unittests.c \
160 Network/lwip-new/test/unit/tcp/tcp_helper.c \
161 Network/lwip-new/test/unit/tcp/test_tcp.c \
162 Network/lwip-new/test/unit/tcp/test_tcp_oos.c \
163 Network/lwip-new/test/unit/udp/test_udp.c
164endif
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette