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 | LWIP_INCS += \
|
---|
19 | src/include \
|
---|
20 | src/include/ipv4 \
|
---|
21 | src/include/ipv6 \
|
---|
22 | vbox/include \
|
---|
23 | vbox
|
---|
24 |
|
---|
25 | LWIP_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 | define _def_vbox_lwip_use # VAR_BaseName, path/to/lwip/dir
|
---|
98 | $(strip $1)_SOURCES += \
|
---|
99 | $(foreach file, $(LWIP_SOURCES), $(strip $2)/$(file))
|
---|
100 |
|
---|
101 | # if individual lwip files need special settings, add them here:
|
---|
102 | # $(strip $2)/src/foo/bar.c_CFLAGS += -magic
|
---|
103 | endef
|
---|
104 |
|
---|
105 | define def_vbox_lwip_flags # VAR_BaseName, path/to/lwip/dir
|
---|
106 | $(strip $1)_INCS += $(foreach incdir, $(LWIP_INCS), $(strip $2)/$(incdir))
|
---|
107 | endef
|
---|
108 |
|
---|
109 | ###
|
---|
110 | ### Call this if you want to expose lwip to your component as a whole.
|
---|
111 | ### In this case individual lwip files (added to _SOURCES of your
|
---|
112 | ### component) will pick up lwip includes etc from your component
|
---|
113 | ### settings.
|
---|
114 | ###
|
---|
115 | ### This is, for example, how NetworkServices/NAT uses it.
|
---|
116 | ###
|
---|
117 | define def_vbox_lwip_public # VAR_BaseName, path/to/lwip/dir
|
---|
118 | $(eval $(call _def_vbox_lwip_use, $1, $2))
|
---|
119 | $(eval $(call def_vbox_lwip_flags, $1, $2))
|
---|
120 | endef
|
---|
121 |
|
---|
122 | ###
|
---|
123 | ### Call this if you want to expose lwip only to a few selected files.
|
---|
124 | ### In this case each lwip file is configured with lwip includes etc
|
---|
125 | ### separately and you are supposed to call def_vbox_lwip_flags
|
---|
126 | ### yourself for those of your files that use lwip.
|
---|
127 | ###
|
---|
128 | ### This is, for example, how Devices uses it.
|
---|
129 | ###
|
---|
130 | define def_vbox_lwip_private # VAR_BaseName, path/to/lwip/dir
|
---|
131 | $(eval $(call _def_vbox_lwip_use, $1, $2))
|
---|
132 | $(foreach file, $(LWIP_SOURCES), \
|
---|
133 | $(eval $(call def_vbox_lwip_flags, $(strip $2)/$(file), $2)))
|
---|
134 | endef
|
---|
135 |
|
---|
136 |
|
---|
137 | ifeq ($(USERNAME), vvl)
|
---|
138 | $(foreach lwip_file, $(LWIP_SOURCES), $(eval $(lwip_file)_DEFS=RTMEM_WRAP_TO_EF_APIS))
|
---|
139 |
|
---|
140 | LWIPTEST_SOURCES= Network/lwip-new/test/unit/core/test_mem.c \
|
---|
141 | Network/lwip-new/test/unit/etharp/test_etharp.c \
|
---|
142 | Network/lwip-new/test/unit/lwip_unittests.c \
|
---|
143 | Network/lwip-new/test/unit/tcp/tcp_helper.c \
|
---|
144 | Network/lwip-new/test/unit/tcp/test_tcp.c \
|
---|
145 | Network/lwip-new/test/unit/tcp/test_tcp_oos.c \
|
---|
146 | Network/lwip-new/test/unit/udp/test_udp.c
|
---|
147 | endif
|
---|