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