summaryrefslogtreecommitdiffstats
path: root/src/VBox/NetworkServices/Dhcpd/Makefile.kmk
diff options
context:
space:
mode:
Diffstat (limited to 'src/VBox/NetworkServices/Dhcpd/Makefile.kmk')
-rw-r--r--src/VBox/NetworkServices/Dhcpd/Makefile.kmk93
1 files changed, 93 insertions, 0 deletions
diff --git a/src/VBox/NetworkServices/Dhcpd/Makefile.kmk b/src/VBox/NetworkServices/Dhcpd/Makefile.kmk
new file mode 100644
index 00000000..48e51ffa
--- /dev/null
+++ b/src/VBox/NetworkServices/Dhcpd/Makefile.kmk
@@ -0,0 +1,93 @@
+# $Id: Makefile.kmk $
+## @file
+# Sub-makefile for the DHCP server
+#
+
+#
+# Copyright (C) 2006-2019 Oracle Corporation
+#
+# This file is part of VirtualBox Open Source Edition (OSE), as
+# available from http://www.virtualbox.org. This file is free software;
+# you can redistribute it and/or modify it under the terms of the GNU
+# General Public License (GPL) as published by the Free Software
+# Foundation, in version 2 as it comes in the "COPYING" file of the
+# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+#
+
+SUB_DEPTH = ../../../..
+include $(KBUILD_PATH)/subheader.kmk
+# ifdef VBOX_WITH_...
+
+ VBOX_PATH_Dhcpd_SRC := $(PATH_SUB_CURRENT)
+
+ # XXX: do not depend on order
+ ifndef LWIP_SOURCES
+ include $(PATH_SUB_CURRENT)/../../Devices/Network/lwip-new/Config.kmk
+ endif
+
+ ifdef VBOX_WITH_HARDENING
+ PROGRAMS += VBoxNetDhcpdHardened
+ DLLS += VBoxNetDhcpd
+ else
+ PROGRAMS += VBoxNetDhcpd
+ endif
+
+ VBoxNetDhcpdHardened_TEMPLATE = VBOXR3HARDENEDEXE
+ VBoxNetDhcpdHardened_NAME = VBoxNetDHCP
+ VBoxNetDhcpdHardened_DEFS = SERVICE_NAME=\"VBoxNetDhcpd\"
+ VBoxNetDhcpdHardened_SOURCES = VBoxNetDhcpdHardened.cpp
+ VBoxNetDhcpdHardened_SOURCES.win = $(VBoxNetDhcpd_0_OUTDIR)/VBoxNetDhcpd-icon.rc
+ VBoxNetDhcpdHardened_LDFLAGS.win = /SUBSYSTEM:windows
+
+ VBoxNetDhcpd_TEMPLATE := $(if-expr defined(VBOX_WITH_HARDENING),VBoxR3Dll,VBOXR3EXE)
+ VBoxNetDhcpd_NAME = VBoxNetDHCP
+ # VBoxNetDhcpd_DEFS = IPv6
+ # VBoxNetDhcpd_DEFS.linux = WITH_VALGRIND
+ #VBoxNetDhcpd_DEFS.win = VBOX_COM_OUTOFPROC_MODULE _WIN32_WINNT=0x501 # Windows XP
+
+ # (current dir is for for lwipopts.h)
+ VBoxNetDhcpd_INCS += . $(addprefix ../../Devices/Network/lwip-new/,$(LWIP_INCS))
+
+ VBoxNetDhcpd_DEFS = KBUILD_TYPE=\"$(KBUILD_TYPE)\"
+ ifneq ($(KBUILD_TARGET),win)
+ VBoxNetDhcpd_DEFS += VBOX_WITH_XPCOM
+ VBoxNetDhcpd_INCS += $(VBOX_XPCOM_INCS)
+ ifneq ($(KBUILD_TARGET),darwin)
+ # We want -std=c++11 for 4.7 and newer compilers, and -std=c++0x for older ones.
+ VBoxNetDhcpd_CXXFLAGS += -std=$(if $(VBOX_GCC_VERSION_CXX),$(if $(VBOX_GCC_VERSION_CXX) < 40700,c++0x,c++11),c++0x)
+ endif
+ endif
+ VBoxNetDhcpd_SOURCES = ../../Main/glue/VBoxLogRelCreate.cpp \
+ ../../Main/glue/GetVBoxUserHomeDirectory.cpp \
+ ClientId.cpp \
+ Config.cpp \
+ DHCPD.cpp \
+ Db.cpp \
+ DhcpMessage.cpp \
+ DhcpOptions.cpp \
+ IPv4Pool.cpp \
+ TimeStamp.cpp \
+ VBoxNetDhcpd.cpp \
+ $(addprefix ../../Devices/Network/lwip-new/,$(LWIP_SOURCES))
+
+ VBoxNetDhcpd_LIBS = $(LIB_RUNTIME)
+
+ VBoxNetDhcpd_LIBS.solaris += socket nsl
+ VBoxNetDhcpd_LDFLAGS.win = /SUBSYSTEM:windows
+
+ ifeq ($(KBUILD_TARGET),win)
+ # Icon include file.
+ VBoxNetDhcpd_SOURCES += VBoxNetDhcpd.rc
+ VBoxNetDhcpd.rc_INCS = $(VBoxNetDhcpd_0_OUTDIR)
+ VBoxNetDhcpd.rc_DEPS = $(VBoxNetDhcpd_0_OUTDIR)/VBoxNetDhcpd-icon.rc
+ VBoxNetDhcpd.rc_CLEAN = $(VBoxNetDhcpd_0_OUTDIR)/VBoxNetDhcpd-icon.rc
+
+ $$(VBoxNetDhcpd_0_OUTDIR)/VBoxNetDhcpd-icon.rc: $(VBOX_WINDOWS_ICON_FILE) \
+ $$(VBoxNetDhcpd_DEFPATH)/Makefile.kmk | $$(dir $$@)
+ $(RM) -f $@
+ $(APPEND) $@ 'IDI_VIRTUALBOX ICON DISCARDABLE "$(subst /,\\,$(VBOX_WINDOWS_ICON_FILE))"'
+ endif # win
+
+# endif # VBOX_WITH_...
+include $(FILE_KBUILD_SUB_FOOTER)