1 | # $Id: Makefile.kmk$
|
---|
2 | ## @file
|
---|
3 | # Adds sources list and defines required to LWIP pre-1.5.0 compilation
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2006-2012 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 |
|
---|
18 | #
|
---|
19 | # Recommended kmk flags:
|
---|
20 | #
|
---|
21 | # VBOX_WITH_NAT_SERVICE=1
|
---|
22 | # VBOX_WITH_LWIP_NAT=1
|
---|
23 | #
|
---|
24 |
|
---|
25 | LWIP_INCS += \
|
---|
26 | src/include \
|
---|
27 | src/include/ipv4 \
|
---|
28 | src/include/ipv6 \
|
---|
29 | vbox/include \
|
---|
30 | vbox
|
---|
31 |
|
---|
32 | LWIP_SOURCES += \
|
---|
33 | src/api/api_lib.c \
|
---|
34 | src/api/api_msg.c \
|
---|
35 | src/api/err.c \
|
---|
36 | src/api/netbuf.c \
|
---|
37 | src/api/netdb.c \
|
---|
38 | src/api/netifapi.c \
|
---|
39 | src/api/sockets.c \
|
---|
40 | src/api/tcpip.c \
|
---|
41 | src/core/def.c \
|
---|
42 | src/core/dhcp.c \
|
---|
43 | src/core/dns.c \
|
---|
44 | src/core/inet_chksum.c \
|
---|
45 | src/core/init.c \
|
---|
46 | src/core/ipv4/autoip.c \
|
---|
47 | src/core/ipv4/icmp.c \
|
---|
48 | src/core/ipv4/igmp.c \
|
---|
49 | src/core/ipv4/ip4.c \
|
---|
50 | src/core/ipv4/ip4_addr.c \
|
---|
51 | src/core/ipv4/ip_frag.c \
|
---|
52 | src/core/ipv6/dhcp6.c \
|
---|
53 | src/core/ipv6/ethip6.c \
|
---|
54 | src/core/ipv6/icmp6.c \
|
---|
55 | src/core/ipv6/inet6.c \
|
---|
56 | src/core/ipv6/ip6.c \
|
---|
57 | src/core/ipv6/ip6_addr.c \
|
---|
58 | src/core/ipv6/ip6_frag.c \
|
---|
59 | src/core/ipv6/mld6.c \
|
---|
60 | src/core/ipv6/nd6.c \
|
---|
61 | src/core/mem.c \
|
---|
62 | src/core/memp.c \
|
---|
63 | src/core/netif.c \
|
---|
64 | src/core/pbuf.c \
|
---|
65 | src/core/raw.c \
|
---|
66 | src/core/stats.c \
|
---|
67 | src/core/sys.c \
|
---|
68 | src/core/tcp.c \
|
---|
69 | src/core/tcp_in.c \
|
---|
70 | src/core/tcp_out.c \
|
---|
71 | src/core/timers.c \
|
---|
72 | src/core/udp.c \
|
---|
73 | src/netif/etharp.c \
|
---|
74 | vbox/sys_arch.c \
|
---|
75 | vbox/VBoxLwipCore.cpp
|
---|
76 |
|
---|
77 | # LWIP_SOURCES += \
|
---|
78 | # src/core/snmp/asn1_dec.c \
|
---|
79 | # src/core/snmp/asn1_enc.c \
|
---|
80 | # src/core/snmp/mib2.c \
|
---|
81 | # src/core/snmp/mib_structs.c \
|
---|
82 | # src/core/snmp/msg_in.c \
|
---|
83 | # src/core/snmp/msg_out.c \
|
---|
84 |
|
---|
85 | # LWIP_SOURCES += \
|
---|
86 | # src/netif/slipif.c \
|
---|
87 |
|
---|
88 | # LWIP_SOURCES += \
|
---|
89 | # src/netif/ppp/auth.c \
|
---|
90 | # src/netif/ppp/chap.c \
|
---|
91 | # src/netif/ppp/chpms.c \
|
---|
92 | # src/netif/ppp/fsm.c \
|
---|
93 | # src/netif/ppp/ipcp.c \
|
---|
94 | # src/netif/ppp/lcp.c \
|
---|
95 | # src/netif/ppp/magic.c \
|
---|
96 | # src/netif/ppp/md5.c \
|
---|
97 | # src/netif/ppp/pap.c \
|
---|
98 | # src/netif/ppp/ppp.c \
|
---|
99 | # src/netif/ppp/ppp_oe.c \
|
---|
100 | # src/netif/ppp/randm.c \
|
---|
101 | # src/netif/ppp/vj.c
|
---|
102 |
|
---|
103 |
|
---|
104 | define def_vbox_lwip_flags # VAR_BaseName, path/to/lwip/dir
|
---|
105 | $(strip $1)_INCS += $(foreach incdir, $(LWIP_INCS), $(strip $2)/$(incdir))
|
---|
106 | endef
|
---|
107 |
|
---|
108 | define _def_vbox_lwip_use # VAR_BaseName, path/to/lwip/dir
|
---|
109 | $(strip $1)_SOURCES += \
|
---|
110 | $(foreach file, $(LWIP_SOURCES), $(strip $2)/$(file))
|
---|
111 |
|
---|
112 | # if individual lwip files need special settings, add them here:
|
---|
113 | # $(strip $2)/src/foo/bar.c_CFLAGS += -magic
|
---|
114 | endef
|
---|
115 |
|
---|
116 | ###
|
---|
117 | ### Call this if you want to expose lwip to your component as a whole.
|
---|
118 | ### In this case individual lwip files (added to _SOURCES of your
|
---|
119 | ### component) will pick up lwip includes etc from your component
|
---|
120 | ### settings.
|
---|
121 | ###
|
---|
122 | ### This is, for example, how NetworkServices/NAT uses it.
|
---|
123 | ###
|
---|
124 | define def_vbox_lwip_public # VAR_BaseName, path/to/lwip/dir
|
---|
125 | $(eval $(call _def_vbox_lwip_use, $1, $2))
|
---|
126 | $(eval $(call def_vbox_lwip_flags, $1, $2))
|
---|
127 | endef
|
---|
128 |
|
---|
129 | ###
|
---|
130 | ### Call this if you want to expose lwip only to a few selected files.
|
---|
131 | ### In this case each lwip file is configured with lwip includes etc
|
---|
132 | ### separately and you are supposed to call def_vbox_lwip_flags
|
---|
133 | ### yourself for those of your files that use lwip.
|
---|
134 | ###
|
---|
135 | ### This is, for example, how Devices uses it.
|
---|
136 | ###
|
---|
137 | define def_vbox_lwip_private # VAR_BaseName, path/to/lwip/dir
|
---|
138 | $(eval $(call _def_vbox_lwip_use, $1, $2))
|
---|
139 | $(foreach file, $(LWIP_SOURCES), \
|
---|
140 | $(eval $(call def_vbox_lwip_flags, $(strip $2)/$(file), $2)))
|
---|
141 | endef
|
---|
142 |
|
---|
143 |
|
---|
144 | ifeq ($(USERNAME), vvl)
|
---|
145 | $(foreach lwip_file, $(LWIP_SOURCES), $(eval $(lwip_file)_DEFS=RTMEM_WRAP_TO_EF_APIS))
|
---|
146 |
|
---|
147 | LWIPTEST_SOURCES= Network/lwip-new/test/unit/core/test_mem.c \
|
---|
148 | Network/lwip-new/test/unit/etharp/test_etharp.c \
|
---|
149 | Network/lwip-new/test/unit/lwip_unittests.c \
|
---|
150 | Network/lwip-new/test/unit/tcp/tcp_helper.c \
|
---|
151 | Network/lwip-new/test/unit/tcp/test_tcp.c \
|
---|
152 | Network/lwip-new/test/unit/tcp/test_tcp_oos.c \
|
---|
153 | Network/lwip-new/test/unit/udp/test_udp.c
|
---|
154 | endif
|
---|