1 | # $Id: Config.kmk 29 2009-07-01 20:30:29Z bird $
|
---|
2 | ## @file
|
---|
3 | # kBuild configuration for kStuff
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (c) 2006-2007 Knut St. Osmundsen <[email protected]>
|
---|
8 | #
|
---|
9 | # Permission is hereby granted, free of charge, to any person
|
---|
10 | # obtaining a copy of this software and associated documentation
|
---|
11 | # files (the "Software"), to deal in the Software without
|
---|
12 | # restriction, including without limitation the rights to use,
|
---|
13 | # copy, modify, merge, publish, distribute, sublicense, and/or sell
|
---|
14 | # copies of the Software, and to permit persons to whom the
|
---|
15 | # Software is furnished to do so, subject to the following
|
---|
16 | # conditions:
|
---|
17 | #
|
---|
18 | # The above copyright notice and this permission notice shall be
|
---|
19 | # included in all copies or substantial portions of the Software.
|
---|
20 | #
|
---|
21 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
---|
22 | # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
---|
23 | # OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
---|
24 | # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
---|
25 | # HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
---|
26 | # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
---|
27 | # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
---|
28 | # OTHER DEALINGS IN THE SOFTWARE.
|
---|
29 | #
|
---|
30 |
|
---|
31 | #
|
---|
32 | # This is where we install during the build.
|
---|
33 | #
|
---|
34 | PATH_INS := $(PATH_OUT)/kStuff
|
---|
35 |
|
---|
36 |
|
---|
37 | #
|
---|
38 | # Templates for the kStuff.
|
---|
39 | #
|
---|
40 | TEMPLATE_kStuff = kStuff Template
|
---|
41 | TEMPLATE_kStuff_TOOL = GXX3
|
---|
42 | TEMPLATE_kStuff_TOOL.darwin = GXX4MACHO
|
---|
43 | TEMPLATE_kStuff_TOOL.os2 = GXX3OMF
|
---|
44 | TEMPLATE_kStuff_TOOL.solaris = GXX3PLAIN
|
---|
45 | TEMPLATE_kStuff_TOOL.win.x86 = VCC70
|
---|
46 | TEMPLATE_kStuff_TOOL.win.amd64 = VCC80AMD64
|
---|
47 |
|
---|
48 | TEMPLATE_kStuff_SDKS.win.x86 = WINPSDK W2K3DDKX86
|
---|
49 | TEMPLATE_kStuff_SDKS.win.amd64 = WINPSDK W2K3DDKAMD64
|
---|
50 |
|
---|
51 | TEMPLATE_kStuff_DEFS.freebsd = KS_OS_FREEBSD
|
---|
52 | TEMPLATE_kStuff_DEFS.darwin = KS_OS_DARWIN
|
---|
53 | TEMPLATE_kStuff_DEFS.linux = KS_OS_LINUX
|
---|
54 | TEMPLATE_kStuff_DEFS.netbsd = KS_OS_NETBSD
|
---|
55 | TEMPLATE_kStuff_DEFS.openbsd = KS_OS_OPENBSD
|
---|
56 | TEMPLATE_kStuff_DEFS.os2 = KS_OS_OS2
|
---|
57 | TEMPLATE_kStuff_DEFS.solaris = KS_OS_SOLARIS
|
---|
58 | TEMPLATE_kStuff_DEFS.win = KS_OS_WINDOWS _CRT_SECURE_NO_DEPRECATE _CRT_NONSTDC_NO_WARNINGS
|
---|
59 |
|
---|
60 | TEMPLATE_kStuff_DEFS.x86 = KS_BITS=32
|
---|
61 | TEMPLATE_kStuff_DEFS.amd64 = KS_BITS=64
|
---|
62 |
|
---|
63 | TEMPLATE_kStuff_INCS = $(PATH_ROOT)/include
|
---|
64 |
|
---|
65 | TEMPLATE_kStuff_ASTOOL = YASM
|
---|
66 | TEMPLATE_kStuff_ASTOOL.os2 = NASM
|
---|
67 | TEMPLATE_kStuff_ASFLAGS.freebsd = -f elf
|
---|
68 | TEMPLATE_kStuff_ASFLAGS.linux = -f elf
|
---|
69 | TEMPLATE_kStuff_ASFLAGS.os2 = -f omf
|
---|
70 | TEMPLATE_kStuff_ASFLAGS.win.x86 = -f win32 -g cv8
|
---|
71 | TEMPLATE_kStuff_ASFLAGS.win.amd64= -f win64 -g cv8
|
---|
72 |
|
---|
73 | TEMPLATE_kStuff_CFLAGS.darwin = -g -fno-common
|
---|
74 | TEMPLATE_kStuff_CFLAGS.freebsd = -g
|
---|
75 | TEMPLATE_kStuff_CFLAGS.linux = -g
|
---|
76 | TEMPLATE_kStuff_CFLAGS.os2 = -g
|
---|
77 | TEMPLATE_kStuff_CFLAGS.win = -Zi -Zl -W3 -GF -GR-
|
---|
78 | TEMPLATE_kStuff_CFLAGS.win.x86 = -MD
|
---|
79 | TEMPLATE_kStuff_CFLAGS.win.amd64 = -MT
|
---|
80 | ifneq ($(BUILD_TYPE),debug)
|
---|
81 | TEMPLATE_kStuff_CFLAGS.freebsd += -O3
|
---|
82 | TEMPLATE_kStuff_CFLAGS.linux += -O3
|
---|
83 | TEMPLATE_kStuff_CFLAGS.os2 += -O3
|
---|
84 | TEMPLATE_kStuff_CFLAGS.win += -O2b2
|
---|
85 | else
|
---|
86 | TEMPLATE_kStuff_CFLAGS.win += -Od
|
---|
87 | endif
|
---|
88 |
|
---|
89 | TEMPLATE_kStuff_CXXFLAGS.darwin = -g -fno-exceptions -fno-common
|
---|
90 | TEMPLATE_kStuff_CXXFLAGS.freebsd = -g -fno-exceptions
|
---|
91 | TEMPLATE_kStuff_CXXFLAGS.linux = -g -fno-exceptions
|
---|
92 | TEMPLATE_kStuff_CXXFLAGS.os2 = -g -fno-exceptions
|
---|
93 | TEMPLATE_kStuff_CXXFLAGS.win = -Zi -Zl -W3 -GF -GR-
|
---|
94 | TEMPLATE_kStuff_CXXFLAGS.win.x86 = -MD
|
---|
95 | TEMPLATE_kStuff_CXXFLAGS.win.amd64 = -MT
|
---|
96 | ifneq ($(BUILD_TYPE),debug)
|
---|
97 | TEMPLATE_kStuff_CXXFLAGS.freebsd+= -O3
|
---|
98 | TEMPLATE_kStuff_CXXFLAGS.linux += -O3
|
---|
99 | TEMPLATE_kStuff_CXXFLAGS.os2 += -O3
|
---|
100 | TEMPLATE_kStuff_CXXFLAGS.win += -O2b2
|
---|
101 | else
|
---|
102 | TEMPLATE_kStuff_CXXFLAGS.win += -Od
|
---|
103 | endif
|
---|
104 |
|
---|
105 | TEMPLATE_kStuff_LDFLAGS.freebsd = -g
|
---|
106 | TEMPLATE_kStuff_LDFLAGS.linux = -g
|
---|
107 | TEMPLATE_kStuff_LDFLAGS.os2 = -g
|
---|
108 | TEMPLATE_kStuff_LDFLAGS.win = /DEBUG /NODEFAULTLIB
|
---|
109 |
|
---|
110 | TEMPLATE_kStuff_LIBS.freebsd =
|
---|
111 | TEMPLATE_kStuff_LIBS.linux =
|
---|
112 | TEMPLATE_kStuff_LIBS.os2 =
|
---|
113 | TEMPLATE_kStuff_LIBS.win = \
|
---|
114 | $(PATH_SDK_WINPSDK_LIB)/psapi.Lib
|
---|
115 | TEMPLATE_kStuff_LIBS.win.x86 = \
|
---|
116 | $(PATH_TOOL_VCC70_LIB)/msvcrt.lib \
|
---|
117 | $(PATH_TOOL_VCC70_LIB)/msvcprt.lib \
|
---|
118 | $(PATH_TOOL_VCC70_LIB)/oldnames.lib \
|
---|
119 | $(PATH_SDK_W2K3DDKX86_LIB)/ntdll.lib
|
---|
120 | TEMPLATE_kStuff_LIBS.win.amd64 = \
|
---|
121 | $(PATH_TOOL_VCC80AMD64_LIB)/libcmt.lib \
|
---|
122 | $(PATH_TOOL_VCC80AMD64_LIB)/oldnames.lib \
|
---|
123 | $(PATH_SDK_W2K3DDKAMD64_LIB)/ntdll.lib
|
---|
124 |
|
---|
125 | TEMPLATE_kStuffEXE = kStuff Executable Template
|
---|
126 | TEMPLATE_kStuffEXE_EXTENDS = kStuff
|
---|
127 | TEMPLATE_kStuffEXE_DEFS = $(TEMPLATE_kStuff) KS_EXE_TARGET
|
---|
128 |
|
---|
129 | TEMPLATE_kStuffLIB = kStuff Library Template
|
---|
130 | TEMPLATE_kStuffLIB_EXTENDS = kStuff
|
---|
131 | TEMPLATE_kStuffLIB_DEFS = $(TEMPLATE_kStuff) KS_LIB_TARGET
|
---|
132 |
|
---|
133 | TEMPLATE_kStuffDLL = kStuff DLL Template
|
---|
134 | TEMPLATE_kStuffDLL_EXTENDS = kStuff
|
---|
135 | TEMPLATE_kStuffDLL_DEFS = $(TEMPLATE_kStuff) KS_DLL_TARGET
|
---|
136 | TEMPLATE_kStuffDLL_LDFLAGS.os2 = $(TEMPLATE_kStuff_LDFLAGS.os2) -Zdll
|
---|
137 |
|
---|
138 |
|
---|