allow data from SYM files to be used in stack traces in DBG builds
[reactos.git] / reactos / Makefile
1 # $Id: Makefile,v 1.268 2004/12/09 06:04:40 sedwards 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/up halx86/mp
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 dxguid
42
43 # Keyboard layout libraries
44 DLLS_KBD = kbdda 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 hid imagehlp imm32 iphlpapi kernel32 lzexpand mesa32 midimap mmdrv mpr msacm msafd \
56 msgina msimg32 msvcrt20 msvideo mswsock netapi32 ntdll ole32 oleaut32 oledlg opengl32 packet psapi \
57 riched20 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 dinput dinput8 dsound \
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 msiexec
100 SYS_APPS = autochk calc cmd explorer expand format regedt32 regsvr32 \
101 services setup taskmgr userinit usetup welcome vmwinst winlogon \
102 regedit winefile
103
104 # System services
105 # rpcss eventlog
106 SYS_SVC = rpcss eventlog
107
108 APPS = testsets utils
109
110
111 # External modules and (sub)systems for ReactOS
112 # rosapps posix os2 (requires c++) java (non-existant)
113 EXTERNALS = rosapps
114
115 ifeq ($(ROS_BUILD_EXT),yes)
116 EXT_MODULES = $(EXTERNALS)
117 else
118 EXT_MODULES =
119 endif
120
121 KERNEL_DRIVERS = $(DRIVERS_LIB) $(DEVICE_DRIVERS) $(INPUT_DRIVERS) $(FS_DRIVERS) \
122 $(NET_DRIVERS) $(NET_DEVICE_DRIVERS) $(STORAGE_DRIVERS) VIDEO_DRIVERS
123
124 # Regression tests
125 REGTESTS = regtests
126
127 all: bootstrap $(COMPONENTS) $(REGTESTS) $(HALS) $(BUS) $(LIB_FSLIB) $(DLLS) $(SUBSYS) \
128 $(KERNEL_DRIVERS) $(SYS_APPS) $(SYS_SVC) \
129 $(APPS) $(EXT_MODULES)
130
131 bootstrap: dk implib iface_native iface_additional
132
133 #config: $(TOOLS:%=%_config)
134
135 depends: $(LIB_STATIC:%=%_depends) $(LIB_FSLIB:%=%_depends) msvcrt_depends $(DLLS:%=%_depends) \
136 $(SUBSYS:%=%_depends) $(SYS_SVC:%=%_depends) \
137 $(EXT_MODULES:%=%_depends) $(POSIX_LIBS:%=%_depends)
138
139 implib: hallib $(LIB_STATIC) $(COMPONENTS:%=%_implib) $(HALS:%=%_implib) $(BUS:%=%_implib) \
140 $(LIB_STATIC:%=%_implib) $(LIB_FSLIB:%=%_implib) msvcrt_implib $(DLLS:%=%_implib) \
141 $(KERNEL_DRIVERS:%=%_implib) $(SUBSYS:%=%_implib) \
142 $(SYS_APPS:%=%_implib) $(SYS_SVC:%=%_implib) $(EXT_MODULES:%=%_implib) \
143 $(REGTESTS:%=%_implib)
144
145 test: $(COMPONENTS:%=%_test) $(HALS:%=%_test) $(BUS:%=%_test) \
146 $(LIB_STATIC:%=%_test) $(LIB_FSLIB:%=%_test) msvcrt_test $(DLLS:%=%_test) \
147 $(KERNEL_DRIVERS:%=%_test) $(SUBSYS:%=%_test) \
148 $(SYS_SVC:%=%_test) $(EXT_MODULES:%=%_test)
149
150 clean: tools dk_clean iface_native_clean iface_additional_clean hallib_clean \
151 $(HALS:%=%_clean) $(COMPONENTS:%=%_clean) $(BUS:%=%_clean) \
152 $(LIB_STATIC:%=%_clean) $(LIB_FSLIB:%=%_clean) msvcrt_clean \
153 $(DLLS:%=%_clean) $(KERNEL_DRIVERS:%=%_clean) \
154 $(SUBSYS:%=%_clean) $(SYS_APPS:%=%_clean) $(SYS_SVC:%=%_clean) \
155 $(NET_APPS:%=%_clean) $(APPS:%=%_clean) $(EXT_MODULES:%=%_clean) \
156 $(REGTESTS:%=%_clean) 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 $(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 # Required system components
674 #
675 ntoskrnl: bootstrap
676 $(MAKE) -C ntoskrnl
677
678 ntoskrnl_implib: dk
679 $(MAKE) --silent -C ntoskrnl implib
680
681 ntoskrnl_test:
682 $(MAKE) -C ntoskrnl test
683
684 ntoskrnl_clean:
685 $(MAKE) -C ntoskrnl clean
686
687 ntoskrnl_install:
688 $(MAKE) -C ntoskrnl install
689
690 ntoskrnl_bootcd:
691 $(MAKE) -C ntoskrnl bootcd
692
693 .PHONY: ntoskrnl ntoskrnl_implib ntoskrnl_test \
694 ntoskrnl_clean ntoskrnl_install ntoskrnl_bootcd
695
696
697 #
698 # Hardware Abstraction Layer import library
699 #
700 hallib: $(PATH_TO_TOP)/include/roscfg.h ntoskrnl_implib
701 $(MAKE) --silent -C hal/hal
702
703 hallib_implib: dk ntoskrnl_implib
704 $(MAKE) --silent -C hal/hal implib
705
706 hallib_test:
707 $(MAKE) -C hal/hal test
708
709 hallib_clean:
710 $(MAKE) -C hal/hal clean
711
712 hallib_install:
713 $(MAKE) -C hal/hal install
714
715 hallib_bootcd:
716 $(MAKE) -C hal/hal bootcd
717
718 .PHONY: hallib hallib_implib hallib_test hallib_clean \
719 hallib_install hallib_bootcd
720
721
722 #
723 # Hardware Abstraction Layers
724 #
725 $(HALS): %: $(IMPLIB)
726 $(MAKE) -C hal/$*
727
728 $(HALS:%=%_implib): %_implib: dk
729 $(MAKE) --silent -C hal/$* implib
730
731 $(HALS:%=%_test): %_test:
732 $(MAKE) -C hal/$* test
733
734 $(HALS:%=%_clean): %_clean:
735 $(MAKE) -C hal/$* clean
736
737 $(HALS:%=%_install): %_install:
738 $(MAKE) -C hal/$* install
739
740 $(HALS:%=%_bootcd): %_bootcd:
741 $(MAKE) -C hal/$* bootcd
742
743 .PHONY: $(HALS) $(HALS:%=%_implib) $(HALS:%=%_test) \
744 $(HALS:%=%_clean) $(HALS:%=%_install) $(HALS:%=%_bootcd)
745
746
747 #
748 # File system libraries
749 #
750 $(LIB_FSLIB): %: dk
751 $(MAKE) -C lib/fslib/$*
752
753 $(LIB_FSLIB:%=%_depends): %_depends:
754 $(MAKE) -C lib/fslib/$* depends
755
756 $(LIB_FSLIB:%=%_implib): %_implib: dk
757 $(MAKE) --silent -C lib/fslib/$* implib
758
759 $(LIB_FSLIB:%=%_test): %_test:
760 $(MAKE) -C lib/fslib/$* test
761
762 $(LIB_FSLIB:%=%_clean): %_clean:
763 $(MAKE) -C lib/fslib/$* clean
764
765 $(LIB_FSLIB:%=%_install): %_install:
766 $(MAKE) -C lib/fslib/$* install
767
768 $(LIB_FSLIB:%=%_bootcd): %_bootcd:
769 $(MAKE) -C lib/fslib/$* bootcd
770
771 .PHONY: $(LIB_FSLIB) $(LIB_FSLIB:%=%_depends) $(LIB_FSLIB:%=%_implib) \
772 $(LIB_FSLIB:%=%_test) $(LIB_FSLIB:%=%_clean) \
773 $(LIB_FSLIB:%=%_install) $(LIB_FSLIB:%=%_bootcd)
774
775
776 #
777 # Static libraries
778 #
779 $(LIB_STATIC): %: dk
780 $(MAKE) --silent -C lib/$*
781
782 $(LIB_STATIC:%=%_depends): %_depends:
783 $(MAKE) -C lib/string depends
784
785 $(LIB_STATIC:%=%_implib): %_implib: dk
786 $(MAKE) --silent -C lib/$* implib
787
788 $(LIB_STATIC:%=%_test): %_test:
789 $(MAKE) -C lib/$* test
790
791 $(LIB_STATIC:%=%_clean): %_clean:
792 $(MAKE) -C lib/$* clean
793
794 $(LIB_STATIC:%=%_install): %_install:
795 $(MAKE) -C lib/$* install
796
797 $(LIB_STATIC:%=%_bootcd): %_bootcd:
798 $(MAKE) -C lib/$* bootcd
799
800 .PHONY: $(LIB_STATIC) $(LIB_STATIC:%=%_depends) $(LIB_STATIC:%=%_implib) \
801 $(LIB_STATIC:%=%_test) $(LIB_STATIC:%=%_clean) \
802 $(LIB_STATIC:%=%_install) $(LIB_STATIC:%=%_bootcd)
803
804
805 #
806 # MSVCRT is seperate since CRTDLL depend on this
807 #
808 msvcrt: $(IMPLIB)
809 $(MAKE) -C lib/msvcrt
810
811 msvcrt_depends:
812 $(MAKE) -C lib/msvcrt depends
813
814 msvcrt_implib: dk
815 $(MAKE) --silent -C lib/msvcrt implib
816
817 msvcrt_test:
818 $(MAKE) -C lib/msvcrt test
819
820 msvcrt_clean:
821 $(MAKE) -C lib/msvcrt clean
822
823 msvcrt_install:
824 $(MAKE) -C lib/msvcrt install
825
826 msvcrt_bootcd:
827 $(MAKE) -C lib/msvcrt bootcd
828
829 .PHONY: msvcrt msvcrt_depends msvcrt_implib msvcrt_test \
830 msvcrt_clean msvcrt_install msvcrt_bootcd
831
832
833 #
834 # DLLs
835 #
836 $(DLLS): %: $(IMPLIB) msvcrt
837 $(MAKE) -C lib/$*
838
839 $(DLLS:%=%_depends): %_depends:
840 $(MAKE) -C lib/$* depends
841
842 $(DLLS:%=%_implib): %_implib: dk
843 $(MAKE) --silent -C lib/$* implib
844
845 $(DLLS:%=%_test): %_test:
846 $(MAKE) -C lib/$* test
847
848 $(DLLS:%=%_clean): %_clean:
849 $(MAKE) -C lib/$* clean
850
851 $(DLLS:%=%_install): %_install:
852 $(MAKE) -C lib/$* install
853
854 $(DLLS:%=%_bootcd): %_bootcd:
855 $(MAKE) -C lib/$* bootcd
856
857 .PHONY: $(DLLS) $(DLLS:%=%_depends) $(DLLS:%=%_implib) $(DLLS:%=%_test) \
858 $(DLLS:%=%_clean) $(DLLS:%=%_install) $(DLLS:%=%_bootcd)
859
860
861 #
862 # Subsystem support modules
863 #
864 $(SUBSYS): %: $(IMPLIB)
865 $(MAKE) -C subsys/$*
866
867 $(SUBSYS:%=%_depends): %_depends:
868 $(MAKE) -C subsys/$* depends
869
870 $(SUBSYS:%=%_implib): %_implib: dk
871 $(MAKE) --silent -C subsys/$* implib
872
873 $(SUBSYS:%=%_test): %_test:
874 $(MAKE) -C subsys/$* test
875
876 $(SUBSYS:%=%_clean): %_clean:
877 $(MAKE) -C subsys/$* clean
878
879 $(SUBSYS:%=%_install): %_install:
880 $(MAKE) -C subsys/$* install
881
882 $(SUBSYS:%=%_bootcd): %_bootcd:
883 $(MAKE) -C subsys/$* bootcd
884
885 .PHONY: $(SUBSYS) $(SUBSYS:%=%_depends) $(SUBSYS:%=%_implib) $(SUBSYS:%=%_test) \
886 $(SUBSYS:%=%_clean) $(SUBSYS:%=%_install) $(SUBSYS:%=%_bootcd)
887
888 #
889 # Regression testsuite
890 #
891
892 $(REGTESTS): %: $(IMPLIB)
893 $(MAKE) --silent -C regtests
894
895 $(REGTESTS:%=%_implib): %_implib: dk
896 $(MAKE) --silent -C regtests implib
897
898 $(REGTESTS:%=%_clean): %_clean:
899 $(MAKE) -C regtests clean
900
901 $(REGTESTS:%=%_install): %_install:
902 $(MAKE) -C regtests install
903
904 .PHONY: $(REGTESTS) $(REGTESTS:%=%_depends) $(SUBSYS:%=%_clean) $(REGTESTS:%=%_install)
905
906
907 #
908 # Create an installation
909 #
910
911 install_clean:
912 $(RM) $(INSTALL_DIR)/system32/drivers/*.*
913 $(RM) $(INSTALL_DIR)/system32/config/*.*
914 $(RM) $(INSTALL_DIR)/system32/*.*
915 $(RM) $(INSTALL_DIR)/symbols/*.*
916 $(RM) $(INSTALL_DIR)/media/fonts/*.*
917 $(RM) $(INSTALL_DIR)/media/*.*
918 $(RM) $(INSTALL_DIR)/inf/*.*
919 $(RM) $(INSTALL_DIR)/bin/*.*
920 $(RMDIR) $(INSTALL_DIR)/system32/drivers
921 $(RMDIR) $(INSTALL_DIR)/system32/config
922 $(RMDIR) $(INSTALL_DIR)/system32
923 $(RMDIR) $(INSTALL_DIR)/symbols
924 $(RMDIR) $(INSTALL_DIR)/media/fonts
925 $(RMDIR) $(INSTALL_DIR)/media
926 $(RMDIR) $(INSTALL_DIR)/inf
927 $(RMDIR) $(INSTALL_DIR)/bin
928 $(RMDIR) $(INSTALL_DIR)
929
930 install_dirs:
931 $(RMKDIR) $(INSTALL_DIR)
932 $(RMKDIR) $(INSTALL_DIR)/bin
933 $(RMKDIR) $(INSTALL_DIR)/inf
934 $(RMKDIR) $(INSTALL_DIR)/media
935 $(RMKDIR) $(INSTALL_DIR)/media/fonts
936 $(RMKDIR) $(INSTALL_DIR)/symbols
937 $(RMKDIR) $(INSTALL_DIR)/system32
938 $(RMKDIR) $(INSTALL_DIR)/system32/config
939 $(RMKDIR) $(INSTALL_DIR)/system32/drivers
940 $(RMKDIR) $(INSTALL_DIR)/system32/drivers/etc
941
942 install_before:
943 $(CP) media/inf $(INSTALL_DIR)/inf
944 $(CP) media/fonts $(INSTALL_DIR)/media/fonts
945 $(CP) media/nls $(INSTALL_DIR)/system32
946 $(CP) media/nls/c_1252.nls $(INSTALL_DIR)/system32/ansi.nls
947 $(CP) media/nls/c_437.nls $(INSTALL_DIR)/system32/oem.nls
948 $(CP) media/nls/l_intl.nls $(INSTALL_DIR)/system32/casemap.nls
949 $(CP) media/drivers/etc/services \
950 $(INSTALL_DIR)/system32/drivers/etc/services
951
952 .PHONY: install_clean install_dirs install_before
953
954
955 etags:
956 find . -name "*.[ch]" -print | etags --language=c -
957
958
959 docu:
960 echo generating ReactOS NTOSKRNL documentation ...
961 $(MAKE) -C ntoskrnl docu
962
963 echo generating ReactOS drivers documentation ...
964 $(MAKE) -C drivers docu
965
966 echo generating ReactOS NTDLL documentation ...
967 $(MAKE) -C lib/ntdll docu
968
969 echo generating ReactOS Freetype documentation ...
970 $(MAKE) -C lib/freetype docu
971
972 echo generating ReactOS libs documentation ...
973 $(MAKE) -C lib docu
974
975 echo generating ReactOS WIN32K documentation ...
976 $(MAKE) -C subsys/win32k docu
977
978 echo generating ReactOS apps+tools documentation ...
979 $(MAKE) -C apps docu
980
981 echo generating ReactOS explorer documentation ...
982 $(MAKE) -C subsys/system/explorer full-docu
983
984 echo generating remaining ReactOS documentation ...
985 doxygen Doxyfile
986
987 .PHONY: docu
988
989 include $(TOOLS_PATH)/config.mk