Makefile.kmk revision a3d9dd392ec76233e30f01423ed5755e6187618e
# $Id: Makefile.kmk$
## @file
# Adds sources list and defines required to LWIP pre-1.5.0 compilation
#
#
# 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.
#
#
# Recommended kmk flags:
#
# VBOX_WITH_NAT_SERVICE=1
# VBOX_WITH_LWIP_NAT=1
#
LWIP_INCS += \
vbox
LWIP_SOURCES += \
# LWIP_SOURCES += \
# LWIP_SOURCES += \
# LWIP_SOURCES += \
define def_vbox_lwip_flags # VAR_BaseName, path/to/lwip/dir
$(strip $1)_INCS += $(foreach incdir, $(LWIP_INCS), $(strip $2)/$(incdir))
endef
define _def_vbox_lwip_use # VAR_BaseName, path/to/lwip/dir
$(strip $1)_SOURCES += \
$(foreach file, $(LWIP_SOURCES), $(strip $2)/$(file))
# if individual lwip files need special settings, add them here:
# $(strip $2)/src/foo/bar.c_CFLAGS += -magic
endef
###
### Call this if you want to expose lwip to your component as a whole.
### In this case individual lwip files (added to _SOURCES of your
### component) will pick up lwip includes etc from your component
### settings.
###
### This is, for example, how NetworkServices/NAT uses it.
###
define def_vbox_lwip_public # VAR_BaseName, path/to/lwip/dir
$(eval $(call _def_vbox_lwip_use, $1, $2))
$(eval $(call def_vbox_lwip_flags, $1, $2))
endef
###
### Call this if you want to expose lwip only to a few selected files.
### In this case each lwip file is configured with lwip includes etc
### separately and you are supposed to call def_vbox_lwip_flags
### yourself for those of your files that use lwip.
###
### This is, for example, how Devices uses it.
###
define def_vbox_lwip_private # VAR_BaseName, path/to/lwip/dir
$(eval $(call _def_vbox_lwip_use, $1, $2))
$(foreach file, $(LWIP_SOURCES), \
$(eval $(call def_vbox_lwip_flags, $(strip $2)/$(file), $2)))
endef
ifeq ($(USERNAME), vvl)
$(foreach lwip_file, $(LWIP_SOURCES), $(eval $(lwip_file)_DEFS=RTMEM_WRAP_TO_EF_APIS))
LWIPTEST_SOURCES= Network/lwip-new/test/unit/core/test_mem.c \
endif