1 | # $Id: Makefile.kmk 45672 2013-04-23 03:06:28Z 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 | # Disable Slirp based service.
|
---|
21 | #ifdef VBOX_WITH_HARDENING
|
---|
22 | # PROGRAMS += VBoxNetNATHardened
|
---|
23 | # DLLS += VBoxNetNAT
|
---|
24 | #else
|
---|
25 | # PROGRAMS += VBoxNetNAT
|
---|
26 | #endif
|
---|
27 | VBoxNetNAT_TEMPLATE =
|
---|
28 | VBoxNetNAT_TEMPLATE := VBOXR3$(if-expr defined(VBOX_WITH_HARDENING),,EXE)
|
---|
29 | VBoxNetNAT_INCS = ../../Devices/Network/slirp
|
---|
30 | VBoxNetNAT_DEFS = VBOX_WITH_NAT_SERVICE
|
---|
31 | VBoxNetNAT_SOURCES += VBoxNetNAT.cpp
|
---|
32 | VBoxNetNAT_DEFS += VBOX_WITH_NAT_SERVICE
|
---|
33 |
|
---|
34 | #define def_vbox_slirp_service_cflags
|
---|
35 | # $(file)_DEFS += VBOX_WITH_NAT_SERVICE
|
---|
36 | #endef
|
---|
37 |
|
---|
38 | define def_vbox_nat_network_service_sources
|
---|
39 | $(1)_SOURCES += $2/$3
|
---|
40 | endef
|
---|
41 |
|
---|
42 | define def_vbox_nat_network_service_incs
|
---|
43 | $(1)_INCS += $2/$3
|
---|
44 | endef
|
---|
45 |
|
---|
46 | VBOX_NOT_IN_NATSERVICE = Network/DrvNAT.cpp
|
---|
47 | $(foreach file,$(filter-out $(VBOX_NOT_IN_NATSERVICE), $(VBOX_SLIRP_SOURCES)),$(eval $(call def_vbox_nat_network_service_sources,VBoxNetNAT,../../Devices,$(file))))
|
---|
48 | $(foreach file,$(VBOX_SLIRP_ALIAS_SOURCES),$(eval $(call def_vbox_nat_network_service_sources, VBoxNetNAT,../../Devices,$(file))))
|
---|
49 | $(foreach file,$(VBOX_SLIRP_BSD_SOURCES),$(eval $(call def_vbox_nat_network_service_sources, VBoxNetNAT,../../Devices,$(file))))
|
---|
50 |
|
---|
51 | $(foreach file,$(addprefix ../../Devices/, $(VBOX_SLIRP_BSD_SOURCES)),$(eval $(call def_vbox_slirp_cflags,../../Devices/Network)))
|
---|
52 | $(foreach file,$(addprefix ../../Devices/, $(VBOX_SLIRP_BSD_SOURCES)),$(eval $(call def_vbox_slirp_bsd_cflags,../../Devices/Network)))
|
---|
53 | $(foreach file,$(addprefix ../../Devices/, $(filter-out $(VBOX_WITH_NAT_SERVICE), $(VBOX_SLIRP_SOURCES))),$(eval $(call def_vbox_slirp_service_cflags, ../../Devices/Network)))
|
---|
54 | $(foreach file,$(addprefix ../../Devices/, $(filter-out $(VBOX_WITH_NAT_SERVICE), $(VBOX_SLIRP_SOURCES))),$(eval $(call def_vbox_slirp_cflags,../../Devices/Network)))
|
---|
55 |
|
---|
56 | $(foreach file,$(addprefix ../../Devices/, $(VBOX_SLIRP_ALIAS_SOURCES)),$(eval $(call def_vbox_slirp_cflags, ../../Devices/Network)))
|
---|
57 |
|
---|
58 |
|
---|
59 | $(foreach file,$(addprefix ../../Devices/, $(VBOX_SLIRP_ALIAS_SOURCES)),$(eval $(call def_vbox_slirp_alias_cflags, ../../Devices/Network)))
|
---|
60 |
|
---|
61 | VBoxNetNAT_SOURCES += ../NetLib/VBoxNetBaseService.cpp
|
---|
62 |
|
---|
63 | VBoxNetNAT_LIBS = \
|
---|
64 | $(LIB_RUNTIME)
|
---|
65 | VBoxNetNAT_LDFLAGS.win = /SUBSYSTEM:windows
|
---|
66 |
|
---|
67 | ifdef VBOX_WITH_LWIP_NAT
|
---|
68 |
|
---|
69 | PROGRAMS += VBoxNetLwipNAT
|
---|
70 | VBoxNetLwipNAT_TEMPLATE =
|
---|
71 | VBoxNetLwipNAT_TEMPLATE := VBOXMAINCLIENTEXE
|
---|
72 | VBoxNetLwipNAT_INCS += ../../Devices/Network \
|
---|
73 | ../../Devices/Network/lwip-new/vbox # testproxy.h
|
---|
74 | VBoxNetLwipNAT_DEFS += ${LWIP_DEFS}
|
---|
75 | VBoxNetLwipNAT_SOURCES += VBoxNetLwipNAT.cpp \
|
---|
76 | ../NetLib/VBoxNetBaseService.cpp \
|
---|
77 | ../NetLib/VBoxNetPortForwardString.cpp \
|
---|
78 | ../../Devices/Network/VBoxLwipCore.cpp
|
---|
79 | VBoxNetLwipNAT_LIBS = \
|
---|
80 | $(LIB_RUNTIME)
|
---|
81 | VBoxNetLwipNAT_LDFLAGS.win = /SUBSYSTEM:windows
|
---|
82 |
|
---|
83 | #
|
---|
84 | # Note: not spaces please in "Devices,$("
|
---|
85 | #
|
---|
86 | $(foreach file,$(LWIP_SOURCES),$(eval $(call def_vbox_nat_network_service_sources, VBoxNetLwipNAT, ../../Devices,$(file))))
|
---|
87 |
|
---|
88 | $(foreach incs,$(LWIP_INCS),$(eval $(call def_vbox_nat_network_service_incs, VBoxNetLwipNAT, ../../Devices,$(incs))))
|
---|
89 |
|
---|
90 | endif
|
---|
91 |
|
---|
92 | ifdef VBOX_WITH_TESTCASES
|
---|
93 | PROGRAMS += tstNetPfAddressPortPairParse
|
---|
94 |
|
---|
95 | tstNetPfAddressPortPairParse_TEMPLATE = VBOXR3TSTEXE
|
---|
96 | #tstNetPfAddressPortPairParse_INSTTYPE = none
|
---|
97 | tstNetPfAddressPortPairParse_SOURCES = ../NetLib/testcase/tstNetPfAddressPortPairParse.cpp \
|
---|
98 | ../NetLib/VBoxNetPortForwardString.cpp
|
---|
99 | endif
|
---|
100 |
|
---|
101 | include $(FILE_KBUILD_SUB_FOOTER)
|
---|