1 | # $Id: Makefile.kmk 2968 2016-09-26 18:14:50Z 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 |
|
---|
27 | SUB_DEPTH = ../..
|
---|
28 | include $(PATH_KBUILD)/subheader.kmk
|
---|
29 |
|
---|
30 |
|
---|
31 | PROGRAMS += kWorker
|
---|
32 | kWorker_TEMPLATE = BIN-STATIC-THREADED
|
---|
33 | kWorker_DEFS := KWORKER
|
---|
34 | kWorker_DEFS.debug = K_STRICT
|
---|
35 | kWorker_DEFS.release = NASSERT
|
---|
36 | kWorker_SOURCES = \
|
---|
37 | kWorker.c \
|
---|
38 | ../kmk/kmkbuiltin/kDepObj.c
|
---|
39 | kWorker_INCS = \
|
---|
40 | ../kmk/ \
|
---|
41 | ../kmk/kmkbuiltin
|
---|
42 | kWorker_LIBS = \
|
---|
43 | $(kStuff_1_TARGET) \
|
---|
44 | $(kWorkerLib_1_TARGET)
|
---|
45 | include $(KBUILD_PATH)/sdks/WINDDK71.kmk
|
---|
46 | kWorker_LIBS.win = \
|
---|
47 | $(TEMPLATE_BIN-STATIC-THREADED_LIBS) \
|
---|
48 | $(PATH_SDK_WINDDK71_LIB_WNET)/ntdll.lib \
|
---|
49 | $(PATH_SDK_WINDDK71_LIB_WNET)/psapi.lib
|
---|
50 | kWorker_LDFLAGS.win = \
|
---|
51 | /BASE:0x10000 /DYNAMICBASE:NO /FIXED
|
---|
52 | #kWorker_LDFLAGS.win.x86 = \
|
---|
53 | # /SAFESEH:NO - doesn't help anyone.
|
---|
54 |
|
---|
55 |
|
---|
56 | #
|
---|
57 | # Stuff from ../libs. Need to rebuilt it with static CRT.
|
---|
58 | #
|
---|
59 | LIBRARIES += kWorkerLib
|
---|
60 | kWorkerLib_TEMPLATE = LIB-STATIC-THREADED
|
---|
61 | kWorkerLib_DEFPATH = ../lib # Need fix from r2837.
|
---|
62 | kWorkerLib_DEFPATH := $(PATH_SUB_CURRENT)/../lib
|
---|
63 | kWorkerLib_DEFS := KWORKER
|
---|
64 | kWorkerLib_SOURCES = \
|
---|
65 | crc32.c \
|
---|
66 | md5.c \
|
---|
67 | kbuild_version.c \
|
---|
68 | kDep.c
|
---|
69 | kWorkerLib_SOURCES.win = \
|
---|
70 | nt_fullpath.c \
|
---|
71 | nt_fullpath_cached.c \
|
---|
72 | quoted_spawn.c \
|
---|
73 | nt/nthlpcore.c \
|
---|
74 | nt/nthlpfs.c \
|
---|
75 | nt/ntdir.c \
|
---|
76 | nt/ntstat.c \
|
---|
77 | nt/ntunlink.c \
|
---|
78 | nt/kFsCache.c \
|
---|
79 | quote_argv.c \
|
---|
80 | maybe_con_write.c \
|
---|
81 | maybe_con_fwrite.c \
|
---|
82 | msc_buffered_printf.c
|
---|
83 | kbuild_version.c_DEFS = KBUILD_SVN_REV=$(KBUILD_SVN_REV)
|
---|
84 |
|
---|
85 | #
|
---|
86 | # kStuff library.
|
---|
87 | #
|
---|
88 | LIBRARIES += kStuff
|
---|
89 | kStuff_TEMPLATE = LIB-STATIC-THREADED
|
---|
90 | kStuff_DEFS.debug = K_STRICT
|
---|
91 | kStuff_INCS = kStuff/include
|
---|
92 | kStuff_DEFPATH = $(PATH_ROOT)/src/lib
|
---|
93 |
|
---|
94 | # kLdr
|
---|
95 | kStuff_SOURCES += \
|
---|
96 | kStuff/kLdr/kLdr.c \
|
---|
97 | kStuff/kLdr/kLdrDyld.c \
|
---|
98 | kStuff/kLdr/kLdrDyldFind.c \
|
---|
99 | kStuff/kLdr/kLdrDyldMod.c \
|
---|
100 | kStuff/kLdr/kLdrDyldOS.c \
|
---|
101 | kStuff/kLdr/kLdrDyLdSem.c \
|
---|
102 | kStuff/kLdr/kLdrMod.c \
|
---|
103 | kStuff/kLdr/kLdrModLX.c \
|
---|
104 | kStuff/kLdr/kLdrModMachO.c \
|
---|
105 | kStuff/kLdr/kLdrModNative.c \
|
---|
106 | kStuff/kLdr/kLdrModPE.c
|
---|
107 | kLdr_SOURCES.os2 += \
|
---|
108 | kStuff/kLdr/kLdr-os2.c \
|
---|
109 | kStuff/kLdr/kLdrA-os2.asm
|
---|
110 | kLdr_SOURCES.win += \
|
---|
111 | kStuff/kLdr/kLdr-win.c
|
---|
112 |
|
---|
113 | # kRdr
|
---|
114 | kStuff_SOURCES += \
|
---|
115 | kStuff/kRdr/kRdr.cpp \
|
---|
116 | kStuff/kRdr/kRdrFile.cpp \
|
---|
117 | kStuff/kRdr/kRdrBuffered.cpp
|
---|
118 |
|
---|
119 | # kCpu
|
---|
120 | kStuff_SOURCES += \
|
---|
121 | kStuff/kCpu/kCpuCompare.c \
|
---|
122 | kStuff/kCpu/kCpuGetArchAndCpu.c
|
---|
123 |
|
---|
124 | # kHlp (CRT)
|
---|
125 | kStuff_SOURCES += \
|
---|
126 | kStuff/kHlp/Generic/kHlpMemPComp.c \
|
---|
127 | kStuff/kHlp/Generic/kHlpMemICompAscii.c \
|
---|
128 | kStuff/kHlp/Generic/kHlpStrPCat.c \
|
---|
129 | kStuff/kHlp/Generic/kHlpStrNPCat.c \
|
---|
130 | kStuff/kHlp/Generic/kHlpStrPComp.c \
|
---|
131 | kStuff/kHlp/Generic/kHlpStrNPComp.c \
|
---|
132 | kStuff/kHlp/Generic/kHlpStrICompAscii.c \
|
---|
133 | kStuff/kHlp/Generic/kHlpStrIPCompAscii.c \
|
---|
134 | kStuff/kHlp/Generic/kHlpStrNICompAscii.c \
|
---|
135 | kStuff/kHlp/Generic/kHlpStrNIPCompAscii.c \
|
---|
136 | kStuff/kHlp/Generic/kHlpStrPCopy.c \
|
---|
137 | kStuff/kHlp/Generic/kHlpStrNLen.c \
|
---|
138 | kStuff/kHlp/Generic/kHlpInt2Ascii.c \
|
---|
139 | \
|
---|
140 | kStuff/kHlp/Generic/kHlpGetEnvUZ.c \
|
---|
141 | \
|
---|
142 | kStuff/kHlp/Generic/kHlpGetExt.c \
|
---|
143 | kStuff/kHlp/Generic/kHlpGetFilename.c \
|
---|
144 | kStuff/kHlp/Generic/kHlpIsFilenameOnly.c \
|
---|
145 | \
|
---|
146 | kStuff/kHlp/Generic/kHlpPage.c \
|
---|
147 | \
|
---|
148 | kStuff/kHlp/CRT/kHlpCRTAlloc.cpp \
|
---|
149 | kStuff/kHlp/CRT/kHlpCRTEnv.cpp \
|
---|
150 | kStuff/kHlp/CRT/kHlpCRTString.cpp
|
---|
151 | kStuff_SOURCES.darwin += \
|
---|
152 | kStuff/kHlp/Bare/kHlpSys-darwin.c
|
---|
153 |
|
---|
154 |
|
---|
155 |
|
---|
156 | include $(KBUILD_PATH)/subfooter.kmk
|
---|
157 |
|
---|