1 | # $Id: Makefile.kmk 82745 2020-01-14 20:38:09Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Sub-makefile for the DHCP server.
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2006-2019 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 | VBoxNetDHCP_DEFS = KBUILD_TYPE=\"$(KBUILD_TYPE)\"
|
---|
53 | #VBoxNetDHCP_DEFS = IPv6
|
---|
54 | #VBoxNetDHCP_DEFS.linux = WITH_VALGRIND
|
---|
55 | ifneq ($(KBUILD_TARGET),win)
|
---|
56 | VBoxNetDHCP_DEFS += VBOX_WITH_XPCOM
|
---|
57 | VBoxNetDHCP_INCS += $(VBOX_XPCOM_INCS)
|
---|
58 | ifneq ($(KBUILD_TARGET),darwin)
|
---|
59 | # We want -std=c++11 for 4.7 and newer compilers, and -std=c++0x for older ones.
|
---|
60 | VBoxNetDHCP_CXXFLAGS += -std=$(if $(VBOX_GCC_VERSION_CXX),$(if $(VBOX_GCC_VERSION_CXX) < 40700,c++0x,c++11),c++0x)
|
---|
61 | endif
|
---|
62 | endif
|
---|
63 | VBoxNetDHCP_SOURCES = \
|
---|
64 | ClientId.cpp \
|
---|
65 | Config.cpp \
|
---|
66 | DHCPD.cpp \
|
---|
67 | Db.cpp \
|
---|
68 | DhcpMessage.cpp \
|
---|
69 | DhcpOptions.cpp \
|
---|
70 | IPv4Pool.cpp \
|
---|
71 | Timestamp.cpp \
|
---|
72 | VBoxNetDhcpd.cpp \
|
---|
73 | ../../Main/glue/VBoxLogRelCreate.cpp \
|
---|
74 | ../../Main/glue/GetVBoxUserHomeDirectory.cpp \
|
---|
75 | $(addprefix ../../Devices/Network/lwip-new/,$(LWIP_SOURCES))
|
---|
76 |
|
---|
77 | VBoxNetDHCP_LIBS = $(LIB_RUNTIME)
|
---|
78 | VBoxNetDHCP_LIBS.solaris += socket nsl
|
---|
79 | VBoxNetDHCP_LDFLAGS.win = /SUBSYSTEM:windows
|
---|
80 |
|
---|
81 | ifdef VBOX_WITH_HARDENING
|
---|
82 | $(call VBOX_SET_VER_INFO_DLL,VBoxNetDHCP,VirtualBox DHCP Server (dll),$(VBOX_WINDOWS_ICON_FILE)) # Version info / description.
|
---|
83 | else
|
---|
84 | $(call VBOX_SET_VER_INFO_EXE,VBoxNetDHCP,VirtualBox DHCP Server,$(VBOX_WINDOWS_ICON_FILE)) # Version info / description.
|
---|
85 | endif
|
---|
86 |
|
---|
87 | include $(FILE_KBUILD_SUB_FOOTER)
|
---|
88 |
|
---|