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