Makefile.kmk revision c58f1213e628a545081c70e26c6b67a841cff880
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant Sahani# $Id$
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant Sahani## @file
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant Sahani#
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant Sahani
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant Sahani#
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant Sahani# Copyright (C) 2006-2012 Oracle Corporation
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant Sahani#
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant Sahani# This file is part of VirtualBox Open Source Edition (OSE), as
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant Sahani# available from http://www.virtualbox.org. This file is free software;
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant Sahani# you can redistribute it and/or modify it under the terms of the GNU
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant Sahani# General Public License (GPL) as published by the Free Software
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant Sahani# Foundation, in version 2 as it comes in the "COPYING" file of the
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant Sahani# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant Sahani# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant Sahani#
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant Sahani
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant SahaniSUB_DEPTH = ../../../..
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant Sahaniinclude $(KBUILD_PATH)/subheader.kmk
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant Sahani
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant Sahaniifdef VBOX_WITH_HARDENING
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant Sahani PROGRAMS += VBoxNetNATHardened
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant Sahani DLLS += VBoxNetNAT
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant Sahanielse
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant Sahani PROGRAMS += VBoxNetNAT
07630cea1f3a845c09309f197ac7c4f11edd3b62Lennart Poetteringendif
07630cea1f3a845c09309f197ac7c4f11edd3b62Lennart PoetteringVBoxNetNAT_TEMPLATE =
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant SahaniVBoxNetNAT_TEMPLATE := VBOXR3$(if-expr defined(VBOX_WITH_HARDENING),,EXE)
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant SahaniVBoxNetNAT_INCS = ../../Devices/Network/slirp
07630cea1f3a845c09309f197ac7c4f11edd3b62Lennart PoetteringVBoxNetNAT_DEFS = VBOX_WITH_NAT_SERVICE
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant SahaniVBoxNetNAT_SOURCES += VBoxNetNAT.cpp
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant SahaniVBoxNetNAT_DEFS += VBOX_WITH_NAT_SERVICE
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant Sahani
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant Sahani#define def_vbox_slirp_service_cflags
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant Sahani# $(file)_DEFS += VBOX_WITH_NAT_SERVICE
6b3fd9a14d378a35d95ec4be65065708d092bee2Torstein Husebø#endef
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant Sahani
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant Sahanidefine def_vbox_slirp_service_sources
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant Sahani VBoxNetNAT_SOURCES += $1/$(file)
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant Sahaniendef
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant SahaniVBOX_NOT_IN_NATSERVICE = Network/DrvNAT.cpp
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant Sahani$(foreach file,$(filter-out $(VBOX_NOT_IN_NATSERVICE), $(VBOX_SLIRP_SOURCES)),$(eval $(call def_vbox_slirp_service_sources, ../../Devices)))
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant Sahani$(foreach file,$(VBOX_SLIRP_ALIAS_SOURCES),$(eval $(call def_vbox_slirp_service_sources, ../../Devices)))
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant Sahani$(foreach file,$(VBOX_SLIRP_BSD_SOURCES),$(eval $(call def_vbox_slirp_service_sources, ../../Devices)))
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant Sahani
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant Sahani$(foreach file,$(addprefix ../../Devices/, $(VBOX_SLIRP_BSD_SOURCES)),$(eval $(call def_vbox_slirp_cflags, ../../Devices/Network)))
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant Sahani$(foreach file,$(addprefix ../../Devices/, $(VBOX_SLIRP_BSD_SOURCES)),$(eval $(call def_vbox_slirp_bsd_cflags, ../../Devices/Network)))
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant Sahani$(foreach file,$(addprefix ../../Devices/, $(filter-out $(VBOX_WITH_NAT_SERVICE), $(VBOX_SLIRP_SOURCES))),$(eval $(call def_vbox_slirp_service_cflags, ../../Devices/Network)))
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant Sahani$(foreach file,$(addprefix ../../Devices/, $(filter-out $(VBOX_WITH_NAT_SERVICE), $(VBOX_SLIRP_SOURCES))),$(eval $(call def_vbox_slirp_cflags, ../../Devices/Network)))
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant Sahani$(foreach file,$(addprefix ../../Devices/, $(VBOX_SLIRP_ALIAS_SOURCES)),$(eval $(call def_vbox_slirp_cflags, ../../Devices/Network)))
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant Sahani$(foreach file,$(addprefix ../../Devices/, $(VBOX_SLIRP_ALIAS_SOURCES)),$(eval $(call def_vbox_slirp_alias_cflags, ../../Devices/Network)))
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant Sahani
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant SahaniVBoxNetNAT_SOURCES += ../NetLib/VBoxNetBaseService.cpp
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant Sahani
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant SahaniVBoxNetNAT_LIBS = \
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant Sahani $(LIB_RUNTIME)
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant SahaniVBoxNetNAT_LDFLAGS.win = /SUBSYSTEM:windows
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant Sahani
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant Sahaniinclude $(FILE_KBUILD_SUB_FOOTER)
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant Sahani