1 # $Id: Makefile,v 1.243 2004/08/16 22:31:04 chorns Exp $
8 include $(PATH_TO_TOP
)/rules.mak
11 # Define to build ReactOS external targets
13 ifeq ($(ROS_BUILD_EXT
),)
19 ifneq ($(MINIMALDEPENDENCIES
),no
)
25 # Required to run the system
28 # Hardware Abstraction Layers
36 # Filesystem libraries
41 LIB_STATIC
= string rosrtl epsapi uuid libwine zlib rtl tgetopt pseh
43 # Keyboard layout libraries
44 DLLS_KBD
= kbddv kbdfr kbdgr kbdse kbduk kbdus
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
)
58 SUBSYS
= smss win32k csrss ntvdm
61 # Select the server(s) you want to build
63 #SERVERS = posix linux os2
70 # Driver support libraries
72 DRIVERS_LIB
= bzip2 oskittcp csq
74 # Kernel mode device drivers
76 # beep blue floppy null parallel ramdrv serenum serial
77 DEVICE_DRIVERS
= beep blue debugout null serial bootvid
79 # Kernel mode input drivers
80 INPUT_DRIVERS
= keyboard mouclass psaux sermouse
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
86 # Kernel mode networking drivers
87 # afd ndis npf tcpip tdi wshtcpip
88 NET_DRIVERS
= afd ndis npf tcpip tdi wshtcpip
90 # Kernel mode networking device drivers
92 NET_DEVICE_DRIVERS
= ne2000 pcnet
94 # Kernel mode storage drivers
95 # atapi cdrom class2 disk scsiport
96 STORAGE_DRIVERS
= atapi cdrom class2 disk floppy scsiport diskdump
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
104 SYS_SVC
= rpcss eventlog
106 APPS
= tests testsets utils
109 # External modules and (sub)systems for ReactOS
110 # rosapps posix os2 (requires c++) java (non-existant)
113 ifeq ($(ROS_BUILD_EXT
),yes
)
114 EXT_MODULES
= $(EXTERNALS
)
119 KERNEL_DRIVERS
= $(DRIVERS_LIB
) $(DEVICE_DRIVERS
) $(INPUT_DRIVERS
) $(FS_DRIVERS
) \
120 $(NET_DRIVERS
) $(NET_DEVICE_DRIVERS
) $(STORAGE_DRIVERS
) VIDEO_DRIVERS
125 all: bootstrap
$(REGTESTS
) $(HALS
) $(BUS
) $(LIB_FSLIB
) $(DLLS
) $(SUBSYS
) \
126 $(LOADERS
) $(KERNEL_DRIVERS
) $(SYS_APPS
) $(SYS_SVC
) \
127 $(APPS
) $(EXT_MODULES
)
129 bootstrap
: dk implib iface_native iface_additional
131 #config: $(TOOLS:%=%_config)
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
)
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
)
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
)
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
155 $(RM
) $(PATH_TO_TOP
)/include/roscfg.h
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
165 FREELDR_DIR
= ..
/freeldr
168 $(MAKE
) -C
$(FREELDR_DIR
)
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
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
)
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
204 bootcd_basic
: bootcd_directory_layout bootcd_bootstrap_files bootcd_install_before
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
213 $(CP
) bootdata
/unattend.inf
$(BOOTCD_DIR
)/reactos
/unattend.inf
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
226 livecd_bootstrap_files
:
227 $(MAKE
) LIVECD_INSTALL
=yes fastinstall
229 livecd_install_before
:
230 $(MKHIVE
) bootdata
$(LIVECD_DIR
)/reactos
/system32
/config bootdata
/livecd.inf bootdata
/hiveinst.inf
232 livecd_basic
: livecd_directory_layout livecd_bootstrap_files livecd_install_before
235 $(CDMAKE
) -m
-j
-b
$(LIVECD_DIR
)/..
/isoboot.bin
$(LIVECD_DIR
) REACTOS roslive.iso
237 bootcd
: bootcd_basic bootcd_makecd
239 ubootcd
: bootcd_basic ubootcd_unattend bootcd_makecd
241 livecd
: livecd_basic livecd_makecd
244 $(MKHIVE
) bootdata
$(INSTALL_DIR
)/system32
/config bootdata
/hiveinst.inf
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
253 # System Applications
255 $(SYS_APPS
): %: $(IMPLIB
)
256 $(MAKE
) -C subsys
/system
/$*
258 $(SYS_APPS
:%=%_implib
): %_implib
: dk
259 $(MAKE
) --silent
-C subsys
/system
/$* implib
261 $(SYS_APPS
:%=%_test
): %_test
:
262 $(MAKE
) -C subsys
/system
/$* test
264 $(SYS_APPS
:%=%_clean
): %_clean
:
265 $(MAKE
) -C subsys
/system
/$* clean
267 $(SYS_APPS
:%=%_install
): %_install
:
268 $(MAKE
) -C subsys
/system
/$* install
270 $(SYS_APPS
:%=%_bootcd
): %_bootcd
:
271 $(MAKE
) -C subsys
/system
/$* bootcd
273 .PHONY
: $(SYS_APPS
) $(SYS_APPS
:%=%_implib
) $(SYS_APPS
:%=%_test
) \
274 $(SYS_APPS
:%=%_clean
) $(SYS_APPS
:%=%_install
) $(SYS_APPS
:%=%_bootcd
)
279 $(SYS_SVC
): %: $(IMPLIB
)
280 $(MAKE
) -C services
/$*
282 $(SYS_SVC
:%=%_depends
): %_depends
:
283 $(MAKE
) -C services
/$* depends
285 $(SYS_SVC
:%=%_implib
): %_implib
: dk
286 $(MAKE
) --silent
-C services
/$* implib
288 $(SYS_SVC
:%=%_test
): %_test
:
289 $(MAKE
) -C services
/$* test
291 $(SYS_SVC
:%=%_clean
): %_clean
:
292 $(MAKE
) -C services
/$* clean
294 $(SYS_SVC
:%=%_install
): %_install
:
295 $(MAKE
) -C services
/$* install
297 .PHONY
: $(SYS_SVC
) $(SYS_SVC
:%=%_depends
) $(SYS_SVC
:%=%_implib
) \
298 $(SYS_SVC
:%=%_test
) $(SYS_SVC
:%=%_clean
) $(SYS_SVC
:%=%_install
)
305 # Extra (optional system) Applications
307 $(APPS
): %: $(IMPLIB
)
311 # $(APPS:%=%_implib): %_implib: dk
312 # $(MAKE) --silent -C apps/$* implib
314 $(APPS
:%=%_test
): %_test
:
315 $(MAKE
) -C apps
/$* test
317 $(APPS
:%=%_clean
): %_clean
:
318 $(MAKE
) -C apps
/$* clean
320 $(APPS
:%=%_install
): %_install
:
321 $(MAKE
) -C apps
/$* install
323 .PHONY
: $(APPS
) $(APPS
:%=%_test
) $(APPS
:%=%_clean
) $(APPS
:%=%_install
)
327 # External ports and subsystem personalities
330 $(MAKE
) -C
$(ROOT_PATH
)/$*
332 $(EXTERNALS
:%=%_depends
): %_depends
:
333 $(MAKE
) -C
$(ROOT_PATH
)/$* depends
335 $(EXTERNALS
:%=%_implib
): %_implib
: dk
336 $(MAKE
) --silent
-C
$(ROOT_PATH
)/$* implib
338 $(EXTERNALS
:%=%_clean
): %_clean
:
339 $(MAKE
) -C
$(ROOT_PATH
)/$* clean
341 $(EXTERNALS
:%=%_install
): %_install
:
342 $(MAKE
) -C
$(ROOT_PATH
)/$* install
344 .PHONY
: $(EXTERNALS
) $(EXTERNALS
:%=%_depends
) $(EXTERNALS
:%=%_implib
) $(EXTERNALS
:%=%_clean
) $(EXTERNALS
:%=%_install
)
351 $(MAKE
) --silent
-C tools
360 $(MAKE
) -C tools
clean
364 .PHONY
: tools tools_implib tools_test tools_clean tools_install
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)
384 # WARNING! Be very sure that there are no important files
385 # in these directories before cleaning them!!!
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)
402 .PHONY
: dk dk_implib dk_clean dk_install
409 $(MAKE
) --silent
-C iface
/native
416 $(MAKE
) --silent
-C iface
/native
clean
418 iface_native_install
:
423 $(MAKE
) --silent
-C iface
/addsys
425 iface_additional_implib
:
427 iface_additional_test
:
429 iface_additional_clean
:
430 $(MAKE
) --silent
-C iface
/addsys
clean
432 iface_additional_install
:
434 iface_additional_bootcd
:
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
446 $(MAKE
) -C drivers
/bus
/$*
448 $(BUS
:%=%_implib
): %_implib
: dk
449 $(MAKE
) --silent
-C drivers
/bus
/$* implib
451 $(BUS
:%=%_test
): %_test
:
452 $(MAKE
) -C drivers
/bus
/$* test
454 $(BUS
:%=%_clean
): %_clean
:
455 $(MAKE
) -C drivers
/bus
/$* clean
457 $(BUS
:%=%_install
): %_install
:
458 $(MAKE
) -C drivers
/bus
/$* install
460 $(BUS
:%=%_bootcd
): %_bootcd
:
461 $(MAKE
) -C drivers
/bus
/$* bootcd
463 .PHONY
: $(BUS
) $(BUS
:%=%_implib
) $(BUS
:%=%_clean
) \
464 $(BUS
:%=%_install
) $(BUS
:%=%_bootcd
)
468 # Driver support libraries rules
470 $(DRIVERS_LIB
): %: $(IMPLIB
)
471 $(MAKE
) -C drivers
/lib
/$*
473 $(DRIVERS_LIB
:%=%_implib
): %_implib
: dk
474 $(MAKE
) --silent
-C drivers
/lib
/$* implib
476 $(DRIVERS_LIB
:%=%_test
): %_test
:
477 $(MAKE
) -C drivers
/lib
/$* test
479 $(DRIVERS_LIB
:%=%_clean
): %_clean
:
480 $(MAKE
) -C drivers
/lib
/$* clean
482 $(DRIVERS_LIB
:%=%_install
): %_install
:
483 $(MAKE
) -C drivers
/lib
/$* install
485 $(DRIVERS_LIB
:%=%_bootcd
): %_bootcd
:
486 $(MAKE
) -C drivers
/lib
/$* bootcd
488 .PHONY
: $(DRIVERS_LIB
) $(DRIVERS_LIB
:%=%_implib
) $(DRIVERS_LIB
:%=%_test
) \
489 $(DRIVERS_LIB
:%=%_clean
) $(DRIVERS_LIB
:%=%_install
) $(DRIVERS_LIB
:%=%_bootcd
)
493 # Device driver rules
495 $(DEVICE_DRIVERS
): %: $(IMPLIB
)
496 $(MAKE
) -C drivers
/dd
/$*
498 $(DEVICE_DRIVERS
:%=%_implib
): %_implib
: dk
499 $(MAKE
) --silent
-C drivers
/dd
/$* implib
501 $(DEVICE_DRIVERS
:%=%_test
): %_test
:
502 $(MAKE
) -C drivers
/dd
/$* test
504 $(DEVICE_DRIVERS
:%=%_clean
): %_clean
:
505 $(MAKE
) -C drivers
/dd
/$* clean
507 $(DEVICE_DRIVERS
:%=%_install
): %_install
:
508 $(MAKE
) -C drivers
/dd
/$* install
510 $(DEVICE_DRIVERS
:%=%_bootcd
): %_bootcd
:
511 $(MAKE
) -C drivers
/dd
/$* bootcd
513 .PHONY
: $(DEVICE_DRIVERS
) $(DEVICE_DRIVERS
:%=%_implib
) $(DEVICE_DRIVERS
:%=%_test
) \
514 $(DEVICE_DRIVERS
:%=%_clean
) $(DEVICE_DRIVERS
:%=%_install
) $(DEVICE_DRIVERS
:%=%_bootcd
)
518 # Video device driver rules
520 VIDEO_DRIVERS
: $(IMPLIB
)
521 $(MAKE
) -C drivers
/video
523 VIDEO_DRIVERS_implib
: dk
524 $(MAKE
) --silent
-C drivers
/video implib
527 $(MAKE
) -C drivers
/video
test
530 $(MAKE
) -C drivers
/video
clean
532 VIDEO_DRIVERS_install
:
533 $(MAKE
) -C drivers
/video
install
535 VIDEO_DRIVERS_bootcd
:
536 $(MAKE
) -C drivers
/video bootcd
538 .PHONY
: VIDEO_DRIVERS VIDEO_DRIVERS_implib VIDEO_DRIVERS_test\
539 VIDEO_DRIVERS_clean VIDEO_DRIVERS_install VIDEO_DRIVERS_bootcd
545 $(INPUT_DRIVERS
): %: $(IMPLIB
)
546 $(MAKE
) -C drivers
/input
/$*
548 $(INPUT_DRIVERS
:%=%_implib
): %_implib
: dk
549 $(MAKE
) --silent
-C drivers
/input
/$* implib
551 $(INPUT_DRIVERS
:%=%_test
): %_test
:
552 $(MAKE
) -C drivers
/input
/$* test
554 $(INPUT_DRIVERS
:%=%_clean
): %_clean
:
555 $(MAKE
) -C drivers
/input
/$* clean
557 $(INPUT_DRIVERS
:%=%_install
): %_install
:
558 $(MAKE
) -C drivers
/input
/$* install
560 $(INPUT_DRIVERS
:%=%_bootcd
): %_bootcd
:
561 $(MAKE
) -C drivers
/input
/$* bootcd
563 .PHONY
: $(INPUT_DRIVERS
) $(INPUT_DRIVERS
:%=%_implib
) $(INPUT_DRIVERS
:%=%_test
) \
564 $(INPUT_DRIVERS
:%=%_clean
) $(INPUT_DRIVERS
:%=%_install
) $(INPUT_DRIVERS
:%=%_bootcd
)
567 # Filesystem driver rules
569 $(FS_DRIVERS
): %: $(IMPLIB
)
570 $(MAKE
) -C drivers
/fs
/$*
572 $(FS_DRIVERS
:%=%_implib
): %_implib
: dk
573 $(MAKE
) --silent
-C drivers
/fs
/$* implib
575 $(FS_DRIVERS
:%=%_test
): %_test
:
576 $(MAKE
) -C drivers
/fs
/$* test
578 $(FS_DRIVERS
:%=%_clean
): %_clean
:
579 $(MAKE
) -C drivers
/fs
/$* clean
581 $(FS_DRIVERS
:%=%_install
): %_install
:
582 $(MAKE
) -C drivers
/fs
/$* install
584 $(FS_DRIVERS
:%=%_bootcd
): %_bootcd
:
585 $(MAKE
) -C drivers
/fs
/$* bootcd
587 .PHONY
: $(FS_DRIVERS
) $(FS_DRIVERS
:%=%_implib
) $(FS_DRIVERS
:%=%_test
) \
588 $(FS_DRIVERS
:%=%_clean
) $(FS_DRIVERS
:%=%_install
) $(FS_DRIVERS
:%=%_bootcd
)
592 # Network driver rules
594 $(NET_DRIVERS
): %: $(IMPLIB
)
595 $(MAKE
) -C drivers
/net
/$*
597 $(NET_DRIVERS
:%=%_implib
): %_implib
: dk
598 $(MAKE
) --silent
-C drivers
/net
/$* implib
600 $(NET_DRIVERS
:%=%_test
): %_test
:
601 $(MAKE
) -C drivers
/net
/$* test
603 $(NET_DRIVERS
:%=%_clean
): %_clean
:
604 $(MAKE
) -C drivers
/net
/$* clean
606 $(NET_DRIVERS
:%=%_install
): %_install
:
607 $(MAKE
) -C drivers
/net
/$* install
609 $(NET_DRIVERS
:%=%_bootcd
): %_bootcd
:
610 $(MAKE
) -C drivers
/net
/$* bootcd
612 .PHONY
: $(NET_DRIVERS
) $(NET_DRIVERS
:%=%_implib
) $(NET_DRIVERS
:%=%_test
) \
613 $(NET_DRIVERS
:%=%_clean
) $(NET_DRIVERS
:%=%_install
) $(NET_DRIVERS
:%=%_bootcd
)
617 # Network device driver rules
619 $(NET_DEVICE_DRIVERS
): %: $(IMPLIB
)
620 $(MAKE
) -C drivers
/net
/dd
/$*
622 $(NET_DEVICE_DRIVERS
:%=%_implib
): %_implib
: dk
623 $(MAKE
) --silent
-C drivers
/net
/dd
/$* implib
625 $(NET_DEVICE_DRIVERS
:%=%_test
): %_test
:
626 $(MAKE
) -C drivers
/net
/dd
/$* test
628 $(NET_DEVICE_DRIVERS
:%=%_clean
): %_clean
:
629 $(MAKE
) -C drivers
/net
/dd
/$* clean
631 $(NET_DEVICE_DRIVERS
:%=%_install
): %_install
:
632 $(MAKE
) -C drivers
/net
/dd
/$* install
634 $(NET_DEVICE_DRIVERS
:%=%_bootcd
): %_bootcd
:
635 $(MAKE
) -C drivers
/net
/dd
/$* bootcd
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
)
643 # storage driver rules
645 $(STORAGE_DRIVERS
): %: $(IMPLIB
)
646 $(MAKE
) -C drivers
/storage
/$*
648 $(STORAGE_DRIVERS
:%=%_implib
): %_implib
: dk
649 $(MAKE
) --silent
-C drivers
/storage
/$* implib
651 $(STORAGE_DRIVERS
:%=%_test
): %_test
:
652 $(MAKE
) -C drivers
/storage
/$* test
654 $(STORAGE_DRIVERS
:%=%_clean
): %_clean
:
655 $(MAKE
) -C drivers
/storage
/$* clean
657 $(STORAGE_DRIVERS
:%=%_install
): %_install
:
658 $(MAKE
) -C drivers
/storage
/$* install
660 $(STORAGE_DRIVERS
:%=%_bootcd
): %_bootcd
:
661 $(MAKE
) -C drivers
/storage
/$* bootcd
663 .PHONY
: $(STORAGE_DRIVERS
) $(STORAGE_DRIVERS
:%=%_clean
) \
664 $(STORAGE_DRIVERS
:%=%_implib
) $(STORAGE_DRIVERS
:%=%_test
) \
665 $(STORAGE_DRIVERS
:%=%_install
) $(STORAGE_DRIVERS
:%=%_bootcd
)
672 $(MAKE
) -C loaders
/$*
674 $(LOADERS
:%=%_implib
): %_implib
: dk
676 $(LOADERS
:%=%_test
): %_test
:
678 $(LOADERS
:%=%_clean
): %_clean
:
679 $(MAKE
) -C loaders
/$* clean
681 $(LOADERS
:%=%_install
): %_install
:
682 $(MAKE
) -C loaders
/$* install
684 .PHONY
: $(LOADERS
) $(LOADERS
:%=%_implib
) $(LOADERS
:%=%_test
) \
685 $(LOADERS
:%=%_clean
) $(LOADERS
:%=%_install
)
689 # Required system components
695 $(MAKE
) --silent
-C ntoskrnl implib
698 $(MAKE
) -C ntoskrnl
test
701 $(MAKE
) -C ntoskrnl
clean
704 $(MAKE
) -C ntoskrnl
install
707 $(MAKE
) -C ntoskrnl bootcd
709 .PHONY
: ntoskrnl ntoskrnl_implib ntoskrnl_test \
710 ntoskrnl_clean ntoskrnl_install ntoskrnl_bootcd
714 # Hardware Abstraction Layer import library
716 hallib
: ntoskrnl_implib
717 $(MAKE
) --silent
-C hal
/hal
719 hallib_implib
: dk ntoskrnl_implib
720 $(MAKE
) --silent
-C hal
/hal implib
723 $(MAKE
) -C hal
/hal
test
726 $(MAKE
) -C hal
/hal
clean
729 $(MAKE
) -C hal
/hal
install
732 $(MAKE
) -C hal
/hal bootcd
734 .PHONY
: hallib hallib_implib hallib_test hallib_clean \
735 hallib_install hallib_bootcd
739 # Hardware Abstraction Layers
741 $(HALS
): %: $(IMPLIB
)
744 $(HALS
:%=%_implib
): %_implib
: dk
745 $(MAKE
) --silent
-C hal
/$* implib
747 $(HALS
:%=%_test
): %_test
:
748 $(MAKE
) -C hal
/$* test
750 $(HALS
:%=%_clean
): %_clean
:
751 $(MAKE
) -C hal
/$* clean
753 $(HALS
:%=%_install
): %_install
:
754 $(MAKE
) -C hal
/$* install
756 $(HALS
:%=%_bootcd
): %_bootcd
:
757 $(MAKE
) -C hal
/$* bootcd
759 .PHONY
: $(HALS
) $(HALS
:%=%_implib
) $(HALS
:%=%_test
) \
760 $(HALS
:%=%_clean
) $(HALS
:%=%_install
) $(HALS
:%=%_bootcd
)
764 # File system libraries
767 $(MAKE
) -C lib
/fslib
/$*
769 $(LIB_FSLIB
:%=%_depends
): %_depends
:
770 $(MAKE
) -C lib
/fslib
/$* depends
772 $(LIB_FSLIB
:%=%_implib
): %_implib
: dk
773 $(MAKE
) --silent
-C lib
/fslib
/$* implib
775 $(LIB_FSLIB
:%=%_test
): %_test
:
776 $(MAKE
) -C lib
/fslib
/$* test
778 $(LIB_FSLIB
:%=%_clean
): %_clean
:
779 $(MAKE
) -C lib
/fslib
/$* clean
781 $(LIB_FSLIB
:%=%_install
): %_install
:
782 $(MAKE
) -C lib
/fslib
/$* install
784 $(LIB_FSLIB
:%=%_bootcd
): %_bootcd
:
785 $(MAKE
) -C lib
/fslib
/$* bootcd
787 .PHONY
: $(LIB_FSLIB
) $(LIB_FSLIB
:%=%_depends
) $(LIB_FSLIB
:%=%_implib
) \
788 $(LIB_FSLIB
:%=%_test
) $(LIB_FSLIB
:%=%_clean
) \
789 $(LIB_FSLIB
:%=%_install
) $(LIB_FSLIB
:%=%_bootcd
)
796 $(MAKE
) --silent
-C lib
/$*
798 $(LIB_STATIC
:%=%_depends
): %_depends
:
799 $(MAKE
) -C lib
/string depends
801 $(LIB_STATIC
:%=%_implib
): %_implib
: dk
802 $(MAKE
) --silent
-C lib
/$* implib
804 $(LIB_STATIC
:%=%_test
): %_test
:
805 $(MAKE
) -C lib
/$* test
807 $(LIB_STATIC
:%=%_clean
): %_clean
:
808 $(MAKE
) -C lib
/$* clean
810 $(LIB_STATIC
:%=%_install
): %_install
:
811 $(MAKE
) -C lib
/$* install
813 $(LIB_STATIC
:%=%_bootcd
): %_bootcd
:
814 $(MAKE
) -C lib
/$* bootcd
816 .PHONY
: $(LIB_STATIC
) $(LIB_STATIC
:%=%_depends
) $(LIB_STATIC
:%=%_implib
) \
817 $(LIB_STATIC
:%=%_test
) $(LIB_STATIC
:%=%_clean
) \
818 $(LIB_STATIC
:%=%_install
) $(LIB_STATIC
:%=%_bootcd
)
822 # MSVCRT is seperate since CRTDLL depend on this
825 $(MAKE
) -C lib
/msvcrt
828 $(MAKE
) -C lib
/msvcrt depends
831 $(MAKE
) --silent
-C lib
/msvcrt implib
834 $(MAKE
) -C lib
/msvcrt
test
837 $(MAKE
) -C lib
/msvcrt
clean
840 $(MAKE
) -C lib
/msvcrt
install
843 $(MAKE
) -C lib
/msvcrt bootcd
845 .PHONY
: msvcrt msvcrt_depends msvcrt_implib msvcrt_test \
846 msvcrt_clean msvcrt_install msvcrt_bootcd
852 $(DLLS
): %: $(IMPLIB
) msvcrt
855 $(DLLS
:%=%_depends
): %_depends
:
856 $(MAKE
) -C lib
/$* depends
858 $(DLLS
:%=%_implib
): %_implib
: dk
859 $(MAKE
) --silent
-C lib
/$* implib
861 $(DLLS
:%=%_test
): %_test
:
862 $(MAKE
) -C lib
/$* test
864 $(DLLS
:%=%_clean
): %_clean
:
865 $(MAKE
) -C lib
/$* clean
867 $(DLLS
:%=%_install
): %_install
:
868 $(MAKE
) -C lib
/$* install
870 $(DLLS
:%=%_bootcd
): %_bootcd
:
871 $(MAKE
) -C lib
/$* bootcd
873 .PHONY
: $(DLLS
) $(DLLS
:%=%_depends
) $(DLLS
:%=%_implib
) $(DLLS
:%=%_test
) \
874 $(DLLS
:%=%_clean
) $(DLLS
:%=%_install
) $(DLLS
:%=%_bootcd
)
878 # Subsystem support modules
880 $(SUBSYS
): %: $(IMPLIB
)
883 $(SUBSYS
:%=%_depends
): %_depends
:
884 $(MAKE
) -C subsys
/$* depends
886 $(SUBSYS
:%=%_implib
): %_implib
: dk
887 $(MAKE
) --silent
-C subsys
/$* implib
889 $(SUBSYS
:%=%_test
): %_test
:
890 $(MAKE
) -C subsys
/$* test
892 $(SUBSYS
:%=%_clean
): %_clean
:
893 $(MAKE
) -C subsys
/$* clean
895 $(SUBSYS
:%=%_install
): %_install
:
896 $(MAKE
) -C subsys
/$* install
898 $(SUBSYS
:%=%_bootcd
): %_bootcd
:
899 $(MAKE
) -C subsys
/$* bootcd
901 .PHONY
: $(SUBSYS
) $(SUBSYS
:%=%_depends
) $(SUBSYS
:%=%_implib
) $(SUBSYS
:%=%_test
) \
902 $(SUBSYS
:%=%_clean
) $(SUBSYS
:%=%_install
) $(SUBSYS
:%=%_bootcd
)
905 # Regression testsuite
908 $(REGTESTS
): %: $(IMPLIB
)
909 $(MAKE
) --silent
-C regtests
911 $(REGTESTS
:%=%_clean
): %_clean
:
912 $(MAKE
) -C regtests
clean
914 $(REGTESTS
:%=%_install
): %_install
:
915 $(MAKE
) -C regtests
install
917 .PHONY
: $(REGTESTS
) $(REGTESTS
:%=%_depends
) $(SUBSYS
:%=%_clean
) $(REGTESTS
:%=%_install
)
921 # Create an installation
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
)
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
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
970 .PHONY
: install_clean install_dirs install_before
974 find .
-name
"*.[ch]" -print | etags
--language
=c
-
978 echo generating ReactOS NTOSKRNL documentation ...
979 $(MAKE
) -C ntoskrnl docu
981 echo generating ReactOS drivers documentation ...
982 $(MAKE
) -C drivers docu
984 echo generating ReactOS NTDLL documentation ...
985 $(MAKE
) -C lib
/ntdll docu
987 echo generating ReactOS Freetype documentation ...
988 $(MAKE
) -C lib
/freetype docu
990 echo generating ReactOS libs documentation ...
993 echo generating ReactOS WIN32K documentation ...
994 $(MAKE
) -C subsys
/win32k docu
996 echo generating ReactOS apps
+tools documentation ...
999 echo generating ReactOS explorer documentation ...
1000 $(MAKE
) -C subsys
/system
/explorer full-docu
1002 echo generating remaining ReactOS documentation ...
1007 include $(TOOLS_PATH
)/config.mk