VirtualBox

source: kBuild/trunk/src/kWorker/Makefile.kmk@ 3479

Last change on this file since 3479 was 3371, checked in by bird, 5 years ago

kWorker: Need more small TLS DLLs when moc uses kSubmit too.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 7.0 KB
Line 
1# $Id: Makefile.kmk 3371 2020-06-10 10:58:58Z bird $
2## @file
3# Sub-makefile for kWorker.
4#
5
6#
7# Copyright (c) 2016 knut st. osmundsen <[email protected]>
8#
9# This file is part of kBuild.
10#
11# kBuild is free software; you can redistribute it and/or modify
12# it under the terms of the GNU General Public License as published by
13# the Free Software Foundation; either version 3 of the License, or
14# (at your option) any later version.
15#
16# kBuild is distributed in the hope that it will be useful,
17# but WITHOUT ANY WARRANTY; without even the implied warranty of
18# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19# GNU General Public License for more details.
20#
21# You should have received a copy of the GNU General Public License
22# along with kBuild. If not, see <http://www.gnu.org/licenses/>
23#
24#
25
26
27SUB_DEPTH = ../..
28include $(PATH_KBUILD)/subheader.kmk
29
30
31PROGRAMS += kWorker
32kWorker_TEMPLATE = BIN-STATIC-THREADED
33kWorker_DEFS := KWORKER
34kWorker_DEFS.debug = K_STRICT
35kWorker_DEFS.release = NASSERT
36ifeq ($(USERNAME),bird)
37kWorker_CFLAGS = -W4 -wd4127 -wd4100 -wd4214 -wd4201 -wd4204
38endif
39kWorker_SOURCES = \
40 kWorker.c \
41 ../kmk/kmkbuiltin/kDepObj.c \
42 ../kmk/kmkbuiltin/err.c
43kWorker_INCS = \
44 ../kmk/ \
45 ../kmk/kmkbuiltin
46kWorker_LIBS = \
47 $(kStuff_1_TARGET) \
48 $(kWorkerLib_1_TARGET)
49include $(KBUILD_PATH)/sdks/WINDDK71.kmk
50kWorker_LIBS.win = \
51 $(TEMPLATE_BIN-STATIC-THREADED_LIBS) \
52 $(PATH_SDK_WINDDK71_LIB_WNET)/ntdll.lib \
53 $(PATH_SDK_WINDDK71_LIB_WNET)/psapi.lib
54kWorker_LDFLAGS.win = \
55 /DYNAMICBASE:NO /FIXED
56kWorker_LDFLAGS.win.x86 = /BASE:0x00010000
57kWorker_LDFLAGS.win.amd64 = /BASE:0x0000000420000000 /STACK:16777216,262144
58
59#kWorker_LDFLAGS.win.x86 = \
60# /SAFESEH:NO - doesn't help anyone.
61
62
63#
64# Stuff from ../libs. Need to rebuilt it with static CRT.
65#
66LIBRARIES += kWorkerLib
67kWorkerLib_TEMPLATE = LIB-STATIC-THREADED
68kWorkerLib_DEFPATH = ../lib # Need fix from r2837.
69kWorkerLib_DEFPATH := $(PATH_SUB_CURRENT)/../lib
70kWorkerLib_DEFS := KWORKER
71kWorkerLib_SOURCES = \
72 crc32.c \
73 md5.c \
74 kbuild_version.c \
75 kDep.c
76kWorkerLib_SOURCES.win = \
77 nt_fullpath.c \
78 nt_fullpath_cached.c \
79 quoted_spawn.c \
80 nt/nthlpcore.c \
81 nt/nthlpfs.c \
82 nt/ntdir.c \
83 nt/ntstat.c \
84 nt/ntunlink.c \
85 nt/kFsCache.c \
86 win_get_processor_group_active_mask.c \
87 quote_argv.c \
88 is_console.c \
89 maybe_con_write.c \
90 maybe_con_fwrite.c \
91 msc_buffered_printf.c
92kbuild_version.c_DEFS = KBUILD_SVN_REV=$(KBUILD_SVN_REV)
93
94#
95# kStuff library.
96#
97LIBRARIES += kStuff
98kStuff_TEMPLATE = LIB-STATIC-THREADED
99kStuff_DEFS.debug = K_STRICT
100kStuff_INCS = kStuff/include
101kStuff_DEFPATH = $(PATH_ROOT)/src/lib
102
103# kLdr
104kStuff_SOURCES += \
105 kStuff/kLdr/kLdr.c \
106 kStuff/kLdr/kLdrDyld.c \
107 kStuff/kLdr/kLdrDyldFind.c \
108 kStuff/kLdr/kLdrDyldMod.c \
109 kStuff/kLdr/kLdrDyldOS.c \
110 kStuff/kLdr/kLdrDyLdSem.c \
111 kStuff/kLdr/kLdrMod.c \
112 kStuff/kLdr/kLdrModLX.c \
113 kStuff/kLdr/kLdrModMachO.c \
114 kStuff/kLdr/kLdrModNative.c \
115 kStuff/kLdr/kLdrModPE.c
116kLdr_SOURCES.os2 += \
117 kStuff/kLdr/kLdr-os2.c \
118 kStuff/kLdr/kLdrA-os2.asm
119kLdr_SOURCES.win += \
120 kStuff/kLdr/kLdr-win.c
121
122# kRdr
123kStuff_SOURCES += \
124 kStuff/kRdr/kRdr.cpp \
125 kStuff/kRdr/kRdrFile.cpp \
126 kStuff/kRdr/kRdrBuffered.cpp
127
128# kCpu
129kStuff_SOURCES += \
130 kStuff/kCpu/kCpuCompare.c \
131 kStuff/kCpu/kCpuGetArchAndCpu.c
132
133# kHlp (CRT)
134kStuff_SOURCES += \
135 kStuff/kHlp/Generic/kHlpMemPComp.c \
136 kStuff/kHlp/Generic/kHlpMemICompAscii.c \
137 kStuff/kHlp/Generic/kHlpStrPCat.c \
138 kStuff/kHlp/Generic/kHlpStrNPCat.c \
139 kStuff/kHlp/Generic/kHlpStrPComp.c \
140 kStuff/kHlp/Generic/kHlpStrNPComp.c \
141 kStuff/kHlp/Generic/kHlpStrICompAscii.c \
142 kStuff/kHlp/Generic/kHlpStrIPCompAscii.c \
143 kStuff/kHlp/Generic/kHlpStrNICompAscii.c \
144 kStuff/kHlp/Generic/kHlpStrNIPCompAscii.c \
145 kStuff/kHlp/Generic/kHlpStrPCopy.c \
146 kStuff/kHlp/Generic/kHlpStrNLen.c \
147 kStuff/kHlp/Generic/kHlpInt2Ascii.c \
148 \
149 kStuff/kHlp/Generic/kHlpGetEnvUZ.c \
150 \
151 kStuff/kHlp/Generic/kHlpGetExt.c \
152 kStuff/kHlp/Generic/kHlpGetFilename.c \
153 kStuff/kHlp/Generic/kHlpIsFilenameOnly.c \
154 \
155 kStuff/kHlp/Generic/kHlpPage.c \
156 \
157 kStuff/kHlp/CRT/kHlpCRTAlloc.cpp \
158 kStuff/kHlp/CRT/kHlpCRTEnv.cpp \
159 kStuff/kHlp/CRT/kHlpCRTString.cpp
160kStuff_SOURCES.darwin += \
161 kStuff/kHlp/Bare/kHlpSys-darwin.c
162
163
164#
165# A couple of dummy DLLs we use for grabbing LDR TLS entries.
166#
167DLLS += kWorkerTls1K kWorkerTls1K01 kWorkerTls1K02 kWorkerTls1K03 kWorkerTls1K04 kWorkerTls1K05 kWorkerTls1K06 kWorkerTls1K07 \
168 kWorkerTls1K08 kWorkerTls1K09 kWorkerTls1K10 kWorkerTls1K11 kWorkerTls1K12 kWorkerTls1K13 kWorkerTls1K14 kWorkerTls1K15
169kWorkerTls1K_TEMPLATE = BIN-STATIC-THREADED
170kWorkerTls1K_DEFS = TLS_SIZE=1024
171kWorkerTls1K_SOURCES = kWorkerTlsXxxK.c
172kWorkerTls1K_LDFLAGS = /Entry:DummyDllEntry
173
174kWorkerTls1K01_EXTENDS = kWorkerTls1K
175kWorkerTls1K02_EXTENDS = kWorkerTls1K
176kWorkerTls1K03_EXTENDS = kWorkerTls1K
177kWorkerTls1K04_EXTENDS = kWorkerTls1K
178kWorkerTls1K05_EXTENDS = kWorkerTls1K
179kWorkerTls1K06_EXTENDS = kWorkerTls1K
180kWorkerTls1K07_EXTENDS = kWorkerTls1K
181kWorkerTls1K08_EXTENDS = kWorkerTls1K
182kWorkerTls1K09_EXTENDS = kWorkerTls1K
183kWorkerTls1K10_EXTENDS = kWorkerTls1K
184kWorkerTls1K11_EXTENDS = kWorkerTls1K
185kWorkerTls1K12_EXTENDS = kWorkerTls1K
186kWorkerTls1K13_EXTENDS = kWorkerTls1K
187kWorkerTls1K14_EXTENDS = kWorkerTls1K
188kWorkerTls1K15_EXTENDS = kWorkerTls1K
189
190
191DLLS += kWorkerTls64K kWorkerTls64K01 kWorkerTls64K02 kWorkerTls64K03 kWorkerTls64K04 kWorkerTls64K05 kWorkerTls64K06 kWorkerTls64K07
192kWorkerTls64K_TEMPLATE = BIN-STATIC-THREADED
193kWorkerTls64K_DEFS = TLS_SIZE=65536
194kWorkerTls64K_SOURCES = kWorkerTlsXxxK.c
195kWorkerTls64K_LDFLAGS = /Entry:DummyDllEntry
196
197kWorkerTls64K01_EXTENDS = kWorkerTls64K
198kWorkerTls64K02_EXTENDS = kWorkerTls64K
199kWorkerTls64K03_EXTENDS = kWorkerTls64K
200kWorkerTls64K04_EXTENDS = kWorkerTls64K
201kWorkerTls64K05_EXTENDS = kWorkerTls64K
202kWorkerTls64K06_EXTENDS = kWorkerTls64K
203kWorkerTls64K07_EXTENDS = kWorkerTls64K
204
205
206DLLS += kWorkerTls128K kWorkerTls128K01 kWorkerTls128K02 kWorkerTls128K03 kWorkerTls128K04 kWorkerTls128K05 kWorkerTls128K06 kWorkerTls128K07
207kWorkerTls128K_TEMPLATE = BIN-STATIC-THREADED
208kWorkerTls128K_DEFS = TLS_SIZE=131072
209kWorkerTls128K_SOURCES = kWorkerTlsXxxK.c
210kWorkerTls128K_LDFLAGS = /Entry:DummyDllEntry
211
212kWorkerTls128K01_EXTENDS = kWorkerTls128K
213kWorkerTls128K02_EXTENDS = kWorkerTls128K
214kWorkerTls128K03_EXTENDS = kWorkerTls128K
215kWorkerTls128K04_EXTENDS = kWorkerTls128K
216kWorkerTls128K05_EXTENDS = kWorkerTls128K
217kWorkerTls128K06_EXTENDS = kWorkerTls128K
218kWorkerTls128K07_EXTENDS = kWorkerTls128K
219
220
221DLLS += kWorkerTls512K kWorkerTls512K01 kWorkerTls512K02 kWorkerTls512K03 kWorkerTls512K04 kWorkerTls512K05 kWorkerTls512K06 kWorkerTls512K07
222kWorkerTls512K_TEMPLATE = BIN-STATIC-THREADED
223kWorkerTls512K_DEFS = TLS_SIZE=524288
224kWorkerTls512K_SOURCES = kWorkerTlsXxxK.c
225kWorkerTls512K_LDFLAGS = /Entry:DummyDllEntry
226
227kWorkerTls512K01_EXTENDS = kWorkerTls512K
228kWorkerTls512K02_EXTENDS = kWorkerTls512K
229kWorkerTls512K03_EXTENDS = kWorkerTls512K
230kWorkerTls512K04_EXTENDS = kWorkerTls512K
231kWorkerTls512K05_EXTENDS = kWorkerTls512K
232kWorkerTls512K06_EXTENDS = kWorkerTls512K
233kWorkerTls512K07_EXTENDS = kWorkerTls512K
234
235
236include $(KBUILD_PATH)/subfooter.kmk
237
Note: See TracBrowser for help on using the repository browser.

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