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