Make RtlpGetRegistryHandle() a local helper function.
[reactos.git] / reactos / Makefile
1 # $Id: Makefile,v 1.174 2003/10/07 07:47:21 gvg Exp $
2 #
3 # Global makefile
4 #
5
6 PATH_TO_TOP = .
7
8 #
9 # Define to build ReactOS external targets
10 #
11 ifeq ($(ROS_BUILD_EXT),)
12 ROS_BUILD_EXT = no
13 else
14 ROS_BUILD_EXT = yes
15 endif
16
17 include $(PATH_TO_TOP)/rules.mak
18
19 # Required to run the system
20 COMPONENTS = iface_native iface_additional hallib ntoskrnl
21
22 # Hardware Abstraction Layers
23 # halx86
24 HALS = halx86
25
26 # Bus drivers
27 # acpi isapnp pci
28 BUS = acpi isapnp pci
29
30 # Filesystem libraries
31 # vfatlib
32 LIB_FSLIB = vfatlib
33
34 # Static libraries
35 LIB_STATIC = string rosrtl epsapi zlib
36
37 # User mode libraries
38 # advapi32 cards crtdll fmifs gdi32 kernel32 libpcap packet msafd msvcrt ntdll
39 # epsapi psapi richedit rpcrt4 secur32 user32 version ws2help ws2_32 wsock32 wshirda mswsock
40 DLLS = advapi32 cards crtdll fmifs freetype gdi32 kernel32 packet lzexpand msafd \
41 msvcrt ntdll psapi richedit secur32 syssetup twain user32 version winedbgc \
42 winspool ws2help ws2_32 wsock32 wshirda iphlpapi kbdus mswsock msimg32
43
44 SUBSYS = smss win32k csrss ntvdm
45
46 #
47 # Select the server(s) you want to build
48 #
49 #SERVERS = posix linux os2
50 SERVERS = win32
51
52 # Boot loaders
53 # dos
54 LOADERS = dos
55
56 # Driver support libraries
57 #bzip2 zlib
58 DRIVERS_LIB = bzip2
59
60 # Kernel mode device drivers
61 # Obsolete: ide
62 # beep blue floppy null parallel ramdrv serenum serial vga videoprt
63 DEVICE_DRIVERS = beep blue debugout floppy null serial vga videoprt bootvid
64
65 # Kernel mode input drivers
66 INPUT_DRIVERS = keyboard mouclass psaux sermouse
67
68 # Kernel mode file system drivers
69 # cdfs ext2 fs_rec ms np vfat
70 FS_DRIVERS = cdfs fs_rec ms np vfat mup ntfs
71
72 # Kernel mode networking drivers
73 # afd ndis npf tcpip tdi wshtcpip
74 NET_DRIVERS = afd ndis npf tcpip tdi wshtcpip
75
76 # Kernel mode networking device drivers
77 # ne2000 pcnet
78 NET_DEVICE_DRIVERS = ne2000 pcnet
79
80 # Kernel mode storage drivers
81 # atapi cdrom class2 disk scsiport
82 STORAGE_DRIVERS = atapi cdrom class2 disk scsiport diskdump
83
84 # System applications
85 # autochk cmd format gstart services setup usetup welcome winlogon
86 SYS_APPS = autochk cmd format gstart services setup usetup welcome winlogon
87
88 # System services
89 # rpcss eventlog
90 SYS_SVC = rpcss eventlog
91
92 APPS = tests testsets utils
93
94
95 # External (sub)systems for ReactOS
96 # rosapps wine posix os2 (requires c++) java (non-existant)
97 EXTERNALS = rosapps wine posix os2
98
99 ifeq ($(ROS_BUILD_EXT),yes)
100 EXT_MODULES = $(EXTERNALS)
101 else
102 EXT_MODULES =
103 endif
104
105 KERNEL_DRIVERS = $(DRIVERS_LIB) $(DEVICE_DRIVERS) $(INPUT_DRIVERS) $(FS_DRIVERS) \
106 $(NET_DRIVERS) $(NET_DEVICE_DRIVERS) $(STORAGE_DRIVERS)
107
108 # Regression tests
109 REGTESTS = regtests
110
111 all: tools dk implib $(LIB_STATIC) $(COMPONENTS) $(HALS) $(BUS) $(LIB_FSLIB) $(DLLS) $(SUBSYS) \
112 $(LOADERS) $(KERNEL_DRIVERS) $(SYS_APPS) $(SYS_SVC) \
113 $(APPS) $(EXT_MODULES) $(REGTESTS)
114
115 #config: $(TOOLS:%=%_config)
116
117 depends: $(LIB_STATIC:%=%_depends) $(LIB_FSLIB:%=%_depends) $(DLLS:%=%_depends) $(SUBSYS:%=%_depends) $(SYS_SVC:%=%_depends) \
118 $(EXT_MODULES:%=%_depends) $(POSIX_LIBS:%=%_depends)
119
120 implib: $(COMPONENTS:%=%_implib) $(HALS:%=%_implib) $(BUS:%=%_implib) \
121 $(LIB_STATIC:%=%_implib) $(LIB_FSLIB:%=%_implib) $(DLLS:%=%_implib) $(LOADERS:%=%_implib) \
122 $(KERNEL_DRIVERS:%=%_implib) $(SUBSYS:%=%_implib) \
123 $(SYS_APPS:%=%_implib) $(SYS_SVC:%=%_implib) \
124 $(APPS:%=%_implib) $(EXT_MODULES:%=%_implib)
125
126 clean: tools dk_clean $(HALS:%=%_clean) \
127 $(COMPONENTS:%=%_clean) $(BUS:%=%_clean) $(LIB_STATIC:%=%_clean) $(LIB_FSLIB:%=%_clean) $(DLLS:%=%_clean) \
128 $(LOADERS:%=%_clean) $(KERNEL_DRIVERS:%=%_clean) $(SUBSYS:%=%_clean) \
129 $(SYS_APPS:%=%_clean) $(SYS_SVC:%=%_clean) \
130 $(NET_APPS:%=%_clean) \
131 $(APPS:%=%_clean) $(EXT_MODULES:%=%_clean) $(REGTESTS:%=%_clean) \
132 clean_after tools_clean
133
134 clean_after:
135 $(RM) $(PATH_TO_TOP)/include/roscfg.h
136
137 install: tools install_dirs install_before \
138 $(COMPONENTS:%=%_install) $(HALS:%=%_install) $(BUS:%=%_install) \
139 $(LIB_STATIC:%=%_install) $(LIB_FSLIB:%=%_install) $(DLLS:%=%_install) $(LOADERS:%=%_install) \
140 $(KERNEL_DRIVERS:%=%_install) $(SUBSYS:%=%_install) \
141 $(SYS_APPS:%=%_install) $(SYS_SVC:%=%_install) \
142 $(APPS:%=%_install) $(EXT_MODULES:%=%_install) $(REGTESTS:%=%_install)
143
144 dist: $(TOOLS_PATH)/rcopy$(EXE_POSTFIX) dist_clean dist_dirs \
145 $(HALS:%=%_dist) $(COMPONENTS:%=%_dist) $(BUS:%=%_dist) $(LIB_STATIC:%=%_dist) $(LIB_FSLIB:%=%_dist) \
146 $(DLLS:%=%_dist) $(LOADERS:%=%_dist) $(KERNEL_DRIVERS:%=%_dist) $(SUBSYS:%=%_dist) \
147 $(SYS_APPS:%=%_dist) $(SYS_SVC:%=%_dist) \
148 $(NET_APPS:%=%_dist) \
149 $(APPS:%=%_dist) $(EXT_MODULES:%=%_dist)
150
151 FREELDR_DIR = ../freeldr
152
153 freeldr:
154 $(MAKE) -C $(FREELDR_DIR)
155
156 bootcd_directory_layout: freeldr
157 $(RMKDIR) $(BOOTCD_DIR)
158 $(RMKDIR) $(BOOTCD_DIR)/bootdisk
159 $(RMKDIR) $(BOOTCD_DIR)/loader
160 $(RMKDIR) $(BOOTCD_DIR)/reactos
161 $(RMKDIR) $(BOOTCD_DIR)/reactos/system32
162 $(CP) ${FREELDR_DIR}/bootsect/isoboot.bin ${BOOTCD_DIR}/../isoboot.bin
163 $(CP) ${FREELDR_DIR}/bootsect/dosmbr.bin ${BOOTCD_DIR}/loader/dosmbr.bin
164 $(CP) ${FREELDR_DIR}/bootsect/ext2.bin ${BOOTCD_DIR}/loader/ext2.bin
165 $(CP) ${FREELDR_DIR}/bootsect/fat.bin ${BOOTCD_DIR}/loader/fat.bin
166 $(CP) ${FREELDR_DIR}/bootsect/fat32.bin ${BOOTCD_DIR}/loader/fat32.bin
167 $(CP) ${FREELDR_DIR}/bootsect/isoboot.bin ${BOOTCD_DIR}/loader/isoboot.bin
168 $(CP) ${FREELDR_DIR}/freeldr/obj/i386/freeldr.sys ${BOOTCD_DIR}/loader/freeldr.sys
169 $(CP) ${FREELDR_DIR}/FREELDR.INI ${BOOTCD_DIR}/loader/freeldr.ini
170 $(CP) ${FREELDR_DIR}/freeldr/obj/i386/setupldr.sys ${BOOTCD_DIR}/loader/setupldr.sys
171
172 bootcd_bootstrap_files: $(COMPONENTS:%=%_bootcd) $(HALS:%=%_bootcd) $(BUS:%=%_bootcd) \
173 $(LIB_STATIC:%=%_bootcd) $(LIB_FSLIB:%=%_bootcd) $(DLLS:%=%_bootcd) $(KERNEL_DRIVERS:%=%_bootcd) \
174 $(SUBSYS:%=%_bootcd) $(SYS_APPS:%=%_bootcd)
175
176 bootcd_install_before:
177 $(RLINE) bootdata/autorun.inf $(BOOTCD_DIR)/autorun.inf
178 $(RLINE) bootdata/readme.txt $(BOOTCD_DIR)/readme.txt
179 $(RLINE) bootdata/hivecls.inf $(BOOTCD_DIR)/reactos/hivecls.inf
180 $(RLINE) bootdata/hivedef.inf $(BOOTCD_DIR)/reactos/hivedef.inf
181 $(RLINE) bootdata/hivesft.inf $(BOOTCD_DIR)/reactos/hivesft.inf
182 $(RLINE) bootdata/hivesys.inf $(BOOTCD_DIR)/reactos/hivesys.inf
183 $(RLINE) bootdata/txtsetup.sif $(BOOTCD_DIR)/reactos/txtsetup.sif
184 $(CP) bootdata/icon.ico $(BOOTCD_DIR)/icon.ico
185 $(CP) media/nls/c_1252.nls $(BOOTCD_DIR)/reactos/c_1252.nls
186 $(CP) media/nls/c_437.nls $(BOOTCD_DIR)/reactos/c_437.nls
187 $(CP) media/nls/l_intl.nls $(BOOTCD_DIR)/reactos/l_intl.nls
188
189 bootcd_basic: all bootcd_directory_layout bootcd_bootstrap_files bootcd_install_before
190
191 bootcd_makecd:
192 $(CABMAN) /C bootdata/packages/reactos.dff /L $(BOOTCD_DIR)/reactos /I
193 $(CABMAN) /C bootdata/packages/reactos.dff /RC $(BOOTCD_DIR)/reactos/reactos.inf /L $(BOOTCD_DIR)/reactos /N
194 - $(RM) $(BOOTCD_DIR)/reactos/reactos.inf
195 $(TOOLS_PATH)/cdmake/cdmake -v -m -b $(BOOTCD_DIR)/../isoboot.bin $(BOOTCD_DIR) REACTOS ReactOS.iso
196
197 ubootcd_unattend:
198 $(CP) bootdata/unattend.inf $(BOOTCD_DIR)/reactos/unattend.inf
199
200 bootcd: bootcd_basic bootcd_makecd
201
202 ubootcd: bootcd_basic ubootcd_unattend bootcd_makecd
203
204 registry: tools
205 $(TOOLS_PATH)/mkhive/mkhive$(EXE_POSTFIX) bootdata $(INSTALL_DIR)/system32/config
206
207 .PHONY: all depends implib clean clean_before install dist freeldr bootcd_directory_layout \
208 bootcd_bootstrap_files bootcd_install_before bootcd_basic bootcd_makecd ubootcd_unattend bootcd
209
210
211 #
212 # System Applications
213 #
214 $(SYS_APPS): %:
215 $(MAKE) -C subsys/system/$*
216
217 $(SYS_APPS:%=%_implib): %_implib:
218 $(MAKE) -C subsys/system/$* implib
219
220 $(SYS_APPS:%=%_clean): %_clean:
221 $(MAKE) -C subsys/system/$* clean
222
223 $(SYS_APPS:%=%_dist): %_dist:
224 $(MAKE) -C subsys/system/$* dist
225
226 $(SYS_APPS:%=%_install): %_install:
227 $(MAKE) -C subsys/system/$* install
228
229 $(SYS_APPS:%=%_bootcd): %_bootcd:
230 $(MAKE) -C subsys/system/$* bootcd
231
232 .PHONY: $(SYS_APPS) $(SYS_APPS:%=%_implib) $(SYS_APPS:%=%_clean) $(SYS_APPS:%=%_install) $(SYS_APPS:%=%_dist) $(SYS_APPS:%=%_bootcd)
233
234 #
235 # System Services
236 #
237 $(SYS_SVC): %:
238 $(MAKE) -C services/$*
239
240 $(SYS_SVC:%=%_depends): %_depends:
241 $(MAKE) -C services/$* depends
242
243 $(SYS_SVC:%=%_implib): %_implib:
244 $(MAKE) -C services/$* implib
245
246 $(SYS_SVC:%=%_clean): %_clean:
247 $(MAKE) -C services/$* clean
248
249 $(SYS_SVC:%=%_dist): %_dist:
250 $(MAKE) -C services/$* dist
251
252 $(SYS_SVC:%=%_install): %_install:
253 $(MAKE) -C services/$* install
254
255 .PHONY: $(SYS_SVC) $(SYS_SVC:%=%_depends) $(SYS_SVC:%=%_implib) $(SYS_SVC:%=%_clean) $(SYS_SVC:%=%_install) $(SYS_SVC:%=%_dist)
256
257
258 #
259 # Applications
260 #
261 #
262 # Extra (optional system) Applications
263 #
264 $(APPS): %:
265 $(MAKE) -C apps/$*
266
267 $(APPS:%=%_implib): %_implib:
268 $(MAKE) -C apps/$* implib
269
270 $(APPS:%=%_clean): %_clean:
271 $(MAKE) -C apps/$* clean
272
273 $(APPS:%=%_dist): %_dist:
274 $(MAKE) -C apps/$* dist
275
276 $(APPS:%=%_install): %_install:
277 $(MAKE) -C apps/$* install
278
279 .PHONY: $(APPS) $(APPS:%=%_implib) $(APPS:%=%_clean) $(APPS:%=%_install) $(APPS:%=%_dist)
280
281
282 #
283 # External ports and subsystem personalities
284 #
285 $(EXTERNALS): %:
286 $(MAKE) -C $(ROOT_PATH)/$*
287
288 $(EXTERNALS:%=%_depends): %_depends:
289 $(MAKE) -C $(ROOT_PATH)/$* depends
290
291 $(EXTERNALS:%=%_implib): %_implib:
292 $(MAKE) -C $(ROOT_PATH)/$* implib
293
294 $(EXTERNALS:%=%_clean): %_clean:
295 $(MAKE) -C $(ROOT_PATH)/$* clean
296
297 $(EXTERNALS:%=%_dist): %_dist:
298 $(MAKE) -C $(ROOT_PATH)/$* dist
299
300 $(EXTERNALS:%=%_install): %_install:
301 $(MAKE) -C $(ROOT_PATH)/$* install
302
303 .PHONY: $(EXTERNALS) $(EXTERNALS:%=%_depends) $(EXTERNALS:%=%_implib) $(EXTERNALS:%=%_clean) $(EXTERNALS:%=%_install) $(EXTERNALS:%=%_dist)
304
305
306 #
307 # Tools
308 #
309 tools:
310 $(MAKE) -C tools
311
312 tools_implib:
313
314 tools_clean:
315 $(MAKE) -C tools clean
316
317 tools_install:
318
319 tools_dist:
320
321 .PHONY: tools tools_implib tools_clean tools_install tools_dist
322
323
324 #
325 # Developer Kits
326 #
327 dk:
328 $(RMKDIR) $(DK_PATH)
329 $(RMKDIR) $(DDK_PATH)
330 $(RMKDIR) $(DDK_PATH_LIB)
331 $(RMKDIR) $(DDK_PATH_INC)
332 $(RMKDIR) $(SDK_PATH)
333 $(RMKDIR) $(SDK_PATH_LIB)
334 $(RMKDIR) $(SDK_PATH_INC)
335 $(RMKDIR) $(XDK_PATH)
336 $(RMKDIR) $(XDK_PATH_LIB)
337 $(RMKDIR) $(XDK_PATH_INC)
338
339 dk_implib:
340
341 # WARNING! Be very sure that there are no important files
342 # in these directories before cleaning them!!!
343 dk_clean:
344 $(RM) $(DDK_PATH_LIB)/*.a
345 # $(RM) $(DDK_PATH_INC)/*.h
346 $(RMDIR) $(DDK_PATH_LIB)
347 # $(RMDIR) $(DDK_PATH_INC)
348 $(RM) $(SDK_PATH_LIB)/*.a
349 # $(RM) $(SDK_PATH_INC)/*.h
350 $(RMDIR) $(SDK_PATH_LIB)
351 # $(RMDIR) $(SDK_PATH_INC)
352 $(RM) $(XDK_PATH_LIB)/*.a
353 # $(RM) $(XDK_PATH_INC)/*.h
354 $(RMDIR) $(XDK_PATH_LIB)
355 # $(RMDIR) $(XDK_PATH_INC)
356
357 dk_install:
358
359 dk_dist:
360
361 .PHONY: dk dk_implib dk_clean dk_install dk_dist
362
363
364 #
365 # Interfaces
366 #
367 iface_native:
368 $(MAKE) -C iface/native
369
370 iface_native_implib:
371
372 iface_native_clean:
373 $(MAKE) -C iface/native clean
374
375 iface_native_install:
376
377 iface_native_dist:
378
379 iface_native_bootcd:
380
381 iface_additional:
382 $(MAKE) -C iface/addsys
383
384 iface_additional_implib:
385
386 iface_additional_clean:
387 $(MAKE) -C iface/addsys clean
388
389 iface_additional_install:
390
391 iface_additional_dist:
392
393 iface_additional_bootcd:
394
395 .PHONY: iface_native iface_native_implib iface_native_clean iface_native_install \
396 iface_native_dist iface_native_bootcd \
397 iface_additional iface_additional_implib iface_additional_clean \
398 iface_additional_install iface_additional_dist iface_additional_bootcd
399
400 #
401 # Bus driver rules
402 #
403 $(BUS): %:
404 $(MAKE) -C drivers/bus/$*
405
406 $(BUS:%=%_implib): %_implib:
407 $(MAKE) -C drivers/bus/$* implib
408
409 $(BUS:%=%_clean): %_clean:
410 $(MAKE) -C drivers/bus/$* clean
411
412 $(BUS:%=%_install): %_install:
413 $(MAKE) -C drivers/bus/$* install
414
415 $(BUS:%=%_dist): %_dist:
416 $(MAKE) -C drivers/bus/$* dist
417
418 $(BUS:%=%_bootcd): %_bootcd:
419 $(MAKE) -C drivers/bus/$* bootcd
420
421 .PHONY: $(BUS) $(BUS:%=%_implib) $(BUS:%=%_clean) \
422 $(BUS:%=%_install) $(BUS:%=%_dist) $(BUS:%=%_bootcd)
423
424 #
425 # Driver support libraries rules
426 #
427 $(DRIVERS_LIB): %:
428 $(MAKE) -C drivers/lib/$*
429
430 $(DRIVERS_LIB:%=%_implib): %_implib:
431 $(MAKE) -C drivers/lib/$* implib
432
433 $(DRIVERS_LIB:%=%_clean): %_clean:
434 $(MAKE) -C drivers/lib/$* clean
435
436 $(DRIVERS_LIB:%=%_install): %_install:
437 $(MAKE) -C drivers/lib/$* install
438
439 $(DRIVERS_LIB:%=%_dist): %_dist:
440 $(MAKE) -C drivers/lib/$* dist
441
442 $(DRIVERS_LIB:%=%_bootcd): %_bootcd:
443 $(MAKE) -C drivers/lib/$* bootcd
444
445 .PHONY: $(DRIVERS_LIB) $(DRIVERS_LIB:%=%_implib) $(DRIVERS_LIB:%=%_clean) \
446 $(DRIVERS_LIB:%=%_install) $(DRIVERS_LIB:%=%_dist) $(DRIVERS_LIB:%=%_bootcd)
447
448 #
449 # Device driver rules
450 #
451 $(DEVICE_DRIVERS): %:
452 $(MAKE) -C drivers/dd/$*
453
454 $(DEVICE_DRIVERS:%=%_implib): %_implib:
455 $(MAKE) -C drivers/dd/$* implib
456
457 $(DEVICE_DRIVERS:%=%_clean): %_clean:
458 $(MAKE) -C drivers/dd/$* clean
459
460 $(DEVICE_DRIVERS:%=%_install): %_install:
461 $(MAKE) -C drivers/dd/$* install
462
463 $(DEVICE_DRIVERS:%=%_dist): %_dist:
464 $(MAKE) -C drivers/dd/$* dist
465
466 $(DEVICE_DRIVERS:%=%_bootcd): %_bootcd:
467 $(MAKE) -C drivers/dd/$* bootcd
468
469 .PHONY: $(DEVICE_DRIVERS) $(DEVICE_DRIVERS:%=%_implib) $(DEVICE_DRIVERS:%=%_clean) \
470 $(DEVICE_DRIVERS:%=%_install) $(DEVICE_DRIVERS:%=%_dist) $(DEVICE_DRIVERS:%=%_bootcd)
471
472 #
473 # Input driver rules
474 #
475 $(INPUT_DRIVERS): %:
476 $(MAKE) -C drivers/input/$*
477
478 $(INPUT_DRIVERS:%=%_implib): %_implib:
479 $(MAKE) -C drivers/input/$* implib
480
481 $(INPUT_DRIVERS:%=%_clean): %_clean:
482 $(MAKE) -C drivers/input/$* clean
483
484 $(INPUT_DRIVERS:%=%_install): %_install:
485 $(MAKE) -C drivers/input/$* install
486
487 $(INPUT_DRIVERS:%=%_dist): %_dist:
488 $(MAKE) -C drivers/input/$* dist
489
490 $(INPUT_DRIVERS:%=%_bootcd): %_bootcd:
491 $(MAKE) -C drivers/input/$* bootcd
492
493 .PHONY: $(INPUT_DRIVERS) $(INPUT_DRIVERS:%=%_implib) $(INPUT_DRIVERS:%=%_clean)\
494 $(INPUT_DRIVERS:%=%_install) $(INPUT_DRIVERS:%=%_dist) $(INPUT_DRIVERS:%=%_bootcd)
495
496 $(FS_DRIVERS): %:
497 $(MAKE) -C drivers/fs/$*
498
499 $(FS_DRIVERS:%=%_implib): %_implib:
500 $(MAKE) -C drivers/fs/$* implib
501
502 $(FS_DRIVERS:%=%_clean): %_clean:
503 $(MAKE) -C drivers/fs/$* clean
504
505 $(FS_DRIVERS:%=%_install): %_install:
506 $(MAKE) -C drivers/fs/$* install
507
508 $(FS_DRIVERS:%=%_dist): %_dist:
509 $(MAKE) -C drivers/fs/$* dist
510
511 $(FS_DRIVERS:%=%_bootcd): %_bootcd:
512 $(MAKE) -C drivers/fs/$* bootcd
513
514 .PHONY: $(FS_DRIVERS) $(FS_DRIVERS:%=%_implib) $(FS_DRIVERS:%=%_clean) \
515 $(FS_DRIVERS:%=%_install) $(FS_DRIVERS:%=%_dist) $(FS_DRIVERS:%=%_bootcd)
516
517 #
518 # Network driver rules
519 #
520 $(NET_DRIVERS): %:
521 $(MAKE) -C drivers/net/$*
522
523 $(NET_DRIVERS:%=%_implib): %_implib:
524 $(MAKE) -C drivers/net/$* implib
525
526 $(NET_DRIVERS:%=%_clean): %_clean:
527 $(MAKE) -C drivers/net/$* clean
528
529 $(NET_DRIVERS:%=%_install): %_install:
530 $(MAKE) -C drivers/net/$* install
531
532 $(NET_DRIVERS:%=%_dist): %_dist:
533 $(MAKE) -C drivers/net/$* dist
534
535 $(NET_DRIVERS:%=%_bootcd): %_bootcd:
536 $(MAKE) -C drivers/net/$* bootcd
537
538 .PHONY: $(NET_DRIVERS) $(NET_DRIVERS:%=%_implib) $(NET_DRIVERS:%=%_clean) \
539 $(NET_DRIVERS:%=%_install) $(NET_DRIVERS:%=%_dist) $(NET_DRIVERS:%=%_bootcd)
540
541 $(NET_DEVICE_DRIVERS): %:
542 $(MAKE) -C drivers/net/dd/$*
543
544 $(NET_DEVICE_DRIVERS:%=%_implib): %_implib:
545 $(MAKE) -C drivers/net/dd/$* implib
546
547 $(NET_DEVICE_DRIVERS:%=%_clean): %_clean:
548 $(MAKE) -C drivers/net/dd/$* clean
549
550 $(NET_DEVICE_DRIVERS:%=%_install): %_install:
551 $(MAKE) -C drivers/net/dd/$* install
552
553 $(NET_DEVICE_DRIVERS:%=%_dist): %_dist:
554 $(MAKE) -C drivers/net/dd/$* dist
555
556 $(NET_DEVICE_DRIVERS:%=%_bootcd): %_bootcd:
557 $(MAKE) -C drivers/net/dd/$* bootcd
558
559 .PHONY: $(NET_DEVICE_DRIVERS) $(NET_DEVICE_DRIVERS:%=%_clean) $(NET_DEVICE_DRIVERS:%=%_implib) \
560 $(NET_DEVICE_DRIVERS:%=%_install) $(NET_DEVICE_DRIVERS:%=%_dist) $(NET_DEVICE_DRIVERS:%=%_bootcd)
561
562 #
563 # storage driver rules
564 #
565 $(STORAGE_DRIVERS): %:
566 $(MAKE) -C drivers/storage/$*
567
568 $(STORAGE_DRIVERS:%=%_implib): %_implib:
569 $(MAKE) -C drivers/storage/$* implib
570
571 $(STORAGE_DRIVERS:%=%_clean): %_clean:
572 $(MAKE) -C drivers/storage/$* clean
573
574 $(STORAGE_DRIVERS:%=%_install): %_install:
575 $(MAKE) -C drivers/storage/$* install
576
577 $(STORAGE_DRIVERS:%=%_dist): %_dist:
578 $(MAKE) -C drivers/storage/$* dist
579
580 $(STORAGE_DRIVERS:%=%_bootcd): %_bootcd:
581 $(MAKE) -C drivers/storage/$* bootcd
582
583 .PHONY: $(STORAGE_DRIVERS) $(STORAGE_DRIVERS:%=%_clean) $(STORAGE_DRIVERS:%=%_implib) \
584 $(STORAGE_DRIVERS:%=%_install) $(STORAGE_DRIVERS:%=%_dist) $(STORAGE_DRIVERS:%=%_bootcd)
585
586 #
587 # Kernel loaders
588 #
589
590 $(LOADERS): %:
591 $(MAKE) -C loaders/$*
592
593 $(LOADERS:%=%_implib): %_implib:
594
595 $(LOADERS:%=%_clean): %_clean:
596 $(MAKE) -C loaders/$* clean
597
598 $(LOADERS:%=%_install): %_install:
599 $(MAKE) -C loaders/$* install
600
601 $(LOADERS:%=%_dist): %_dist:
602 $(MAKE) -C loaders/$* dist
603
604 .PHONY: $(LOADERS) $(LOADERS:%=%_implib) $(LOADERS:%=%_clean) $(LOADERS:%=%_install) \
605 $(LOADERS:%=%_dist)
606
607 #
608 # Required system components
609 #
610
611 ntoskrnl:
612 $(MAKE) -C ntoskrnl
613
614 ntoskrnl_implib:
615 $(MAKE) -C ntoskrnl implib
616
617 ntoskrnl_clean:
618 $(MAKE) -C ntoskrnl clean
619
620 ntoskrnl_install:
621 $(MAKE) -C ntoskrnl install
622
623 ntoskrnl_dist:
624 $(MAKE) -C ntoskrnl dist
625
626 ntoskrnl_bootcd:
627 $(MAKE) -C ntoskrnl bootcd
628
629 .PHONY: ntoskrnl ntoskrnl_implib ntoskrnl_clean ntoskrnl_install ntoskrnl_dist ntoskrnl_bootcd
630
631 #
632 # Hardware Abstraction Layer import library
633 #
634
635 hallib:
636 $(MAKE) -C hal/hal
637
638 hallib_implib:
639 $(MAKE) -C hal/hal implib
640
641 hallib_clean:
642 $(MAKE) -C hal/hal clean
643
644 hallib_install:
645 $(MAKE) -C hal/hal install
646
647 hallib_dist:
648 $(MAKE) -C hal/hal dist
649
650 hallib_bootcd:
651 $(MAKE) -C hal/hal bootcd
652
653 .PHONY: hallib hallib_implib hallib_clean hallib_install hallib_dist hallib_bootcd
654
655 #
656 # Hardware Abstraction Layers
657 #
658
659 $(HALS): %:
660 $(MAKE) -C hal/$*
661
662 $(HALS:%=%_implib): %_implib:
663 $(MAKE) -C hal/$* implib
664
665 $(HALS:%=%_clean): %_clean:
666 $(MAKE) -C hal/$* clean
667
668 $(HALS:%=%_install): %_install:
669 $(MAKE) -C hal/$* install
670
671 $(HALS:%=%_dist): %_dist:
672 $(MAKE) -C hal/$* dist
673
674 $(HALS:%=%_bootcd): %_bootcd:
675 $(MAKE) -C hal/$* bootcd
676
677 .PHONY: $(HALS) $(HALS:%=%_implib) $(HALS:%=%_clean) $(HALS:%=%_install) $(HALS:%=%_dist) $(HALS:%=%_bootcd)
678
679 #
680 # File system libraries
681 #
682
683 $(LIB_FSLIB): %:
684 $(MAKE) -C lib/fslib/$*
685
686 $(LIB_FSLIB:%=%_depends): %_depends:
687 $(MAKE) -C lib/fslib/$* depends
688
689 $(LIB_FSLIB:%=%_implib): %_implib:
690 $(MAKE) -C lib/fslib/$* implib
691
692 $(LIB_FSLIB:%=%_clean): %_clean:
693 $(MAKE) -C lib/fslib/$* clean
694
695 $(LIB_FSLIB:%=%_install): %_install:
696 $(MAKE) -C lib/fslib/$* install
697
698 $(LIB_FSLIB:%=%_dist): %_dist:
699 $(MAKE) -C lib/fslib/$* dist
700
701 $(LIB_FSLIB:%=%_bootcd): %_bootcd:
702 $(MAKE) -C lib/fslib/$* bootcd
703
704 .PHONY: $(LIB_FSLIB) $(LIB_FSLIB:%=%_depends) $(LIB_FSLIB:%=%_implib) $(LIB_FSLIB:%=%_clean) \
705 $(LIB_FSLIB:%=%_install) $(LIB_FSLIB:%=%_dist) $(LIB_FSLIB:%=%_bootcd)
706
707 #
708 # Static libraries
709 #
710
711 $(LIB_STATIC): %:
712 $(MAKE) -C lib/$*
713
714 $(LIB_STATIC:%=%_depends): %_depends:
715 $(MAKE) -C lib/string depends
716
717 $(LIB_STATIC:%=%_implib): %_implib:
718 $(MAKE) -C lib/$* implib
719
720 $(LIB_STATIC:%=%_clean): %_clean:
721 $(MAKE) -C lib/$* clean
722
723 $(LIB_STATIC:%=%_install): %_install:
724 $(MAKE) -C lib/$* install
725
726 $(LIB_STATIC:%=%_dist): %_dist:
727 $(MAKE) -C lib/$* dist
728
729 $(LIB_STATIC:%=%_bootcd): %_bootcd:
730 $(MAKE) -C lib/$* bootcd
731
732 .PHONY: $(LIB_STATIC) $(LIB_STATIC:%=%_depends) $(LIB_STATIC:%=%_implib) $(LIB_STATIC:%=%_clean) \
733 $(LIB_STATIC:%=%_install) $(LIB_STATIC:%=%_dist) $(LIB_STATIC:%=%_bootcd)
734
735 #
736 # Required DLLs
737 #
738
739 $(DLLS): %:
740 $(MAKE) -C lib/$*
741
742 $(DLLS:%=%_depends): %_depends:
743 $(MAKE) -C lib/$* depends
744
745 $(DLLS:%=%_implib): %_implib:
746 $(MAKE) -C lib/$* implib
747
748 $(DLLS:%=%_clean): %_clean:
749 $(MAKE) -C lib/$* clean
750
751 $(DLLS:%=%_install): %_install:
752 $(MAKE) -C lib/$* install
753
754 $(DLLS:%=%_dist): %_dist:
755 $(MAKE) -C lib/$* dist
756
757 $(DLLS:%=%_bootcd): %_bootcd:
758 $(MAKE) -C lib/$* bootcd
759
760 .PHONY: $(DLLS) $(DLLS:%=%_depends) $(DLLS:%=%_implib) $(DLLS:%=%_clean) $(DLLS:%=%_install) $(DLLS:%=%_dist) $(DLLS:%=%_bootcd)
761
762 #
763 # Subsystem support modules
764 #
765
766 $(SUBSYS): %:
767 $(MAKE) -C subsys/$*
768
769 $(SUBSYS:%=%_depends): %_depends:
770 $(MAKE) -C subsys/$* depends
771
772 $(SUBSYS:%=%_implib): %_implib:
773 $(MAKE) -C subsys/$* implib
774
775 $(SUBSYS:%=%_clean): %_clean:
776 $(MAKE) -C subsys/$* clean
777
778 $(SUBSYS:%=%_install): %_install:
779 $(MAKE) -C subsys/$* install
780
781 $(SUBSYS:%=%_dist): %_dist:
782 $(MAKE) -C subsys/$* dist
783
784 $(SUBSYS:%=%_bootcd): %_bootcd:
785 $(MAKE) -C subsys/$* bootcd
786
787 .PHONY: $(SUBSYS) $(SUBSYS:%=%_depends) $(SUBSYS:%=%_implib) $(SUBSYS:%=%_clean) $(SUBSYS:%=%_install) \
788 $(SUBSYS:%=%_dist) $(SUBSYS:%=%_bootcd)
789
790 #
791 # Regression testsuite
792 #
793
794 $(REGTESTS): %:
795 $(MAKE) -C regtests
796
797 $(REGTESTS:%=%_clean): %_clean:
798 $(MAKE) -C regtests clean
799
800 $(REGTESTS:%=%_install): %_install:
801 $(MAKE) -C regtests install
802
803 .PHONY: $(REGTESTS) $(REGTESTS:%=%_depends) $(SUBSYS:%=%_clean) $(REGTESTS:%=%_install)
804
805
806 #
807 # Create an installation
808 #
809
810 install_clean:
811 $(RM) $(INSTALL_DIR)/system32/drivers/*.*
812 $(RM) $(INSTALL_DIR)/system32/config/*.*
813 $(RM) $(INSTALL_DIR)/system32/*.*
814 $(RM) $(INSTALL_DIR)/symbols/*.*
815 $(RM) $(INSTALL_DIR)/media/fonts/*.*
816 $(RM) $(INSTALL_DIR)/media/*.*
817 $(RM) $(INSTALL_DIR)/bin/*.*
818 $(RM) $(INSTALL_DIR)/*.com
819 $(RM) $(INSTALL_DIR)/*.bat
820 $(RMDIR) $(INSTALL_DIR)/system32/drivers
821 $(RMDIR) $(INSTALL_DIR)/system32/config
822 $(RMDIR) $(INSTALL_DIR)/system32
823 $(RMDIR) $(INSTALL_DIR)/symbols
824 $(RMDIR) $(INSTALL_DIR)/media/fonts
825 $(RMDIR) $(INSTALL_DIR)/media
826 $(RMDIR) $(INSTALL_DIR)/bin
827 $(RMDIR) $(INSTALL_DIR)
828
829 ifneq ($(BOOTCD_INSTALL),)
830
831 install_dirs:
832 $(RMKDIR) $(INSTALL_DIR)
833
834 install_before:
835 $(RLINE) bootdata/autorun.inf $(INSTALL_DIR)/../autorun.inf
836 $(RLINE) bootdata/readme.txt $(INSTALL_DIR)/../readme.txt
837 $(RLINE) bootdata/hivecls.inf $(INSTALL_DIR)/hivecls.inf
838 $(RLINE) bootdata/hivedef.inf $(INSTALL_DIR)/hivedef.inf
839 $(RLINE) bootdata/hivesft.inf $(INSTALL_DIR)/hivesft.inf
840 $(RLINE) bootdata/hivesys.inf $(INSTALL_DIR)/hivesys.inf
841 $(RLINE) bootdata/txtsetup.sif $(INSTALL_DIR)/txtsetup.sif
842 $(CP) bootdata/icon.ico $(INSTALL_DIR)/../icon.ico
843 $(CP) media/fonts $(INSTALL_DIR)
844 $(CP) media/nls $(INSTALL_DIR)
845
846 else # !BOOTCD_INSTALL
847
848 install_dirs:
849 $(RMKDIR) $(INSTALL_DIR)
850 $(RMKDIR) $(INSTALL_DIR)/bin
851 $(RMKDIR) $(INSTALL_DIR)/media
852 $(RMKDIR) $(INSTALL_DIR)/media/fonts
853 $(RMKDIR) $(INSTALL_DIR)/symbols
854 $(RMKDIR) $(INSTALL_DIR)/system32
855 $(RMKDIR) $(INSTALL_DIR)/system32/config
856 $(RMKDIR) $(INSTALL_DIR)/system32/drivers
857
858 install_before:
859 $(CP) bootc.lst $(INSTALL_DIR)/bootc.lst
860 $(CP) boot.bat $(INSTALL_DIR)/boot.bat
861 $(CP) aboot.bat $(INSTALL_DIR)/aboot.bat
862 $(CP) media/fonts $(INSTALL_DIR)/media/fonts
863 $(CP) media/nls $(INSTALL_DIR)/system32
864 $(CP) media/nls/c_1252.nls $(INSTALL_DIR)/system32/ansi.nls
865 $(CP) media/nls/c_437.nls $(INSTALL_DIR)/system32/oem.nls
866 $(CP) media/nls/l_intl.nls $(INSTALL_DIR)/system32/casemap.nls
867
868 endif # BOOTCD_INSTALL
869
870 .PHONY: install_clean install_dirs install_before
871
872
873 #
874 # Make a distribution saveset
875 #
876
877 dist_clean:
878 $(RM) $(DIST_DIR)/symbols/*.sym
879 $(RM) $(DIST_DIR)/drivers/*.sys
880 $(RM) $(DIST_DIR)/subsys/*.exe
881 $(RM) $(DIST_DIR)/dlls/*.dll
882 $(RM) $(DIST_DIR)/apps/*.exe
883 $(RM) $(DIST_DIR)/*.exe
884 $(RMDIR) $(DIST_DIR)/symbols
885 $(RMDIR) $(DIST_DIR)/subsys
886 $(RMDIR) $(DIST_DIR)/drivers
887 $(RMDIR) $(DIST_DIR)/dlls
888 $(RMDIR) $(DIST_DIR)/apps
889 $(RMDIR) $(DIST_DIR)
890
891 dist_dirs:
892 $(RMKDIR) $(DIST_DIR)
893 $(RMKDIR) $(DIST_DIR)/apps
894 $(RMKDIR) $(DIST_DIR)/dlls
895 $(RMKDIR) $(DIST_DIR)/drivers
896 $(RMKDIR) $(DIST_DIR)/subsys
897 $(RMKDIR) $(DIST_DIR)/symbols
898
899 .PHONY: dist_clean dist_dirs
900
901 etags:
902 find . -name "*.[ch]" -print | etags --language=c -
903
904 # EOF
905