1 | # $Id: Makefile.kmk 50065 2014-01-14 01:42:41Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | #
|
---|
4 |
|
---|
5 | #
|
---|
6 | # Copyright (C) 2006-2012 Oracle Corporation
|
---|
7 | #
|
---|
8 | # This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
9 | # available from http://www.virtualbox.org. This file is free software;
|
---|
10 | # you can redistribute it and/or modify it under the terms of the GNU
|
---|
11 | # General Public License (GPL) as published by the Free Software
|
---|
12 | # Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
13 | # VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
14 | # hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
15 | #
|
---|
16 |
|
---|
17 | SUB_DEPTH = ../../../..
|
---|
18 | include $(KBUILD_PATH)/subheader.kmk
|
---|
19 |
|
---|
20 | ifdef VBOX_WITH_LWIP_NAT
|
---|
21 | # XXX: do not depend on order
|
---|
22 | ifndef LWIP_SOURCES
|
---|
23 | include ../../Devices/Network/lwip-new/Makefile.kmk
|
---|
24 | endif
|
---|
25 |
|
---|
26 | ifdef VBOX_WITH_HARDENING
|
---|
27 | PROGRAMS += VBoxNetLwipNATHardened
|
---|
28 | DLLS += VBoxNetLwipNAT
|
---|
29 | else
|
---|
30 | PROGRAMS += VBoxNetLwipNAT
|
---|
31 | endif
|
---|
32 |
|
---|
33 | ifdef VBOX_WITH_HARDENING
|
---|
34 | VBoxNetLwipNATHardened_SOURCES += VBoxNetNATHardened.cpp
|
---|
35 | VBoxNetLwipNATHardened_DEFS += SERVICE_NAME=\"VBoxNetNAT\"
|
---|
36 | VBoxNetLwipNATHardened_TEMPLATE=VBOXR3HARDENEDEXE
|
---|
37 | VBoxNetLwipNATHardened_NAME = VBoxNetNAT
|
---|
38 | endif
|
---|
39 |
|
---|
40 | VBoxNetLwipNAT_TEMPLATE =
|
---|
41 | VBoxNetLwipNAT_TEMPLATE := VBOXMAIN$(if-expr defined(VBOX_WITH_HARDENING),DLL,CLIENTEXE)
|
---|
42 | VBoxNetLwipNAT_NAME = VBoxNetNAT
|
---|
43 | VBoxNetLwipNAT_DEFS += ${LWIP_DEFS} IPv6
|
---|
44 | VBoxNetLwipNAT_DEFS.win += VBOX_COM_OUTOFPROC_MODULE _WIN32_WINNT=0x501 # Windows XP
|
---|
45 | VBoxNetLwipNAT_SOURCES += VBoxNetLwipNAT.cpp \
|
---|
46 | ../NetLib/VBoxNetBaseService.cpp \
|
---|
47 | ../NetLib/VBoxNetPortForwardString.cpp \
|
---|
48 | ../NetLib/VBoxNetIntIf.cpp \
|
---|
49 | ../NetLib/VBoxNetUDP.cpp \
|
---|
50 | ../NetLib/VBoxNetARP.cpp \
|
---|
51 | ../NetLib/ComHostUtils.cpp
|
---|
52 |
|
---|
53 | VBoxNetLwipNAT_LIBS = \
|
---|
54 | $(LIB_RUNTIME)
|
---|
55 | VBoxNetLwipNAT_LIBS.solaris += socket nsl
|
---|
56 | VBoxNetLwipNAT_LDFLAGS.win = /SUBSYSTEM:windows
|
---|
57 |
|
---|
58 | # Convince Solaris headers to expose socket stuff we need. 600 would
|
---|
59 | # also work, but <sys/feature_tests.h> insists on C99 for it and so
|
---|
60 | # explodes for C++. Note that for 500 it insists on NOT using C99, so
|
---|
61 | # when some day we decide to use -std=c99 we are in for some fun.
|
---|
62 | VBoxNetLwipNAT_DEFS.solaris += _XOPEN_SOURCE=500 __EXTENSIONS__=1
|
---|
63 |
|
---|
64 | VBoxNetLwipNAT_SOURCES += \
|
---|
65 | proxy_pollmgr.c \
|
---|
66 | proxy_rtadvd.c \
|
---|
67 | proxy.c \
|
---|
68 | pxremap.c \
|
---|
69 | pxtcp.c \
|
---|
70 | pxudp.c \
|
---|
71 | pxdns.c \
|
---|
72 | fwtcp.c \
|
---|
73 | fwudp.c \
|
---|
74 | portfwd.c \
|
---|
75 | proxy_dhcp6ds.c \
|
---|
76 | proxy_tftpd.c
|
---|
77 |
|
---|
78 | ifeq ($(KBUILD_TARGET),win)
|
---|
79 | # unprivileged Icmp API
|
---|
80 | VBoxNetLwipNAT_SOURCES += pxping_win.c
|
---|
81 | else
|
---|
82 | # raw sockets
|
---|
83 | VBoxNetLwipNAT_SOURCES += pxping.c
|
---|
84 | endif
|
---|
85 |
|
---|
86 | # ifeq ($(VBOX_WITH_HARDENING),)
|
---|
87 | # ifn1of ($(KBUILD_TARGET), darwin win)
|
---|
88 | # # helper for debugging unprivileged
|
---|
89 | # VBoxNetLwipNAT_SOURCES += getrawsock.c
|
---|
90 | # endif
|
---|
91 | # endif
|
---|
92 |
|
---|
93 | VBoxNetLwipNAT_SOURCES.darwin += rtmon_bsd.c
|
---|
94 | VBoxNetLwipNAT_SOURCES.freebsd += rtmon_bsd.c
|
---|
95 | VBoxNetLwipNAT_SOURCES.linux += rtmon_linux.c
|
---|
96 | VBoxNetLwipNAT_SOURCES.solaris += rtmon_bsd.c
|
---|
97 | VBoxNetLwipNAT_SOURCES.win += rtmon_win.c
|
---|
98 |
|
---|
99 | VBoxNetLwipNAT_SOURCES.win += \
|
---|
100 | RTWinPoll.cpp \
|
---|
101 | RTWinSocketPair.cpp
|
---|
102 |
|
---|
103 | $(eval $(call def_vbox_lwip_public, \
|
---|
104 | VBoxNetLwipNAT, ../../Devices/Network/lwip-new))
|
---|
105 | endif
|
---|
106 |
|
---|
107 | include $(FILE_KBUILD_SUB_FOOTER)
|
---|