Makefile.kmk revision e64031e20c39650a7bc902a3e1aba613b9415dee
# $Id$
## @file
# Sub-Makefile for kStuff, for statically linking into VBoxRT.
#
#
# Copyright (C) 2007 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
#
# The library.
#
LIBRARIES += VBox-kStuff
VBox-kStuff_TEMPLATE = VBOXR3
VBox-kStuff_DEFS = IN_RT_R3
VBox-kStuff_DEFS.strict = K_STRICT KLDRMODMACHO_STRICT KLDRMODMACHO_STRICT2
VBox-kStuff_INCS = \
$(VBox-kStuff_0_OUTDIR)
VBox-kStuff_ORDERDEPS = \
$(VBox-kStuff_0_OUTDIR)/kErrNameConsts.h
VBox-kStuff_SOURCES = \
\
\
\
\
\
# Generate the error constants.
$$(VBox-kStuff_0_OUTDIR)/kErrNameConsts.h: \
$(PATH_SUB_CURRENT)/kStuff/include/k/kErrors.h \
$(MAKEFILE_CURRENT) \
| $$(dir $$@)
$(QUIET)$(RM) -f $@
$(QUIET)$(SED) \
-e '/^#define *\(K[A-Z_]*ERR_[^ ()]*\) .*$$/!d' \
-e 's/^#define *\(K[A-Z_]*ERR_[^ ()]*\) .*$$/ERR_CONST(\1)/' \
-e '/K[A-Z_]*ERR_[A-Z0-9_]*BASE/d' \
-e '/K[A-Z_]*ERR_[A-Z0-9_]*END/d' \
--output $@ \
$<
include $(KBUILD_PATH)/subfooter.kmk