Makefile.kmk revision cfdba31ca72cc33430f0364b686f1d52559a81b5
# $Id$
## @file
#
#
# Copyright (C) 2006-2012 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_LWIP_NAT
# XXX: do not depend on order
ifndef LWIP_SOURCES
include ../../Devices/Network/lwip-new/Makefile.kmk
endif
ifdef VBOX_WITH_HARDENING
PROGRAMS += VBoxNetLwipNATHardened
DLLS += VBoxNetLwipNAT
else
PROGRAMS += VBoxNetLwipNAT
endif
ifdef VBOX_WITH_HARDENING
VBoxNetLwipNATHardened_SOURCES += VBoxNetNATHardened.cpp
VBoxNetLwipNATHardened_DEFS += SERVICE_NAME=\"VBoxNetNAT\"
VBoxNetLwipNATHardened_TEMPLATE=VBOXR3HARDENEDEXE
VBoxNetLwipNATHardened_NAME = VBoxNetNAT
endif
VBoxNetLwipNAT_TEMPLATE =
VBoxNetLwipNAT_TEMPLATE := VBOXMAIN$(if-expr defined(VBOX_WITH_HARDENING),DLL,CLIENTEXE)
VBoxNetLwipNAT_NAME = VBoxNetNAT
VBoxNetLwipNAT_DEFS += ${LWIP_DEFS} IPv6
VBoxNetLwipNAT_DEFS.win += VBOX_COM_OUTOFPROC_MODULE _WIN32_WINNT=0x501 # Windows XP
VBoxNetLwipNAT_SOURCES += VBoxNetLwipNAT.cpp \
VBoxNetLwipNAT_LIBS = \
$(LIB_RUNTIME)
VBoxNetLwipNAT_LIBS.solaris += socket nsl
VBoxNetLwipNAT_LDFLAGS.win = /SUBSYSTEM:windows
# Convince Solaris headers to expose socket stuff we need. 600 would
# also work, but <sys/feature_tests.h> insists on C99 for it and so
# explodes for C++. Note that for 500 it insists on NOT using C99, so
# when some day we decide to use -std=c99 we are in for some fun.
VBoxNetLwipNAT_DEFS.solaris += _XOPEN_SOURCE=500 __EXTENSIONS__=1
VBoxNetLwipNAT_SOURCES += \
proxy.c \
pxtcp.c \
pxudp.c \
pxdns.c \
pxping.c \
fwtcp.c \
fwudp.c \
$(eval $(call def_vbox_lwip_public, \
VBoxNetLwipNAT, ../../Devices/Network/lwip-new))
endif
include $(FILE_KBUILD_SUB_FOOTER)