1 | # $Id: Makefile.kmk 83779 2020-04-17 22:19:15Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Sub-makefile for the DHCP server.
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2006-2020 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 | SUB_DEPTH := ../../../..
|
---|
19 | include $(KBUILD_PATH)/subheader.kmk
|
---|
20 |
|
---|
21 | ifndef LWIP_SOURCES
|
---|
22 | include $(PATH_SUB_CURRENT)/../../Devices/Network/lwip-new/Config.kmk
|
---|
23 | endif
|
---|
24 |
|
---|
25 | #
|
---|
26 | # Hardended stub executable.
|
---|
27 | #
|
---|
28 | ifdef VBOX_WITH_HARDENING
|
---|
29 | PROGRAMS += VBoxNetDHCPHardened
|
---|
30 | VBoxNetDHCPHardened_TEMPLATE = VBOXR3HARDENEDEXE
|
---|
31 | VBoxNetDHCPHardened_NAME = VBoxNetDHCP
|
---|
32 | VBoxNetDHCPHardened_SOURCES = VBoxNetDhcpdHardened.cpp
|
---|
33 | VBoxNetDHCPHardened_LDFLAGS.win = /SUBSYSTEM:windows
|
---|
34 | $(call VBOX_SET_VER_INFO_DLL,VBoxNetDHCPHardened,VirtualBox DHCP Server,$(VBOX_WINDOWS_ICON_FILE)) # Version info / description.
|
---|
35 | endif
|
---|
36 |
|
---|
37 |
|
---|
38 | #
|
---|
39 | # The DHCP server module (dll if hardended)
|
---|
40 | #
|
---|
41 | ifdef VBOX_WITH_HARDENING
|
---|
42 | DLLS += VBoxNetDHCP
|
---|
43 | VBoxNetDHCP_TEMPLATE := VBoxR3Dll
|
---|
44 | else
|
---|
45 | PROGRAMS += VBoxNetDHCP
|
---|
46 | VBoxNetDHCP_TEMPLATE := VBOXR3EXE
|
---|
47 | endif
|
---|
48 |
|
---|
49 | # (current dir is for for lwipopts.h)
|
---|
50 | VBoxNetDHCP_INCS += . $(addprefix ../../Devices/Network/lwip-new/,$(LWIP_INCS))
|
---|
51 |
|
---|
52 | ifdef VBOX_WITH_AUTOMATIC_DEFS_QUOTING
|
---|
53 | VBoxNetDHCP_DEFS = KBUILD_TYPE="$(KBUILD_TYPE)"
|
---|
54 | else
|
---|
55 | VBoxNetDHCP_DEFS = KBUILD_TYPE=\"$(KBUILD_TYPE)\"
|
---|
56 | endif
|
---|
57 | #VBoxNetDHCP_DEFS = IPv6
|
---|
58 | #VBoxNetDHCP_DEFS.linux = WITH_VALGRIND
|
---|
59 | ifneq ($(KBUILD_TARGET),win)
|
---|
60 | VBoxNetDHCP_DEFS += VBOX_WITH_XPCOM
|
---|
61 | VBoxNetDHCP_INCS += $(VBOX_XPCOM_INCS)
|
---|
62 | ifneq ($(KBUILD_TARGET),darwin)
|
---|
63 | # We want -std=c++11 for 4.7 and newer compilers, and -std=c++0x for older ones.
|
---|
64 | VBoxNetDHCP_CXXFLAGS += -std=$(if $(VBOX_GCC_VERSION_CXX),$(if $(VBOX_GCC_VERSION_CXX) < 40700,c++0x,c++11),c++0x)
|
---|
65 | endif
|
---|
66 | endif
|
---|
67 | VBoxNetDHCP_SOURCES = \
|
---|
68 | ClientId.cpp \
|
---|
69 | Config.cpp \
|
---|
70 | DHCPD.cpp \
|
---|
71 | Db.cpp \
|
---|
72 | DhcpMessage.cpp \
|
---|
73 | DhcpOptions.cpp \
|
---|
74 | IPv4Pool.cpp \
|
---|
75 | Timestamp.cpp \
|
---|
76 | VBoxNetDhcpd.cpp \
|
---|
77 | ../../Main/glue/VBoxLogRelCreate.cpp \
|
---|
78 | ../../Main/glue/GetVBoxUserHomeDirectory.cpp \
|
---|
79 | $(addprefix ../../Devices/Network/lwip-new/,$(LWIP_SOURCES))
|
---|
80 |
|
---|
81 | VBoxNetDHCP_LIBS = $(LIB_RUNTIME)
|
---|
82 | VBoxNetDHCP_LIBS.solaris += socket nsl
|
---|
83 | VBoxNetDHCP_LDFLAGS.win = /SUBSYSTEM:windows
|
---|
84 |
|
---|
85 | ifdef VBOX_WITH_HARDENING
|
---|
86 | $(call VBOX_SET_VER_INFO_DLL,VBoxNetDHCP,VirtualBox DHCP Server (dll),$(VBOX_WINDOWS_ICON_FILE)) # Version info / description.
|
---|
87 | else
|
---|
88 | $(call VBOX_SET_VER_INFO_EXE,VBoxNetDHCP,VirtualBox DHCP Server,$(VBOX_WINDOWS_ICON_FILE)) # Version info / description.
|
---|
89 | endif
|
---|
90 |
|
---|
91 | include $(FILE_KBUILD_SUB_FOOTER)
|
---|
92 |
|
---|