1 | # $Id: Makefile.kmk 98417 2023-02-01 16:25:48Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Sub-makefile for the DHCP server.
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2006-2023 Oracle and/or its affiliates.
|
---|
8 | #
|
---|
9 | # This file is part of VirtualBox base platform packages, as
|
---|
10 | # available from https://www.virtualbox.org.
|
---|
11 | #
|
---|
12 | # This program is free software; you can redistribute it and/or
|
---|
13 | # modify it under the terms of the GNU General Public License
|
---|
14 | # as published by the Free Software Foundation, in version 3 of the
|
---|
15 | # License.
|
---|
16 | #
|
---|
17 | # This program is distributed in the hope that it will be useful, but
|
---|
18 | # WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
20 | # General Public License for more details.
|
---|
21 | #
|
---|
22 | # You should have received a copy of the GNU General Public License
|
---|
23 | # along with this program; if not, see <https://www.gnu.org/licenses>.
|
---|
24 | #
|
---|
25 | # SPDX-License-Identifier: GPL-3.0-only
|
---|
26 | #
|
---|
27 |
|
---|
28 | SUB_DEPTH := ../../../..
|
---|
29 | include $(KBUILD_PATH)/subheader.kmk
|
---|
30 |
|
---|
31 | ifndef LWIP_SOURCES
|
---|
32 | include $(PATH_SUB_CURRENT)/../../Devices/Network/lwip-new/Config.kmk
|
---|
33 | endif
|
---|
34 |
|
---|
35 | #
|
---|
36 | # Hardended stub executable.
|
---|
37 | #
|
---|
38 | ifdef VBOX_WITH_HARDENING
|
---|
39 | PROGRAMS += VBoxNetDHCPHardened
|
---|
40 | VBoxNetDHCPHardened_TEMPLATE = VBoxR3HardenedExe
|
---|
41 | VBoxNetDHCPHardened_NAME = VBoxNetDHCP
|
---|
42 | VBoxNetDHCPHardened_SOURCES = VBoxNetDhcpdHardened.cpp
|
---|
43 | VBoxNetDHCPHardened_LDFLAGS.win = /SUBSYSTEM:windows
|
---|
44 | $(call VBOX_SET_VER_INFO_DLL,VBoxNetDHCPHardened,VirtualBox DHCP Server,$(VBOX_WINDOWS_ICON_FILE)) # Version info / description.
|
---|
45 | endif
|
---|
46 |
|
---|
47 |
|
---|
48 | #
|
---|
49 | # The DHCP server module (dll if hardended)
|
---|
50 | #
|
---|
51 | ifdef VBOX_WITH_HARDENING
|
---|
52 | DLLS += VBoxNetDHCP
|
---|
53 | VBoxNetDHCP_TEMPLATE := VBoxR3Dll
|
---|
54 | else
|
---|
55 | PROGRAMS += VBoxNetDHCP
|
---|
56 | VBoxNetDHCP_TEMPLATE := VBoxR3Exe
|
---|
57 | endif
|
---|
58 |
|
---|
59 | # (current dir is for for lwipopts.h)
|
---|
60 | VBoxNetDHCP_INCS += . $(addprefix ../../Devices/Network/lwip-new/,$(LWIP_INCS))
|
---|
61 |
|
---|
62 | ifdef VBOX_WITH_AUTOMATIC_DEFS_QUOTING
|
---|
63 | VBoxNetDHCP_DEFS = KBUILD_TYPE="$(KBUILD_TYPE)"
|
---|
64 | else
|
---|
65 | VBoxNetDHCP_DEFS = KBUILD_TYPE=\"$(KBUILD_TYPE)\"
|
---|
66 | endif
|
---|
67 | VBoxNetDHCP_DEFS += \
|
---|
68 | $(if $(VBOX_WITH_INTNET_SERVICE_IN_R3),VBOX_WITH_INTNET_SERVICE_IN_R3,)
|
---|
69 |
|
---|
70 | #VBoxNetDHCP_DEFS += IPv6
|
---|
71 | #VBoxNetDHCP_DEFS.linux = WITH_VALGRIND
|
---|
72 | ifneq ($(KBUILD_TARGET),win)
|
---|
73 | VBoxNetDHCP_DEFS += VBOX_WITH_XPCOM
|
---|
74 | VBoxNetDHCP_INCS += $(VBOX_XPCOM_INCS)
|
---|
75 | ifneq ($(KBUILD_TARGET),darwin)
|
---|
76 | # We want -std=c++11 for 4.7 and newer compilers, and -std=c++0x for older ones.
|
---|
77 | VBoxNetDHCP_CXXFLAGS += -std=$(if $(VBOX_GCC_VERSION_CXX),$(if $(VBOX_GCC_VERSION_CXX) < 40700,c++0x,c++11),c++0x)
|
---|
78 | endif
|
---|
79 | endif
|
---|
80 | VBoxNetDHCP_INCS += \
|
---|
81 | ../NetLib
|
---|
82 | VBoxNetDHCP_SOURCES = \
|
---|
83 | ClientId.cpp \
|
---|
84 | Config.cpp \
|
---|
85 | DHCPD.cpp \
|
---|
86 | Db.cpp \
|
---|
87 | DhcpMessage.cpp \
|
---|
88 | DhcpOptions.cpp \
|
---|
89 | IPv4Pool.cpp \
|
---|
90 | Timestamp.cpp \
|
---|
91 | VBoxNetDhcpd.cpp \
|
---|
92 | ../NetLib/IntNetIf.cpp \
|
---|
93 | ../../Main/glue/VBoxLogRelCreate.cpp \
|
---|
94 | ../../Main/glue/GetVBoxUserHomeDirectory.cpp \
|
---|
95 | $(addprefix ../../Devices/Network/lwip-new/,$(LWIP_SOURCES))
|
---|
96 |
|
---|
97 | VBoxNetDHCP_LIBS = $(LIB_RUNTIME)
|
---|
98 | VBoxNetDHCP_LIBS.solaris += socket nsl
|
---|
99 | VBoxNetDHCP_LDFLAGS.win = /SUBSYSTEM:windows
|
---|
100 |
|
---|
101 | ifdef VBOX_WITH_HARDENING
|
---|
102 | $(call VBOX_SET_VER_INFO_DLL,VBoxNetDHCP,VirtualBox DHCP Server (dll),$(VBOX_WINDOWS_ICON_FILE)) # Version info / description.
|
---|
103 | else
|
---|
104 | $(call VBOX_SET_VER_INFO_EXE,VBoxNetDHCP,VirtualBox DHCP Server,$(VBOX_WINDOWS_ICON_FILE)) # Version info / description.
|
---|
105 | endif
|
---|
106 |
|
---|
107 | include $(FILE_KBUILD_SUB_FOOTER)
|
---|
108 |
|
---|