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