VirtualBox

source: vbox/trunk/src/libs/kStuff/Makefile.kmk@ 69111

Last change on this file since 69111 was 69111, checked in by vboxsync, 7 years ago

(C) year

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.2 KB
Line 
1# $Id: Makefile.kmk 69111 2017-10-17 14:26:02Z vboxsync $
2## @file
3# Sub-Makefile for kStuff, for statically linking into VBoxRT.
4#
5
6#
7# Copyright (C) 2007-2017 Oracle Corporation
8#
9# This file is part of VirtualBox Open Source Edition (OSE), as
10# available from http://www.virtualbox.org. This file is free software;
11# you can redistribute it and/or modify it under the terms of the GNU
12# General Public License (GPL) as published by the Free Software
13# Foundation, in version 2 as it comes in the "COPYING" file of the
14# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16#
17
18SUB_DEPTH = ../../..
19include $(KBUILD_PATH)/subheader.kmk
20
21#
22# The library for dynamic linking.
23#
24LIBRARIES += VBox-kStuff
25VBox-kStuff_TEMPLATE = VBoxR3RuntimeDll
26/* Temporary measure: prevents switch fall-through warnings. */
27ifeq ($(KBUILD_HOST),linux)
28 if $(VBOX_GCC_VERSION_CXX) >= 70000
29 VBox-kStuff_CFLAGS = -Wno-implicit-fallthrough
30 endif
31endif
32VBox-kStuff_DEFS = IN_RT_R3
33VBox-kStuff_DEFS.strict = K_STRICT KLDRMODMACHO_STRICT KLDRMODMACHO_STRICT2
34VBox-kStuff_DEFS.debug = $(VBox-kStuff_DEFS.strict)
35VBox-kStuff_INCS = \
36 kStuff/include \
37 $(VBox-kStuff_0_OUTDIR)
38VBox-kStuff_ORDERDEPS = \
39 $(VBox-kStuff_0_OUTDIR)/kErrNameConsts.h
40VBox-kStuff_SOURCES = \
41 kStuff/kLdr/kLdrMod.c \
42 kStuff/kLdr/kLdrModLX.c \
43 kStuff/kLdr/kLdrModMachO.c \
44 kStuff/kLdr/kLdrModPE.c \
45 \
46 kStuff/kRdr/kRdr.cpp \
47 kStuff/kRdr/kRdrBuffered.cpp \
48 \
49 kStuff/kCpu/kCpuCompare.c \
50 kStuff/kCpu/kCpuGetArchAndCpu.c \
51 \
52 kStuff/kErr/kErrName.c \
53 \
54 kStuff/kHlp/Generic/kHlpMemPComp.c \
55 kStuff/kHlp/Generic/kHlpMemICompAscii.c \
56 kStuff/kHlp/Generic/kHlpStrPCat.c \
57 kStuff/kHlp/Generic/kHlpStrNPCat.c \
58 kStuff/kHlp/Generic/kHlpStrPComp.c \
59 kStuff/kHlp/Generic/kHlpStrNPComp.c \
60 kStuff/kHlp/Generic/kHlpStrICompAscii.c \
61 kStuff/kHlp/Generic/kHlpStrIPCompAscii.c \
62 kStuff/kHlp/Generic/kHlpStrNICompAscii.c \
63 kStuff/kHlp/Generic/kHlpStrNIPCompAscii.c \
64 kStuff/kHlp/Generic/kHlpStrPCopy.c \
65 kStuff/kHlp/Generic/kHlpStrNLen.c \
66 kStuff/kHlp/Generic/kHlpInt2Ascii.c \
67 kStuff/kHlp/Generic/kHlpGetEnvUZ.c \
68 kStuff/kHlp/Generic/kHlpGetExt.c \
69 kStuff/kHlp/Generic/kHlpGetFilename.c \
70 kStuff/kHlp/Generic/kHlpIsFilenameOnly.c \
71 \
72 iprt/kHlpPage-iprt.cpp \
73 iprt/kHlpAlloc-iprt.cpp \
74 iprt/kHlpAssert-iprt.cpp \
75 iprt/kHlpEnv-iprt.cpp \
76 iprt/kHlpString-iprt.cpp \
77 iprt/kRdrFile-iprt.cpp
78
79ifdef VBOX_WITH_32_ON_64_MAIN_API # 32-bit edition.
80 LIBRARIES += VBox-kStuff-x86
81 VBox-kStuff-x86_TEMPLATE = VBoxR3Dll-x86
82 VBox-kStuff-x86_EXTENDS = VBox-kStuff
83endif
84
85#
86# The library for static linking.
87#
88LIBRARIES += VBox-kStuffStatic
89VBox-kStuffStatic_TEMPLATE = VBoxR3Static
90VBox-kStuffStatic_EXTENDS = VBox-kStuff
91
92LIBRARIES += VBox-kStuffStaticBldProg
93VBox-kStuffStaticBldProg_TEMPLATE = VBoxBldProg
94VBox-kStuffStaticBldProg_EXTENDS = VBox-kStuff
95
96
97#
98# Generate the error constants.
99#
100$$(VBox-kStuff_0_OUTDIR)/kErrNameConsts.h: \
101 $(PATH_SUB_CURRENT)/kStuff/include/k/kErrors.h \
102 $(MAKEFILE_CURRENT) \
103 | $$(dir $$@)
104 $(QUIET)$(RM) -f $@
105 $(QUIET)$(SED) \
106 -e '/^#define *\(K[A-Z_]*ERR_[^ ()]*\) .*$$/!d' \
107 -e 's/^#define *\(K[A-Z_]*ERR_[^ ()]*\) .*$$/ERR_CONST(\1)/' \
108 -e '/K[A-Z_]*ERR_[A-Z0-9_]*BASE/d' \
109 -e '/K[A-Z_]*ERR_[A-Z0-9_]*END/d' \
110 --output $@ \
111 $<
112
113include $(FILE_KBUILD_SUB_FOOTER)
114
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette