Progress with opening and closing handles to SCM.
[reactos.git] / reactos / Makefile
1 #
2 # Global makefile
3 #
4
5 PATH_TO_TOP = .
6
7 #
8 # Define to build WINE modules
9 #
10 ifeq ($(ROS_BUILD_WINE),)
11 ROS_BUILD_WINE = no
12 else
13 ROS_BUILD_WINE = yes
14 endif
15
16 include $(PATH_TO_TOP)/rules.mak
17
18 # Required to run the system
19 COMPONENTS = iface_native iface_additional hallib ntoskrnl
20
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 # User mode libraries
31 # advapi32 crtdll fmifs gdi32 kernel32 libpcap packet msafd msvcrt ntdll ole32
32 # oleaut32 psapi rpcrt4 secur32 shell32 user32 version ws2help ws2_32 wsock32 wshirda
33 DLLS = advapi32 crtdll fmifs gdi32 kernel32 packet msafd msvcrt ntdll \
34 secur32 user32 version winmm ws2help ws2_32 wshirda
35 SUBSYS = smss win32k csrss
36
37 #
38 # Select the server(s) you want to build
39 #
40 #SERVERS = posix linux os2
41 SERVERS = win32
42
43 # Boot loaders
44 # dos
45 LOADERS = dos
46
47 # Driver support libraries
48 #bzip2 zlib
49 DRIVERS_LIB = bzip2 zlib
50
51 # Kernel mode device drivers
52 # Obsolete: ide
53 # beep blue floppy null parallel ramdrv serenum serial vga vidport
54 DEVICE_DRIVERS = beep blue floppy null serial vga vidport
55
56 # Kernel mode input drivers
57 # keyboard mouclass psaux sermouse
58 INPUT_DRIVERS = keyboard mouclass psaux
59
60 # Kernel mode file system drivers
61 # cdfs ext2 fs_rec ms np vfat
62 FS_DRIVERS = cdfs fs_rec ms np vfat mup ntfs
63
64 # Kernel mode networking drivers
65 # afd ndis packet tcpip tdi wshtcpip
66 NET_DRIVERS = afd ndis packet tcpip tdi wshtcpip
67
68 # Kernel mode networking device drivers
69 # ne2000
70 NET_DEVICE_DRIVERS = ne2000
71
72 # Kernel mode storage drivers
73 # atapi cdrom class2 disk scsiport
74 STORAGE_DRIVERS = atapi cdrom class2 disk scsiport
75
76 # System applications
77 # autochk lsass services shell winlogon
78 SYS_APPS = autochk services shell winlogon gstart usetup
79
80 # System services
81 # rpcss eventlog
82 SYS_SVC = rpcss eventlog
83
84 # Test applications
85 # alive apc args atomtest bench consume count dump_shared_data
86 # event file gditest hello isotest lpc mstest mutex nptest
87 # pteb regtest sectest shm simple thread vmtest winhello
88 TEST_APPS = alive apc args atomtest bench consume count dump_shared_data \
89 event file gditest hello isotest lpc mstest mutex nptest \
90 pteb regtest sectest shm simple thread tokentest vmtest winhello dibtest
91
92 # Test applications
93 # cabman cat net objdir partinfo pice ps stats
94 UTIL_APPS = cat objdir partinfo stats
95
96 #
97 # Win32 Subsystem support (Based on WINE)
98 # FIXME: Move to this its own Makefile
99 #
100
101 WINE_OTHER = unicode library
102
103 WINE_TOOLS = bin2res wrc winebuild
104
105 WINE_DLLS = comcat crtdll comctl32 commdlg dsound dplayx imagehlp ole32 richedit \
106 shlwapi shell32 shdocvw twain wininet urlmon winspool \
107 rpcrt4 mapi32 oleaut32 oledlg olepro32 olecli olesvr shfolder
108
109 #rpcrt4 mapi32 # needed to make rcprt4 implib
110
111 # winmm ddraw dinput dplay serialui tapi32 wintrust
112 # msinfo lzexpand (missing imports)
113
114 WINE_PROGS = control expand osversioncheck regedit regsvr32 winver
115 # uninstaller
116 # (waiting on wrc fix for the rest of these)
117 # clock cmdlgtst notepad progman wcmd
118 # winefile winemine winetest uninstaller
119
120
121 ifeq ($(ROS_BUILD_WINE),yes)
122 WINE_MODULES = $(WINE_OTHER) $(WINE_TOOLS) $(WINE_DLLS) $(WINE_PROGS)
123 else
124 WINE_MODULES =
125 endif
126
127 KERNEL_DRIVERS = $(DRIVERS_LIB) $(DEVICE_DRIVERS) $(INPUT_DRIVERS) $(FS_DRIVERS) \
128 $(NET_DRIVERS) $(NET_DEVICE_DRIVERS) $(STORAGE_DRIVERS)
129
130 all: tools dk implib $(COMPONENTS) $(HALS) $(BUS) $(DLLS) $(SUBSYS) \
131 $(LOADERS) $(KERNEL_DRIVERS) $(SYS_APPS) $(SYS_SVC) $(TEST_APPS) \
132 $(UTIL_APPS) $(WINE_MODULES)
133
134 implib: $(COMPONENTS:%=%_implib) $(HALS:%=%_implib) $(BUS:%=%_implib) \
135 $(DLLS:%=%_implib) $(LOADERS:%=%_implib) \
136 $(KERNEL_DRIVERS:%=%_implib) $(SUBSYS:%=%_implib) \
137 $(SYS_APPS:%=%_implib) $(SYS_SVC:%=%_implib) \
138 $(TEST_APPS:%=%_implib) $(UTIL_APPS:%=%_implib) \
139 $(WINE_MODULES:%=%_implib)
140
141 clean: tools dk_clean $(HALS:%=%_clean) \
142 $(COMPONENTS:%=%_clean) $(BUS:%=%_clean) $(DLLS:%=%_clean) \
143 $(LOADERS:%=%_clean) $(KERNEL_DRIVERS:%=%_clean) $(SUBSYS:%=%_clean) \
144 $(SYS_APPS:%=%_clean) $(SYS_SVC:%=%_clean) $(TEST_APPS:%=%_clean) \
145 $(UTIL_APPS:%=%_clean) $(NET_APPS:%=%_clean) $(WINE_MODULES:%=%_clean) \
146 clean_after tools_clean
147
148 clean_after:
149 $(RM) $(PATH_TO_TOP)/include/roscfg.h
150
151 install: tools install_dirs install_before \
152 $(COMPONENTS:%=%_install) $(HALS:%=%_install) $(BUS:%=%_install) \
153 $(DLLS:%=%_install) $(LOADERS:%=%_install) \
154 $(KERNEL_DRIVERS:%=%_install) $(SUBSYS:%=%_install) \
155 $(SYS_APPS:%=%_install) $(SYS_SVC:%=%_install) \
156 $(TEST_APPS:%=%_install) $(UTIL_APPS:%=%_install) \
157 $(WINE_MODULES:%=%_install)
158
159 dist: $(TOOLS_PATH)/rcopy$(EXE_POSTFIX) dist_clean dist_dirs \
160 $(HALS:%=%_dist) $(COMPONENTS:%=%_dist) $(BUS:%=%_dist) $(DLLS:%=%_dist) \
161 $(LOADERS:%=%_dist) $(KERNEL_DRIVERS:%=%_dist) $(SUBSYS:%=%_dist) \
162 $(SYS_APPS:%=%_dist) $(SYS_SVC:%=%_dist) $(TEST_APPS:%=%_dist) \
163 $(UTIL_APPS:%=%_dist) $(NET_APPS:%=%_dist) $(WINE_MODULES:%=%_dist)
164
165 .PHONY: all implib clean clean_before install dist
166
167
168 #
169 # System Applications
170 #
171 $(SYS_APPS): %:
172 make -C subsys/system/$*
173
174 $(SYS_APPS:%=%_implib): %_implib:
175 make -C subsys/system/$* implib
176
177 $(SYS_APPS:%=%_clean): %_clean:
178 make -C subsys/system/$* clean
179
180 $(SYS_APPS:%=%_dist): %_dist:
181 make -C subsys/system/$* dist
182
183 $(SYS_APPS:%=%_install): %_install:
184 make -C subsys/system/$* install
185
186 .PHONY: $(SYS_APPS) $(SYS_APPS:%=%_implib) $(SYS_APPS:%=%_clean) $(SYS_APPS:%=%_install) $(SYS_APPS:%=%_dist)
187
188 #
189 # System Services
190 #
191 $(SYS_SVC): %:
192 make -C services/$*
193
194 $(SYS_SVC:%=%_implib): %_implib:
195 make -C services/$* implib
196
197 $(SYS_SVC:%=%_clean): %_clean:
198 make -C services/$* clean
199
200 $(SYS_SVC:%=%_dist): %_dist:
201 make -C services/$* dist
202
203 $(SYS_SVC:%=%_install): %_install:
204 make -C services/$* install
205
206 .PHONY: $(SYS_SVC) $(SYS_SVC:%=%_implib) $(SYS_SVC:%=%_clean) $(SYS_SVC:%=%_install) $(SYS_SVC:%=%_dist)
207
208
209 #
210 # Test Applications
211 #
212 $(TEST_APPS): %:
213 make -C apps/tests/$*
214
215 $(TEST_APPS:%=%_implib): %_implib:
216 make -C apps/tests/$* implib
217
218 $(TEST_APPS:%=%_clean): %_clean:
219 make -C apps/tests/$* clean
220
221 $(TEST_APPS:%=%_dist): %_dist:
222 make -C apps/tests/$* dist
223
224 $(TEST_APPS:%=%_install): %_install:
225 make -C apps/tests/$* install
226
227 .PHONY: $(TEST_APPS) $(TEST_APPS:%=%_implib) $(TEST_APPS:%=%_clean) $(TEST_APPS:%=%_install) $(TEST_APPS:%=%_dist)
228
229
230 #
231 # Utility Applications
232 #
233 $(UTIL_APPS): %:
234 make -C apps/utils/$*
235
236 $(UTIL_APPS:%=%_implib): %_implib:
237 make -C apps/utils/$* implib
238
239 $(UTIL_APPS:%=%_clean): %_clean:
240 make -C apps/utils/$* clean
241
242 $(UTIL_APPS:%=%_dist): %_dist:
243 make -C apps/utils/$* dist
244
245 $(UTIL_APPS:%=%_install): %_install:
246 make -C apps/utils/$* install
247
248 .PHONY: $(UTIL_APPS) $(UTIL_APPS:%=%_implib) $(UTIL_APPS:%=%_clean) $(UTIL_APPS:%=%_install) $(UTIL_APPS:%=%_dist)
249
250
251 #
252 # Other Wine Modules
253 #
254 $(WINE_OTHER): %:
255 make -f makefile.ros -C $(WINE_PATH)/$*
256
257 $(WINE_OTHER:%=%_implib): %_implib:
258 make -f makefile.ros -C $(WINE_PATH)/$* implib
259
260 $(WINE_OTHER:%=%_clean): %_clean:
261 make -f makefile.ros -C $(WINE_PATH)/$* clean
262
263 $(WINE_OTHER:%=%_dist): %_dist:
264 make -f makefile.ros -C $(WINE_PATH)/$* dist
265
266 $(WINE_OTHER:%=%_install): %_install:
267 make -f makefile.ros -C $(WINE_PATH)/$* install
268
269 .PHONY: $(WINE_OTHER) $(WINE_OTHER:%=%_implib) $(WINE_OTHER:%=%_clean) $(WINE_OTHER:%=%_install) $(WINE_OTHER:%=%_dist)
270
271
272 #
273 # Wine Tools
274 #
275 $(WINE_TOOLS): %:
276 make -f makefile.ros -C $(WINE_PATH)/tools/$*
277
278 $(WINE_TOOLS:%=%_implib): %_implib:
279 make -f makefile.ros -C $(WINE_PATH)/tools/$* implib
280
281 $(WINE_TOOLS:%=%_clean): %_clean:
282 make -f makefile.ros -C $(WINE_PATH)/tools/$* clean
283
284 $(WINE_TOOLS:%=%_dist): %_dist:
285 make -f makefile.ros -C $(WINE_PATH)/tools/$* dist
286
287 $(WINE_TOOLS:%=%_install): %_install:
288 make -f makefile.ros -C $(WINE_PATH)/tools/$* install
289
290 .PHONY: $(WINE_DLLS) $(WINE_DLLS:%=%_implib) $(WINE_DLLS:%=%_clean) $(WINE_DLLS:%=%_install) $(WINE_DLLS:%=%_dist)
291
292
293 #
294 # Wine DLLs
295 #
296 $(WINE_DLLS): %:
297 make -f makefile.ros -C $(WINE_PATH)/dlls/$*
298
299 $(WINE_DLLS:%=%_implib): %_implib:
300 make -f makefile.ros -C $(WINE_PATH)/dlls/$* implib
301
302 $(WINE_DLLS:%=%_clean): %_clean:
303 make -f makefile.ros -C $(WINE_PATH)/dlls/$* clean
304
305 $(WINE_DLLS:%=%_dist): %_dist:
306 make -f makefile.ros -C $(WINE_PATH)/dlls/$* dist
307
308 $(WINE_DLLS:%=%_install): %_install:
309 make -f makefile.ros -C $(WINE_PATH)/dlls/$* install
310
311 .PHONY: $(WINE_DLLS) $(WINE_DLLS:%=%_implib) $(WINE_DLLS:%=%_clean) $(WINE_DLLS:%=%_install) $(WINE_DLLS:%=%_dist)
312
313
314 #
315 # Wine programs
316 #
317 $(WINE_PROGS): %:
318 make -f makefile.ros -C $(WINE_PATH)/programs/$*
319
320 $(WINE_PROGS:%=%_implib): %_implib:
321 make -f makefile.ros -C $(WINE_PATH)/programs/$* implib
322
323 $(WINE_PROGS:%=%_clean): %_clean:
324 make -f makefile.ros -C $(WINE_PATH)/programs/$* clean
325
326 $(WINE_PROGS:%=%_dist): %_dist:
327 make -f makefile.ros -C $(WINE_PATH)/programs/$* dist
328
329 $(WINE_PROGS:%=%_install): %_install:
330 make -f makefile.ros -C $(WINE_PATH)/programs/$* install
331
332 .PHONY: $(WINE_PROGS) $(WINE_PROGS:%=%_implib) $(WINE_PROGS:%=%_clean) $(WINE_PROGS:%=%_install) $(WINE_PROGS:%=%_dist)
333
334
335 #
336 # Tools
337 #
338 tools:
339 make -C tools
340
341 tools_implib:
342
343 tools_clean:
344 make -C tools clean
345
346 tools_install:
347
348 tools_dist:
349
350 .PHONY: tools tools_implib tools_clean tools_install tools_dist
351
352
353 #
354 # Developer Kits
355 #
356 dk:
357 $(RMKDIR) $(DK_PATH)
358 $(RMKDIR) $(DDK_PATH)
359 $(RMKDIR) $(DDK_PATH_LIB)
360 $(RMKDIR) $(DDK_PATH_INC)
361 $(RMKDIR) $(SDK_PATH)
362 $(RMKDIR) $(SDK_PATH_LIB)
363 $(RMKDIR) $(SDK_PATH_INC)
364 $(RMKDIR) $(XDK_PATH)
365 $(RMKDIR) $(XDK_PATH_LIB)
366 $(RMKDIR) $(XDK_PATH_INC)
367
368 dk_implib:
369
370 # WARNING! Be very sure that there are no important files
371 # in these directories before cleaning them!!!
372 dk_clean:
373 $(RM) $(DDK_PATH_LIB)/*.a
374 # $(RM) $(DDK_PATH_INC)/*.h
375 $(RMDIR) $(DDK_PATH_LIB)
376 # $(RMDIR) $(DDK_PATH_INC)
377 $(RM) $(SDK_PATH_LIB)/*.a
378 # $(RM) $(SDK_PATH_INC)/*.h
379 $(RMDIR) $(SDK_PATH_LIB)
380 # $(RMDIR) $(SDK_PATH_INC)
381 $(RM) $(XDK_PATH_LIB)/*.a
382 # $(RM) $(XDK_PATH_INC)/*.h
383 $(RMDIR) $(XDK_PATH_LIB)
384 # $(RMDIR) $(XDK_PATH_INC)
385
386 dk_install:
387
388 dk_dist:
389
390 .PHONY: dk dk_implib dk_clean dk_install dk_dist
391
392
393 #
394 # Interfaces
395 #
396 iface_native:
397 make -C iface/native
398
399 iface_native_implib:
400
401 iface_native_clean:
402 make -C iface/native clean
403
404 iface_native_install:
405
406 iface_native_dist:
407
408 iface_additional:
409 make -C iface/addsys
410
411 iface_additional_implib:
412
413 iface_additional_clean:
414 make -C iface/addsys clean
415
416 iface_additional_install:
417
418 iface_additional_dist:
419
420 .PHONY: iface_native iface_native_implib iface_native_clean iface_native_install \
421 iface_native_dist \
422 iface_additional iface_additional_implib iface_additional_clean \
423 iface_additional_install iface_additional_dist
424
425 #
426 # Bus driver rules
427 #
428 $(BUS): %:
429 make -C drivers/bus/$*
430
431 $(BUS:%=%_implib): %_implib:
432 make -C drivers/bus/$* implib
433
434 $(BUS:%=%_clean): %_clean:
435 make -C drivers/bus/$* clean
436
437 $(BUS:%=%_install): %_install:
438 make -C drivers/bus/$* install
439
440 $(BUS:%=%_dist): %_dist:
441 make -C drivers/bus/$* dist
442
443 .PHONY: $(BUS) $(BUS:%=%_implib) $(BUS:%=%_clean) \
444 $(BUS:%=%_install) $(BUS:%=%_dist)
445
446 #
447 # Driver support libraries rules
448 #
449 $(DRIVERS_LIB): %:
450 make -C drivers/lib/$*
451
452 $(DRIVERS_LIB:%=%_implib): %_implib:
453 make -C drivers/lib/$* implib
454
455 $(DRIVERS_LIB:%=%_clean): %_clean:
456 make -C drivers/lib/$* clean
457
458 $(DRIVERS_LIB:%=%_install): %_install:
459 make -C drivers/lib/$* install
460
461 $(DRIVERS_LIB:%=%_dist): %_dist:
462 make -C drivers/lib/$* dist
463
464 .PHONY: $(DRIVERS_LIB) $(DRIVERS_LIB:%=%_implib) $(DRIVERS_LIB:%=%_clean) \
465 $(DRIVERS_LIB:%=%_install) $(DRIVERS_LIB:%=%_dist)
466
467 #
468 # Device driver rules
469 #
470 $(DEVICE_DRIVERS): %:
471 make -C drivers/dd/$*
472
473 $(DEVICE_DRIVERS:%=%_implib): %_implib:
474 make -C drivers/dd/$* implib
475
476 $(DEVICE_DRIVERS:%=%_clean): %_clean:
477 make -C drivers/dd/$* clean
478
479 $(DEVICE_DRIVERS:%=%_install): %_install:
480 make -C drivers/dd/$* install
481
482 $(DEVICE_DRIVERS:%=%_dist): %_dist:
483 make -C drivers/dd/$* dist
484
485 .PHONY: $(DEVICE_DRIVERS) $(DEVICE_DRIVERS:%=%_implib) $(DEVICE_DRIVERS:%=%_clean) \
486 $(DEVICE_DRIVERS:%=%_install) $(DEVICE_DRIVERS:%=%_dist)
487
488 #
489 # Input driver rules
490 #
491 $(INPUT_DRIVERS): %:
492 make -C drivers/input/$*
493
494 $(INPUT_DRIVERS:%=%_implib): %_implib:
495 make -C drivers/input/$* implib
496
497 $(INPUT_DRIVERS:%=%_clean): %_clean:
498 make -C drivers/input/$* clean
499
500 $(INPUT_DRIVERS:%=%_install): %_install:
501 make -C drivers/input/$* install
502
503 $(INPUT_DRIVERS:%=%_dist): %_dist:
504 make -C drivers/input/$* dist
505
506 .PHONY: $(INPUT_DRIVERS) $(INPUT_DRIVERS:%=%_implib) $(INPUT_DRIVERS:%=%_clean)\
507 $(INPUT_DRIVERS:%=%_install) $(INPUT_DRIVERS:%=%_dist)
508
509 $(FS_DRIVERS): %:
510 make -C drivers/fs/$*
511
512 $(FS_DRIVERS:%=%_implib): %_implib:
513 make -C drivers/fs/$* implib
514
515 $(FS_DRIVERS:%=%_clean): %_clean:
516 make -C drivers/fs/$* clean
517
518 $(FS_DRIVERS:%=%_install): %_install:
519 make -C drivers/fs/$* install
520
521 $(FS_DRIVERS:%=%_dist): %_dist:
522 make -C drivers/fs/$* dist
523
524 .PHONY: $(FS_DRIVERS) $(FS_DRIVERS:%=%_implib) $(FS_DRIVERS:%=%_clean) \
525 $(FS_DRIVERS:%=%_install) $(FS_DRIVERS:%=%_dist)
526
527 #
528 # Network driver rules
529 #
530 $(NET_DRIVERS): %:
531 make -C drivers/net/$*
532
533 $(NET_DRIVERS:%=%_implib): %_implib:
534 make -C drivers/net/$* implib
535
536 $(NET_DRIVERS:%=%_clean): %_clean:
537 make -C drivers/net/$* clean
538
539 $(NET_DRIVERS:%=%_install): %_install:
540 make -C drivers/net/$* install
541
542 $(NET_DRIVERS:%=%_dist): %_dist:
543 make -C drivers/net/$* dist
544
545 .PHONY: $(NET_DRIVERS) $(NET_DRIVERS:%=%_implib) $(NET_DRIVERS:%=%_clean) \
546 $(NET_DRIVERS:%=%_install) $(NET_DRIVERS:%=%_dist)
547
548 $(NET_DEVICE_DRIVERS): %:
549 make -C drivers/net/dd/$*
550
551 $(NET_DEVICE_DRIVERS:%=%_implib): %_implib:
552 make -C drivers/net/dd/$* implib
553
554 $(NET_DEVICE_DRIVERS:%=%_clean): %_clean:
555 make -C drivers/net/dd/$* clean
556
557 $(NET_DEVICE_DRIVERS:%=%_install): %_install:
558 make -C drivers/net/dd/$* install
559
560 $(NET_DEVICE_DRIVERS:%=%_dist): %_dist:
561 make -C drivers/net/dd/$* dist
562
563 .PHONY: $(NET_DEVICE_DRIVERS) $(NET_DEVICE_DRIVERS:%=%_clean) $(NET_DEVICE_DRIVERS:%=%_implib) \
564 $(NET_DEVICE_DRIVERS:%=%_install) $(NET_DEVICE_DRIVERS:%=%_dist)
565
566 #
567 # storage driver rules
568 #
569 $(STORAGE_DRIVERS): %:
570 make -C drivers/storage/$*
571
572 $(STORAGE_DRIVERS:%=%_implib): %_implib:
573 make -C drivers/storage/$* implib
574
575 $(STORAGE_DRIVERS:%=%_clean): %_clean:
576 make -C drivers/storage/$* clean
577
578 $(STORAGE_DRIVERS:%=%_install): %_install:
579 make -C drivers/storage/$* install
580
581 $(STORAGE_DRIVERS:%=%_dist): %_dist:
582 make -C drivers/storage/$* dist
583
584 .PHONY: $(STORAGE_DRIVERS) $(STORAGE_DRIVERS:%=%_clean) \
585 $(STORAGE_DRIVERS:%=%_install) $(STORAGE_DRIVERS:%=%_dist)
586
587 #
588 # Kernel loaders
589 #
590
591 $(LOADERS): %:
592 make -C loaders/$*
593
594 $(LOADERS:%=%_implib): %_implib:
595
596 $(LOADERS:%=%_clean): %_clean:
597 make -C loaders/$* clean
598
599 $(LOADERS:%=%_install): %_install:
600 make -C loaders/$* install
601
602 $(LOADERS:%=%_dist): %_dist:
603 make -C loaders/$* dist
604
605 .PHONY: $(LOADERS) $(LOADERS:%=%_implib) $(LOADERS:%=%_clean) $(LOADERS:%=%_install) \
606 $(LOADERS:%=%_dist)
607
608 #
609 # Required system components
610 #
611
612 ntoskrnl:
613 make -C ntoskrnl
614
615 ntoskrnl_implib:
616 make -C ntoskrnl implib
617
618 ntoskrnl_clean:
619 make -C ntoskrnl clean
620
621 ntoskrnl_install:
622 make -C ntoskrnl install
623
624 ntoskrnl_dist:
625 make -C ntoskrnl dist
626
627 .PHONY: ntoskrnl ntoskrnl_implib ntoskrnl_clean ntoskrnl_install ntoskrnl_dist
628
629 #
630 # Hardware Abstraction Layer import library
631 #
632
633 hallib:
634 make -C hal/hal
635
636 hallib_implib:
637 make -C hal/hal implib
638
639 hallib_clean:
640 make -C hal/hal clean
641
642 hallib_install:
643 make -C hal/hal install
644
645 hallib_dist:
646 make -C hal/hal dist
647
648 .PHONY: hallib hallib_implib hallib_clean hallib_install hallib_dist
649
650 #
651 # Hardware Abstraction Layers
652 #
653
654 $(HALS): %:
655 make -C hal/$*
656
657 $(HALS:%=%_implib): %_implib:
658 make -C hal/$* implib
659
660 $(HALS:%=%_clean): %_clean:
661 make -C hal/$* clean
662
663 $(HALS:%=%_install): %_install:
664 make -C hal/$* install
665
666 $(HALS:%=%_dist): %_dist:
667 make -C hal/$* dist
668
669 .PHONY: $(HALS) $(HALS:%=%_implib) $(HALS:%=%_clean) $(HALS:%=%_install) $(HALS:%=%_dist)
670
671 #
672 # Required DLLs
673 #
674
675 $(DLLS): %:
676 make -C lib/$*
677
678 $(DLLS:%=%_implib): %_implib:
679 make -C lib/$* implib
680
681 $(DLLS:%=%_clean): %_clean:
682 make -C lib/$* clean
683
684 $(DLLS:%=%_install): %_install:
685 make -C lib/$* install
686
687 $(DLLS:%=%_dist): %_dist:
688 make -C lib/$* dist
689
690 .PHONY: $(DLLS) $(DLLS:%=%_implib) $(DLLS:%=%_clean) $(DLLS:%=%_install) $(DLLS:%=%_dist)
691
692 #
693 # Subsystem support modules
694 #
695
696 $(SUBSYS): %:
697 make -C subsys/$*
698
699 $(SUBSYS:%=%_implib): %_implib:
700 make -C subsys/$* implib
701
702 $(SUBSYS:%=%_clean): %_clean:
703 make -C subsys/$* clean
704
705 $(SUBSYS:%=%_install): %_install:
706 make -C subsys/$* install
707
708 $(SUBSYS:%=%_dist): %_dist:
709 make -C subsys/$* dist
710
711 .PHONY: $(SUBSYS) $(SUBSYS:%=%_implib) $(SUBSYS:%=%_clean) $(SUBSYS:%=%_install) \
712 $(SUBSYS:%=%_dist)
713
714 #
715 # Create an installation
716 #
717
718 install_clean:
719 $(RM) $(INSTALL_DIR)/system32/drivers/*.*
720 $(RM) $(INSTALL_DIR)/system32/config/*.*
721 $(RM) $(INSTALL_DIR)/system32/*.*
722 $(RM) $(INSTALL_DIR)/symbols/*.*
723 $(RM) $(INSTALL_DIR)/media/fonts/*.*
724 $(RM) $(INSTALL_DIR)/media/*.*
725 $(RM) $(INSTALL_DIR)/bin/*.*
726 $(RM) $(INSTALL_DIR)/*.com
727 $(RM) $(INSTALL_DIR)/*.bat
728 $(RMDIR) $(INSTALL_DIR)/system32/drivers
729 $(RMDIR) $(INSTALL_DIR)/system32/config
730 $(RMDIR) $(INSTALL_DIR)/system32
731 $(RMDIR) $(INSTALL_DIR)/symbols
732 $(RMDIR) $(INSTALL_DIR)/media/fonts
733 $(RMDIR) $(INSTALL_DIR)/media
734 $(RMDIR) $(INSTALL_DIR)/bin
735 $(RMDIR) $(INSTALL_DIR)
736
737 install_dirs:
738 $(RMKDIR) $(INSTALL_DIR)
739 $(RMKDIR) $(INSTALL_DIR)/bin
740 $(RMKDIR) $(INSTALL_DIR)/media
741 $(RMKDIR) $(INSTALL_DIR)/media/fonts
742 $(RMKDIR) $(INSTALL_DIR)/symbols
743 $(RMKDIR) $(INSTALL_DIR)/system32
744 $(RMKDIR) $(INSTALL_DIR)/system32/config
745 $(RMKDIR) $(INSTALL_DIR)/system32/drivers
746
747 install_before:
748 $(CP) bootc.lst $(INSTALL_DIR)/bootc.lst
749 $(CP) boot.bat $(INSTALL_DIR)/boot.bat
750 $(CP) aboot.bat $(INSTALL_DIR)/aboot.bat
751 $(CP) system.hiv $(INSTALL_DIR)/system32/config/system.hiv
752 $(CP) media/fonts/helb____.ttf $(INSTALL_DIR)/media/fonts/helb____.ttf
753 $(CP) media/fonts/timr____.ttf $(INSTALL_DIR)/media/fonts/timr____.ttf
754
755 .PHONY: install_clean install_dirs install_before
756
757
758 #
759 # Make a distribution saveset
760 #
761
762 dist_clean:
763 $(RM) $(DIST_DIR)/symbols/*.sym
764 $(RM) $(DIST_DIR)/drivers/*.sys
765 $(RM) $(DIST_DIR)/subsys/*.exe
766 $(RM) $(DIST_DIR)/dlls/*.dll
767 $(RM) $(DIST_DIR)/apps/*.exe
768 $(RM) $(DIST_DIR)/*.exe
769 $(RMDIR) $(DIST_DIR)/symbols
770 $(RMDIR) $(DIST_DIR)/subsys
771 $(RMDIR) $(DIST_DIR)/drivers
772 $(RMDIR) $(DIST_DIR)/dlls
773 $(RMDIR) $(DIST_DIR)/apps
774 $(RMDIR) $(DIST_DIR)
775
776 dist_dirs:
777 $(RMKDIR) $(DIST_DIR)
778 $(RMKDIR) $(DIST_DIR)/apps
779 $(RMKDIR) $(DIST_DIR)/dlls
780 $(RMKDIR) $(DIST_DIR)/drivers
781 $(RMKDIR) $(DIST_DIR)/subsys
782 $(RMKDIR) $(DIST_DIR)/symbols
783
784 .PHONY: dist_clean dist_dirs
785
786
787 etags:
788 find . -name "*.[ch]" -print | etags --language=c -
789
790 # EOF
791