1 # $Id: Makefile,v 1.253 2004/10/21 05:08:32 sedwards 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 adns
43 # Keyboard layout libraries
44 DLLS_KBD
= kbddv kbdfr kbdgr kbdse kbduk kbdus
50 DLLS_SHELLEXT
= shellext
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 \
60 $(DLLS_KBD
) $(DLLS_CPL
) $(DLLS_SHELLEXT
)
62 SUBSYS
= smss win32k csrss ntvdm
65 # Select the server(s) you want to build
67 #SERVERS = posix linux os2
74 # Driver support libraries
76 DRIVERS_LIB
= bzip2 oskittcp ip csq
78 # Kernel mode device drivers
80 # beep blue floppy null parallel ramdrv serenum serial
81 DEVICE_DRIVERS
= beep blue debugout null serial bootvid
83 # Kernel mode input drivers
84 INPUT_DRIVERS
= keyboard mouclass psaux sermouse
86 # Kernel mode file system drivers
87 # cdfs ext2 fs_rec ms np vfat
88 FS_DRIVERS
= cdfs fs_rec ms np vfat mup ntfs
90 # Kernel mode networking drivers
91 # afd ndis npf tcpip tdi wshtcpip
92 NET_DRIVERS
= afd ndis npf tcpip tdi wshtcpip
94 # Kernel mode networking device drivers
96 NET_DEVICE_DRIVERS
= ne2000 pcnet
98 # Kernel mode storage drivers
99 # atapi cdrom class2 disk scsiport
100 STORAGE_DRIVERS
= atapi cdrom class2 disk floppy scsiport diskdump
102 # System applications
103 # autochk cmd format services setup usetup welcome winlogon
104 SYS_APPS
= autochk cmd explorer expand format services setup taskmgr userinit usetup welcome vmwinst winlogon regedit winefile
108 SYS_SVC
= rpcss eventlog
110 APPS
= testsets utils
113 # External modules and (sub)systems for ReactOS
114 # rosapps posix os2 (requires c++) java (non-existant)
117 ifeq ($(ROS_BUILD_EXT
),yes
)
118 EXT_MODULES
= $(EXTERNALS
)
123 KERNEL_DRIVERS
= $(DRIVERS_LIB
) $(DEVICE_DRIVERS
) $(INPUT_DRIVERS
) $(FS_DRIVERS
) \
124 $(NET_DRIVERS
) $(NET_DEVICE_DRIVERS
) $(STORAGE_DRIVERS
) VIDEO_DRIVERS
129 all: bootstrap
$(COMPONENTS
) $(REGTESTS
) $(HALS
) $(BUS
) $(LIB_FSLIB
) $(DLLS
) $(SUBSYS
) \
130 $(LOADERS
) $(KERNEL_DRIVERS
) $(SYS_APPS
) $(SYS_SVC
) \
131 $(APPS
) $(EXT_MODULES
)
133 bootstrap
: dk implib iface_native iface_additional
135 #config: $(TOOLS:%=%_config)
137 depends
: $(LIB_STATIC
:%=%_depends
) $(LIB_FSLIB
:%=%_depends
) msvcrt_depends
$(DLLS
:%=%_depends
) \
138 $(SUBSYS
:%=%_depends
) $(SYS_SVC
:%=%_depends
) \
139 $(EXT_MODULES
:%=%_depends
) $(POSIX_LIBS
:%=%_depends
)
141 implib
: hallib
$(LIB_STATIC
) $(COMPONENTS
:%=%_implib
) $(HALS
:%=%_implib
) $(BUS
:%=%_implib
) \
142 $(LIB_STATIC
:%=%_implib
) $(LIB_FSLIB
:%=%_implib
) msvcrt_implib
$(DLLS
:%=%_implib
) $(LOADERS
:%=%_implib
) \
143 $(KERNEL_DRIVERS
:%=%_implib
) $(SUBSYS
:%=%_implib
) \
144 $(SYS_APPS
:%=%_implib
) $(SYS_SVC
:%=%_implib
) $(EXT_MODULES
:%=%_implib
)
146 test: $(COMPONENTS
:%=%_test
) $(HALS
:%=%_test
) $(BUS
:%=%_test
) \
147 $(LIB_STATIC
:%=%_test
) $(LIB_FSLIB
:%=%_test
) msvcrt_test
$(DLLS
:%=%_test
) $(LOADERS
:%=%_test
) \
148 $(KERNEL_DRIVERS
:%=%_test
) $(SUBSYS
:%=%_test
) \
149 $(SYS_SVC
:%=%_test
) $(EXT_MODULES
:%=%_test
)
151 clean: tools dk_clean iface_native_clean iface_additional_clean hallib_clean \
152 $(HALS
:%=%_clean
) $(COMPONENTS
:%=%_clean
) $(BUS
:%=%_clean
) \
153 $(LIB_STATIC
:%=%_clean
) $(LIB_FSLIB
:%=%_clean
) msvcrt_clean \
154 $(DLLS
:%=%_clean
) $(LOADERS
:%=%_clean
) $(KERNEL_DRIVERS
:%=%_clean
) \
155 $(SUBSYS
:%=%_clean
) $(SYS_APPS
:%=%_clean
) $(SYS_SVC
:%=%_clean
) \
156 $(NET_APPS
:%=%_clean
) $(APPS
:%=%_clean
) $(EXT_MODULES
:%=%_clean
) \
157 $(REGTESTS
:%=%_clean
) clean_after tools_clean
160 $(RM
) $(PATH_TO_TOP
)/include/roscfg.h
162 fastinstall
: tools install_dirs install_before \
163 $(COMPONENTS
:%=%_install
) $(HALS
:%=%_install
) $(BUS
:%=%_install
) \
164 $(LIB_STATIC
:%=%_install
) $(LIB_FSLIB
:%=%_install
) msvcrt_install
$(DLLS
:%=%_install
) \
165 $(LOADERS
:%=%_install
) $(KERNEL_DRIVERS
:%=%_install
) $(SUBSYS
:%=%_install
) \
166 $(SYS_APPS
:%=%_install
) $(SYS_SVC
:%=%_install
) \
167 $(APPS
:%=%_install
) $(EXT_MODULES
:%=%_install
) $(REGTESTS
:%=%_install
)
168 install: fastinstall registry
170 FREELDR_DIR
= ..
/freeldr
173 $(MAKE
) -C
$(FREELDR_DIR
)
175 bootcd_directory_layout
:
176 $(RMKDIR
) $(BOOTCD_DIR
)
177 $(RMKDIR
) $(BOOTCD_DIR
)/bootdisk
178 $(RMKDIR
) $(BOOTCD_DIR
)/loader
179 $(RMKDIR
) $(BOOTCD_DIR
)/reactos
180 $(RMKDIR
) $(BOOTCD_DIR
)/reactos
/system32
181 $(CP
) ${FREELDR_DIR}/bootsect
/isoboot.bin
${BOOTCD_DIR}/..
/isoboot.bin
182 $(CP
) ${FREELDR_DIR}/bootsect
/dosmbr.bin
${BOOTCD_DIR}/loader
/dosmbr.bin
183 $(CP
) ${FREELDR_DIR}/bootsect
/ext2.bin
${BOOTCD_DIR}/loader
/ext2.bin
184 $(CP
) ${FREELDR_DIR}/bootsect
/fat.bin
${BOOTCD_DIR}/loader
/fat.bin
185 $(CP
) ${FREELDR_DIR}/bootsect
/fat32.bin
${BOOTCD_DIR}/loader
/fat32.bin
186 $(CP
) ${FREELDR_DIR}/bootsect
/isoboot.bin
${BOOTCD_DIR}/loader
/isoboot.bin
187 $(CP
) ${FREELDR_DIR}/freeldr
/obj
/i386
/freeldr.sys
${BOOTCD_DIR}/loader
/freeldr.sys
188 $(CP
) ${FREELDR_DIR}/freeldr
/obj
/i386
/setupldr.sys
${BOOTCD_DIR}/loader
/setupldr.sys
190 bootcd_bootstrap_files
: $(COMPONENTS
:%=%_bootcd
) $(HALS
:%=%_bootcd
) $(BUS
:%=%_bootcd
) \
191 $(LIB_STATIC
:%=%_bootcd
) $(LIB_FSLIB
:%=%_bootcd
) msvcrt_bootcd
$(DLLS
:%=%_bootcd
) \
192 $(KERNEL_DRIVERS
:%=%_bootcd
) $(SUBSYS
:%=%_bootcd
) $(SYS_APPS
:%=%_bootcd
)
194 bootcd_install_before
:
195 $(RLINE
) bootdata
/autorun.inf
$(BOOTCD_DIR
)/autorun.inf
196 $(RLINE
) bootdata
/readme.txt
$(BOOTCD_DIR
)/readme.txt
197 $(RLINE
) bootdata
/hivecls.inf
$(BOOTCD_DIR
)/reactos
/hivecls.inf
198 $(RLINE
) bootdata
/hivedef.inf
$(BOOTCD_DIR
)/reactos
/hivedef.inf
199 $(RLINE
) bootdata
/hivesft.inf
$(BOOTCD_DIR
)/reactos
/hivesft.inf
200 $(RLINE
) bootdata
/hivesys.inf
$(BOOTCD_DIR
)/reactos
/hivesys.inf
201 $(RLINE
) bootdata
/txtsetup.sif
$(BOOTCD_DIR
)/reactos
/txtsetup.sif
202 $(CP
) bootdata
/icon.ico
$(BOOTCD_DIR
)/icon.ico
203 $(CP
) subsys
/system
/welcome
/welcome.exe
$(BOOTCD_DIR
)/reactos
/welcome.exe
204 $(CP
) media
/nls
/c_1252.nls
$(BOOTCD_DIR
)/reactos
/c_1252.nls
205 $(CP
) media
/nls
/c_437.nls
$(BOOTCD_DIR
)/reactos
/c_437.nls
206 $(CP
) media
/nls
/l_intl.nls
$(BOOTCD_DIR
)/reactos
/l_intl.nls
207 $(CP
) media
/drivers
/etc
/services
$(BOOTCD_DIR
)/reactos
/services
209 bootcd_basic
: bootcd_directory_layout bootcd_bootstrap_files bootcd_install_before
212 $(CABMAN
) /C bootdata
/packages
/reactos.dff
/L
$(BOOTCD_DIR
)/reactos
/I
213 $(CABMAN
) /C bootdata
/packages
/reactos.dff
/RC
$(BOOTCD_DIR
)/reactos
/reactos.inf
/L
$(BOOTCD_DIR
)/reactos
/N
214 - $(RM
) $(BOOTCD_DIR
)/reactos
/reactos.inf
215 $(CDMAKE
) -v
-m
-b
$(BOOTCD_DIR
)/..
/isoboot.bin
$(BOOTCD_DIR
) REACTOS ReactOS.iso
218 $(CP
) bootdata
/unattend.inf
$(BOOTCD_DIR
)/reactos
/unattend.inf
220 livecd_directory_layout
:
221 $(RMKDIR
) $(LIVECD_DIR
)
222 $(RMKDIR
) $(LIVECD_DIR
)/loader
223 $(RMKDIR
) $(LIVECD_DIR
)/reactos
224 $(RMKDIR
) $(LIVECD_DIR
)/Profiles
/All\ Users
/Desktop
225 $(RMKDIR
) $(LIVECD_DIR
)/Profiles
/Default\ User
/Desktop
226 $(RMKDIR
) $(LIVECD_DIR
)/Profiles
/Default\ User
/My\ Documents
227 $(CP
) ${FREELDR_DIR}/bootsect
/isoboot.bin
${LIVECD_DIR}/..
/isoboot.bin
228 $(CP
) ${FREELDR_DIR}/freeldr
/obj
/i386
/freeldr.sys
${LIVECD_DIR}/loader
/setupldr.sys
229 $(RLINE
) bootdata
/livecd.ini
$(LIVECD_DIR
)/freeldr.ini
231 livecd_bootstrap_files
:
232 $(MAKE
) LIVECD_INSTALL
=yes fastinstall
234 livecd_install_before
:
235 $(MKHIVE
) bootdata
$(LIVECD_DIR
)/reactos
/system32
/config bootdata
/livecd.inf bootdata
/hiveinst.inf
237 livecd_basic
: livecd_directory_layout livecd_bootstrap_files livecd_install_before
240 $(CDMAKE
) -m
-j
-b
$(LIVECD_DIR
)/..
/isoboot.bin
$(LIVECD_DIR
) REACTOS roslive.iso
242 bootcd
: bootcd_basic bootcd_makecd
244 ubootcd
: bootcd_basic ubootcd_unattend bootcd_makecd
246 livecd
: livecd_basic livecd_makecd
249 $(MKHIVE
) bootdata
$(INSTALL_DIR
)/system32
/config bootdata
/hiveinst.inf
251 .PHONY
: all bootstrap depends implib
test clean clean_before
install freeldr bootcd_directory_layout \
252 bootcd_bootstrap_files bootcd_install_before bootcd_basic bootcd_makecd ubootcd_unattend bootcd
258 # System Applications
260 $(SYS_APPS
): %: $(IMPLIB
)
261 $(MAKE
) -C subsys
/system
/$*
263 $(SYS_APPS
:%=%_implib
): %_implib
: dk
264 $(MAKE
) --silent
-C subsys
/system
/$* implib
266 $(SYS_APPS
:%=%_test
): %_test
:
267 $(MAKE
) -C subsys
/system
/$* test
269 $(SYS_APPS
:%=%_clean
): %_clean
:
270 $(MAKE
) -C subsys
/system
/$* clean
272 $(SYS_APPS
:%=%_install
): %_install
:
273 $(MAKE
) -C subsys
/system
/$* install
275 $(SYS_APPS
:%=%_bootcd
): %_bootcd
:
276 $(MAKE
) -C subsys
/system
/$* bootcd
278 .PHONY
: $(SYS_APPS
) $(SYS_APPS
:%=%_implib
) $(SYS_APPS
:%=%_test
) \
279 $(SYS_APPS
:%=%_clean
) $(SYS_APPS
:%=%_install
) $(SYS_APPS
:%=%_bootcd
)
284 $(SYS_SVC
): %: $(IMPLIB
)
285 $(MAKE
) -C services
/$*
287 $(SYS_SVC
:%=%_depends
): %_depends
:
288 $(MAKE
) -C services
/$* depends
290 $(SYS_SVC
:%=%_implib
): %_implib
: dk
291 $(MAKE
) --silent
-C services
/$* implib
293 $(SYS_SVC
:%=%_test
): %_test
:
294 $(MAKE
) -C services
/$* test
296 $(SYS_SVC
:%=%_clean
): %_clean
:
297 $(MAKE
) -C services
/$* clean
299 $(SYS_SVC
:%=%_install
): %_install
:
300 $(MAKE
) -C services
/$* install
302 .PHONY
: $(SYS_SVC
) $(SYS_SVC
:%=%_depends
) $(SYS_SVC
:%=%_implib
) \
303 $(SYS_SVC
:%=%_test
) $(SYS_SVC
:%=%_clean
) $(SYS_SVC
:%=%_install
)
310 # Extra (optional system) Applications
312 $(APPS
): %: $(IMPLIB
)
316 # $(APPS:%=%_implib): %_implib: dk
317 # $(MAKE) --silent -C apps/$* implib
319 $(APPS
:%=%_test
): %_test
:
320 $(MAKE
) -C apps
/$* test
322 $(APPS
:%=%_clean
): %_clean
:
323 $(MAKE
) -C apps
/$* clean
325 $(APPS
:%=%_install
): %_install
:
326 $(MAKE
) -C apps
/$* install
328 .PHONY
: $(APPS
) $(APPS
:%=%_test
) $(APPS
:%=%_clean
) $(APPS
:%=%_install
)
332 # External ports and subsystem personalities
335 $(MAKE
) -C
$(ROOT_PATH
)/$*
337 $(EXTERNALS
:%=%_depends
): %_depends
:
338 $(MAKE
) -C
$(ROOT_PATH
)/$* depends
340 $(EXTERNALS
:%=%_implib
): %_implib
: dk
341 $(MAKE
) --silent
-C
$(ROOT_PATH
)/$* implib
343 $(EXTERNALS
:%=%_clean
): %_clean
:
344 $(MAKE
) -C
$(ROOT_PATH
)/$* clean
346 $(EXTERNALS
:%=%_install
): %_install
:
347 $(MAKE
) -C
$(ROOT_PATH
)/$* install
349 .PHONY
: $(EXTERNALS
) $(EXTERNALS
:%=%_depends
) $(EXTERNALS
:%=%_implib
) $(EXTERNALS
:%=%_clean
) $(EXTERNALS
:%=%_install
)
356 $(MAKE
) --silent
-C tools
365 $(MAKE
) -C tools
clean
369 .PHONY
: tools tools_implib tools_test tools_clean tools_install
376 @
$(RMKDIR
) $(DK_PATH
)
377 @
$(RMKDIR
) $(DDK_PATH
)
378 @
$(RMKDIR
) $(DDK_PATH_LIB
)
379 @
$(RMKDIR
) $(DDK_PATH_INC
)
380 @
$(RMKDIR
) $(SDK_PATH
)
381 @
$(RMKDIR
) $(SDK_PATH_LIB
)
382 @
$(RMKDIR
) $(SDK_PATH_INC
)
383 @
$(RMKDIR
) $(XDK_PATH
)
384 @
$(RMKDIR
) $(XDK_PATH_LIB
)
385 # @$(RMKDIR) $(XDK_PATH_INC)
389 # WARNING! Be very sure that there are no important files
390 # in these directories before cleaning them!!!
392 $(RM
) $(DDK_PATH_LIB
)/*.a
393 # $(RM) $(DDK_PATH_INC)/*.h
394 $(RMDIR
) $(DDK_PATH_LIB
)
395 # $(RMDIR) $(DDK_PATH_INC)
396 $(RM
) $(SDK_PATH_LIB
)/*.a
397 # $(RM) $(SDK_PATH_INC)/*.h
398 $(RMDIR
) $(SDK_PATH_LIB
)
399 # $(RMDIR) $(SDK_PATH_INC)
400 $(RM
) $(XDK_PATH_LIB
)/*.a
401 # $(RM) $(XDK_PATH_INC)/*.h
402 $(RMDIR
) $(XDK_PATH_LIB
)
403 # $(RMDIR) $(XDK_PATH_INC)
407 .PHONY
: dk dk_implib dk_clean dk_install
414 $(MAKE
) --silent
-C iface
/native
421 $(MAKE
) --silent
-C iface
/native
clean
423 iface_native_install
:
428 $(MAKE
) --silent
-C iface
/addsys
430 iface_additional_implib
:
432 iface_additional_test
:
434 iface_additional_clean
:
435 $(MAKE
) --silent
-C iface
/addsys
clean
437 iface_additional_install
:
439 iface_additional_bootcd
:
441 .PHONY
: iface_native iface_native_implib iface_native_test iface_native_clean \
442 iface_native_install iface_native_bootcd iface_additional \
443 iface_additional_implib iface_additional_test iface_additional_clean \
444 iface_additional_install iface_additional_bootcd
451 $(MAKE
) -C drivers
/bus
/$*
453 $(BUS
:%=%_implib
): %_implib
: dk
454 $(MAKE
) --silent
-C drivers
/bus
/$* implib
456 $(BUS
:%=%_test
): %_test
:
457 $(MAKE
) -C drivers
/bus
/$* test
459 $(BUS
:%=%_clean
): %_clean
:
460 $(MAKE
) -C drivers
/bus
/$* clean
462 $(BUS
:%=%_install
): %_install
:
463 $(MAKE
) -C drivers
/bus
/$* install
465 $(BUS
:%=%_bootcd
): %_bootcd
:
466 $(MAKE
) -C drivers
/bus
/$* bootcd
468 .PHONY
: $(BUS
) $(BUS
:%=%_implib
) $(BUS
:%=%_clean
) \
469 $(BUS
:%=%_install
) $(BUS
:%=%_bootcd
)
473 # Driver support libraries rules
475 $(DRIVERS_LIB
): %: $(IMPLIB
)
476 $(MAKE
) -C drivers
/lib
/$*
478 $(DRIVERS_LIB
:%=%_implib
): %_implib
: dk
479 $(MAKE
) --silent
-C drivers
/lib
/$* implib
481 $(DRIVERS_LIB
:%=%_test
): %_test
:
482 $(MAKE
) -C drivers
/lib
/$* test
484 $(DRIVERS_LIB
:%=%_clean
): %_clean
:
485 $(MAKE
) -C drivers
/lib
/$* clean
487 $(DRIVERS_LIB
:%=%_install
): %_install
:
488 $(MAKE
) -C drivers
/lib
/$* install
490 $(DRIVERS_LIB
:%=%_bootcd
): %_bootcd
:
491 $(MAKE
) -C drivers
/lib
/$* bootcd
493 .PHONY
: $(DRIVERS_LIB
) $(DRIVERS_LIB
:%=%_implib
) $(DRIVERS_LIB
:%=%_test
) \
494 $(DRIVERS_LIB
:%=%_clean
) $(DRIVERS_LIB
:%=%_install
) $(DRIVERS_LIB
:%=%_bootcd
)
498 # Device driver rules
500 $(DEVICE_DRIVERS
): %: $(IMPLIB
)
501 $(MAKE
) -C drivers
/dd
/$*
503 $(DEVICE_DRIVERS
:%=%_implib
): %_implib
: dk
504 $(MAKE
) --silent
-C drivers
/dd
/$* implib
506 $(DEVICE_DRIVERS
:%=%_test
): %_test
:
507 $(MAKE
) -C drivers
/dd
/$* test
509 $(DEVICE_DRIVERS
:%=%_clean
): %_clean
:
510 $(MAKE
) -C drivers
/dd
/$* clean
512 $(DEVICE_DRIVERS
:%=%_install
): %_install
:
513 $(MAKE
) -C drivers
/dd
/$* install
515 $(DEVICE_DRIVERS
:%=%_bootcd
): %_bootcd
:
516 $(MAKE
) -C drivers
/dd
/$* bootcd
518 .PHONY
: $(DEVICE_DRIVERS
) $(DEVICE_DRIVERS
:%=%_implib
) $(DEVICE_DRIVERS
:%=%_test
) \
519 $(DEVICE_DRIVERS
:%=%_clean
) $(DEVICE_DRIVERS
:%=%_install
) $(DEVICE_DRIVERS
:%=%_bootcd
)
523 # Video device driver rules
525 VIDEO_DRIVERS
: $(IMPLIB
)
526 $(MAKE
) -C drivers
/video
528 VIDEO_DRIVERS_implib
: dk
529 $(MAKE
) --silent
-C drivers
/video implib
532 $(MAKE
) -C drivers
/video
test
535 $(MAKE
) -C drivers
/video
clean
537 VIDEO_DRIVERS_install
:
538 $(MAKE
) -C drivers
/video
install
540 VIDEO_DRIVERS_bootcd
:
541 $(MAKE
) -C drivers
/video bootcd
543 .PHONY
: VIDEO_DRIVERS VIDEO_DRIVERS_implib VIDEO_DRIVERS_test\
544 VIDEO_DRIVERS_clean VIDEO_DRIVERS_install VIDEO_DRIVERS_bootcd
550 $(INPUT_DRIVERS
): %: $(IMPLIB
)
551 $(MAKE
) -C drivers
/input
/$*
553 $(INPUT_DRIVERS
:%=%_implib
): %_implib
: dk
554 $(MAKE
) --silent
-C drivers
/input
/$* implib
556 $(INPUT_DRIVERS
:%=%_test
): %_test
:
557 $(MAKE
) -C drivers
/input
/$* test
559 $(INPUT_DRIVERS
:%=%_clean
): %_clean
:
560 $(MAKE
) -C drivers
/input
/$* clean
562 $(INPUT_DRIVERS
:%=%_install
): %_install
:
563 $(MAKE
) -C drivers
/input
/$* install
565 $(INPUT_DRIVERS
:%=%_bootcd
): %_bootcd
:
566 $(MAKE
) -C drivers
/input
/$* bootcd
568 .PHONY
: $(INPUT_DRIVERS
) $(INPUT_DRIVERS
:%=%_implib
) $(INPUT_DRIVERS
:%=%_test
) \
569 $(INPUT_DRIVERS
:%=%_clean
) $(INPUT_DRIVERS
:%=%_install
) $(INPUT_DRIVERS
:%=%_bootcd
)
572 # Filesystem driver rules
574 $(FS_DRIVERS
): %: $(IMPLIB
)
575 $(MAKE
) -C drivers
/fs
/$*
577 $(FS_DRIVERS
:%=%_implib
): %_implib
: dk
578 $(MAKE
) --silent
-C drivers
/fs
/$* implib
580 $(FS_DRIVERS
:%=%_test
): %_test
:
581 $(MAKE
) -C drivers
/fs
/$* test
583 $(FS_DRIVERS
:%=%_clean
): %_clean
:
584 $(MAKE
) -C drivers
/fs
/$* clean
586 $(FS_DRIVERS
:%=%_install
): %_install
:
587 $(MAKE
) -C drivers
/fs
/$* install
589 $(FS_DRIVERS
:%=%_bootcd
): %_bootcd
:
590 $(MAKE
) -C drivers
/fs
/$* bootcd
592 .PHONY
: $(FS_DRIVERS
) $(FS_DRIVERS
:%=%_implib
) $(FS_DRIVERS
:%=%_test
) \
593 $(FS_DRIVERS
:%=%_clean
) $(FS_DRIVERS
:%=%_install
) $(FS_DRIVERS
:%=%_bootcd
)
597 # Network driver rules
599 $(NET_DRIVERS
): %: $(IMPLIB
)
600 $(MAKE
) -C drivers
/net
/$*
602 $(NET_DRIVERS
:%=%_implib
): %_implib
: dk
603 $(MAKE
) --silent
-C drivers
/net
/$* implib
605 $(NET_DRIVERS
:%=%_test
): %_test
:
606 $(MAKE
) -C drivers
/net
/$* test
608 $(NET_DRIVERS
:%=%_clean
): %_clean
:
609 $(MAKE
) -C drivers
/net
/$* clean
611 $(NET_DRIVERS
:%=%_install
): %_install
:
612 $(MAKE
) -C drivers
/net
/$* install
614 $(NET_DRIVERS
:%=%_bootcd
): %_bootcd
:
615 $(MAKE
) -C drivers
/net
/$* bootcd
617 .PHONY
: $(NET_DRIVERS
) $(NET_DRIVERS
:%=%_implib
) $(NET_DRIVERS
:%=%_test
) \
618 $(NET_DRIVERS
:%=%_clean
) $(NET_DRIVERS
:%=%_install
) $(NET_DRIVERS
:%=%_bootcd
)
622 # Network device driver rules
624 $(NET_DEVICE_DRIVERS
): %: $(IMPLIB
)
625 $(MAKE
) -C drivers
/net
/dd
/$*
627 $(NET_DEVICE_DRIVERS
:%=%_implib
): %_implib
: dk
628 $(MAKE
) --silent
-C drivers
/net
/dd
/$* implib
630 $(NET_DEVICE_DRIVERS
:%=%_test
): %_test
:
631 $(MAKE
) -C drivers
/net
/dd
/$* test
633 $(NET_DEVICE_DRIVERS
:%=%_clean
): %_clean
:
634 $(MAKE
) -C drivers
/net
/dd
/$* clean
636 $(NET_DEVICE_DRIVERS
:%=%_install
): %_install
:
637 $(MAKE
) -C drivers
/net
/dd
/$* install
639 $(NET_DEVICE_DRIVERS
:%=%_bootcd
): %_bootcd
:
640 $(MAKE
) -C drivers
/net
/dd
/$* bootcd
642 .PHONY
: $(NET_DEVICE_DRIVERS
) $(NET_DEVICE_DRIVERS
:%=%_clean
) \
643 $(NET_DEVICE_DRIVERS
:%=%_implib
) $(NET_DEVICE_DRIVERS
:%=%_test
) \
644 $(NET_DEVICE_DRIVERS
:%=%_install
) $(NET_DEVICE_DRIVERS
:%=%_bootcd
)
648 # storage driver rules
650 $(STORAGE_DRIVERS
): %: $(IMPLIB
)
651 $(MAKE
) -C drivers
/storage
/$*
653 $(STORAGE_DRIVERS
:%=%_implib
): %_implib
: dk
654 $(MAKE
) --silent
-C drivers
/storage
/$* implib
656 $(STORAGE_DRIVERS
:%=%_test
): %_test
:
657 $(MAKE
) -C drivers
/storage
/$* test
659 $(STORAGE_DRIVERS
:%=%_clean
): %_clean
:
660 $(MAKE
) -C drivers
/storage
/$* clean
662 $(STORAGE_DRIVERS
:%=%_install
): %_install
:
663 $(MAKE
) -C drivers
/storage
/$* install
665 $(STORAGE_DRIVERS
:%=%_bootcd
): %_bootcd
:
666 $(MAKE
) -C drivers
/storage
/$* bootcd
668 .PHONY
: $(STORAGE_DRIVERS
) $(STORAGE_DRIVERS
:%=%_clean
) \
669 $(STORAGE_DRIVERS
:%=%_implib
) $(STORAGE_DRIVERS
:%=%_test
) \
670 $(STORAGE_DRIVERS
:%=%_install
) $(STORAGE_DRIVERS
:%=%_bootcd
)
677 $(MAKE
) -C loaders
/$*
679 $(LOADERS
:%=%_implib
): %_implib
: dk
681 $(LOADERS
:%=%_test
): %_test
:
683 $(LOADERS
:%=%_clean
): %_clean
:
684 $(MAKE
) -C loaders
/$* clean
686 $(LOADERS
:%=%_install
): %_install
:
687 $(MAKE
) -C loaders
/$* install
689 .PHONY
: $(LOADERS
) $(LOADERS
:%=%_implib
) $(LOADERS
:%=%_test
) \
690 $(LOADERS
:%=%_clean
) $(LOADERS
:%=%_install
)
694 # Required system components
700 $(MAKE
) --silent
-C ntoskrnl implib
703 $(MAKE
) -C ntoskrnl
test
706 $(MAKE
) -C ntoskrnl
clean
709 $(MAKE
) -C ntoskrnl
install
712 $(MAKE
) -C ntoskrnl bootcd
714 .PHONY
: ntoskrnl ntoskrnl_implib ntoskrnl_test \
715 ntoskrnl_clean ntoskrnl_install ntoskrnl_bootcd
719 # Hardware Abstraction Layer import library
721 hallib
: $(PATH_TO_TOP
)/include/roscfg.h ntoskrnl_implib
722 $(MAKE
) --silent
-C hal
/hal
724 hallib_implib
: dk ntoskrnl_implib
725 $(MAKE
) --silent
-C hal
/hal implib
728 $(MAKE
) -C hal
/hal
test
731 $(MAKE
) -C hal
/hal
clean
734 $(MAKE
) -C hal
/hal
install
737 $(MAKE
) -C hal
/hal bootcd
739 .PHONY
: hallib hallib_implib hallib_test hallib_clean \
740 hallib_install hallib_bootcd
744 # Hardware Abstraction Layers
746 $(HALS
): %: $(IMPLIB
)
749 $(HALS
:%=%_implib
): %_implib
: dk
750 $(MAKE
) --silent
-C hal
/$* implib
752 $(HALS
:%=%_test
): %_test
:
753 $(MAKE
) -C hal
/$* test
755 $(HALS
:%=%_clean
): %_clean
:
756 $(MAKE
) -C hal
/$* clean
758 $(HALS
:%=%_install
): %_install
:
759 $(MAKE
) -C hal
/$* install
761 $(HALS
:%=%_bootcd
): %_bootcd
:
762 $(MAKE
) -C hal
/$* bootcd
764 .PHONY
: $(HALS
) $(HALS
:%=%_implib
) $(HALS
:%=%_test
) \
765 $(HALS
:%=%_clean
) $(HALS
:%=%_install
) $(HALS
:%=%_bootcd
)
769 # File system libraries
772 $(MAKE
) -C lib
/fslib
/$*
774 $(LIB_FSLIB
:%=%_depends
): %_depends
:
775 $(MAKE
) -C lib
/fslib
/$* depends
777 $(LIB_FSLIB
:%=%_implib
): %_implib
: dk
778 $(MAKE
) --silent
-C lib
/fslib
/$* implib
780 $(LIB_FSLIB
:%=%_test
): %_test
:
781 $(MAKE
) -C lib
/fslib
/$* test
783 $(LIB_FSLIB
:%=%_clean
): %_clean
:
784 $(MAKE
) -C lib
/fslib
/$* clean
786 $(LIB_FSLIB
:%=%_install
): %_install
:
787 $(MAKE
) -C lib
/fslib
/$* install
789 $(LIB_FSLIB
:%=%_bootcd
): %_bootcd
:
790 $(MAKE
) -C lib
/fslib
/$* bootcd
792 .PHONY
: $(LIB_FSLIB
) $(LIB_FSLIB
:%=%_depends
) $(LIB_FSLIB
:%=%_implib
) \
793 $(LIB_FSLIB
:%=%_test
) $(LIB_FSLIB
:%=%_clean
) \
794 $(LIB_FSLIB
:%=%_install
) $(LIB_FSLIB
:%=%_bootcd
)
801 $(MAKE
) --silent
-C lib
/$*
803 $(LIB_STATIC
:%=%_depends
): %_depends
:
804 $(MAKE
) -C lib
/string depends
806 $(LIB_STATIC
:%=%_implib
): %_implib
: dk
807 $(MAKE
) --silent
-C lib
/$* implib
809 $(LIB_STATIC
:%=%_test
): %_test
:
810 $(MAKE
) -C lib
/$* test
812 $(LIB_STATIC
:%=%_clean
): %_clean
:
813 $(MAKE
) -C lib
/$* clean
815 $(LIB_STATIC
:%=%_install
): %_install
:
816 $(MAKE
) -C lib
/$* install
818 $(LIB_STATIC
:%=%_bootcd
): %_bootcd
:
819 $(MAKE
) -C lib
/$* bootcd
821 .PHONY
: $(LIB_STATIC
) $(LIB_STATIC
:%=%_depends
) $(LIB_STATIC
:%=%_implib
) \
822 $(LIB_STATIC
:%=%_test
) $(LIB_STATIC
:%=%_clean
) \
823 $(LIB_STATIC
:%=%_install
) $(LIB_STATIC
:%=%_bootcd
)
827 # MSVCRT is seperate since CRTDLL depend on this
830 $(MAKE
) -C lib
/msvcrt
833 $(MAKE
) -C lib
/msvcrt depends
836 $(MAKE
) --silent
-C lib
/msvcrt implib
839 $(MAKE
) -C lib
/msvcrt
test
842 $(MAKE
) -C lib
/msvcrt
clean
845 $(MAKE
) -C lib
/msvcrt
install
848 $(MAKE
) -C lib
/msvcrt bootcd
850 .PHONY
: msvcrt msvcrt_depends msvcrt_implib msvcrt_test \
851 msvcrt_clean msvcrt_install msvcrt_bootcd
857 $(DLLS
): %: $(IMPLIB
) msvcrt
860 $(DLLS
:%=%_depends
): %_depends
:
861 $(MAKE
) -C lib
/$* depends
863 $(DLLS
:%=%_implib
): %_implib
: dk
864 $(MAKE
) --silent
-C lib
/$* implib
866 $(DLLS
:%=%_test
): %_test
:
867 $(MAKE
) -C lib
/$* test
869 $(DLLS
:%=%_clean
): %_clean
:
870 $(MAKE
) -C lib
/$* clean
872 $(DLLS
:%=%_install
): %_install
:
873 $(MAKE
) -C lib
/$* install
875 $(DLLS
:%=%_bootcd
): %_bootcd
:
876 $(MAKE
) -C lib
/$* bootcd
878 .PHONY
: $(DLLS
) $(DLLS
:%=%_depends
) $(DLLS
:%=%_implib
) $(DLLS
:%=%_test
) \
879 $(DLLS
:%=%_clean
) $(DLLS
:%=%_install
) $(DLLS
:%=%_bootcd
)
883 # Subsystem support modules
885 $(SUBSYS
): %: $(IMPLIB
)
888 $(SUBSYS
:%=%_depends
): %_depends
:
889 $(MAKE
) -C subsys
/$* depends
891 $(SUBSYS
:%=%_implib
): %_implib
: dk
892 $(MAKE
) --silent
-C subsys
/$* implib
894 $(SUBSYS
:%=%_test
): %_test
:
895 $(MAKE
) -C subsys
/$* test
897 $(SUBSYS
:%=%_clean
): %_clean
:
898 $(MAKE
) -C subsys
/$* clean
900 $(SUBSYS
:%=%_install
): %_install
:
901 $(MAKE
) -C subsys
/$* install
903 $(SUBSYS
:%=%_bootcd
): %_bootcd
:
904 $(MAKE
) -C subsys
/$* bootcd
906 .PHONY
: $(SUBSYS
) $(SUBSYS
:%=%_depends
) $(SUBSYS
:%=%_implib
) $(SUBSYS
:%=%_test
) \
907 $(SUBSYS
:%=%_clean
) $(SUBSYS
:%=%_install
) $(SUBSYS
:%=%_bootcd
)
910 # Regression testsuite
913 $(REGTESTS
): %: $(IMPLIB
)
914 $(MAKE
) --silent
-C regtests
916 $(REGTESTS
:%=%_clean
): %_clean
:
917 $(MAKE
) -C regtests
clean
919 $(REGTESTS
:%=%_install
): %_install
:
920 $(MAKE
) -C regtests
install
922 .PHONY
: $(REGTESTS
) $(REGTESTS
:%=%_depends
) $(SUBSYS
:%=%_clean
) $(REGTESTS
:%=%_install
)
926 # Create an installation
930 $(RM
) $(INSTALL_DIR
)/system32
/drivers
/*.
*
931 $(RM
) $(INSTALL_DIR
)/system32
/config
/*.
*
932 $(RM
) $(INSTALL_DIR
)/system32
/*.
*
933 $(RM
) $(INSTALL_DIR
)/symbols
/*.
*
934 $(RM
) $(INSTALL_DIR
)/media
/fonts
/*.
*
935 $(RM
) $(INSTALL_DIR
)/media
/*.
*
936 $(RM
) $(INSTALL_DIR
)/inf
/*.
*
937 $(RM
) $(INSTALL_DIR
)/bin
/*.
*
938 $(RM
) $(INSTALL_DIR
)/*.com
939 $(RM
) $(INSTALL_DIR
)/*.bat
940 $(RMDIR
) $(INSTALL_DIR
)/system32
/drivers
941 $(RMDIR
) $(INSTALL_DIR
)/system32
/config
942 $(RMDIR
) $(INSTALL_DIR
)/system32
943 $(RMDIR
) $(INSTALL_DIR
)/symbols
944 $(RMDIR
) $(INSTALL_DIR
)/media
/fonts
945 $(RMDIR
) $(INSTALL_DIR
)/media
946 $(RMDIR
) $(INSTALL_DIR
)/inf
947 $(RMDIR
) $(INSTALL_DIR
)/bin
948 $(RMDIR
) $(INSTALL_DIR
)
951 $(RMKDIR
) $(INSTALL_DIR
)
952 $(RMKDIR
) $(INSTALL_DIR
)/bin
953 $(RMKDIR
) $(INSTALL_DIR
)/inf
954 $(RMKDIR
) $(INSTALL_DIR
)/media
955 $(RMKDIR
) $(INSTALL_DIR
)/media
/fonts
956 $(RMKDIR
) $(INSTALL_DIR
)/symbols
957 $(RMKDIR
) $(INSTALL_DIR
)/system32
958 $(RMKDIR
) $(INSTALL_DIR
)/system32
/config
959 $(RMKDIR
) $(INSTALL_DIR
)/system32
/drivers
960 $(RMKDIR
) $(INSTALL_DIR
)/system32
/drivers
/etc
963 $(CP
) bootc.lst
$(INSTALL_DIR
)/bootc.lst
964 $(CP
) boot.bat
$(INSTALL_DIR
)/boot.bat
965 $(CP
) aboot.bat
$(INSTALL_DIR
)/aboot.bat
966 $(CP
) media
/inf
$(INSTALL_DIR
)/inf
967 $(CP
) media
/fonts
$(INSTALL_DIR
)/media
/fonts
968 $(CP
) media
/nls
$(INSTALL_DIR
)/system32
969 $(CP
) media
/nls
/c_1252.nls
$(INSTALL_DIR
)/system32
/ansi.nls
970 $(CP
) media
/nls
/c_437.nls
$(INSTALL_DIR
)/system32
/oem.nls
971 $(CP
) media
/nls
/l_intl.nls
$(INSTALL_DIR
)/system32
/casemap.nls
972 $(CP
) media
/drivers
/etc
/services \
973 $(INSTALL_DIR
)/system32
/drivers
/etc
/services
975 .PHONY
: install_clean install_dirs install_before
979 find .
-name
"*.[ch]" -print | etags
--language
=c
-
983 echo generating ReactOS NTOSKRNL documentation ...
984 $(MAKE
) -C ntoskrnl docu
986 echo generating ReactOS drivers documentation ...
987 $(MAKE
) -C drivers docu
989 echo generating ReactOS NTDLL documentation ...
990 $(MAKE
) -C lib
/ntdll docu
992 echo generating ReactOS Freetype documentation ...
993 $(MAKE
) -C lib
/freetype docu
995 echo generating ReactOS libs documentation ...
998 echo generating ReactOS WIN32K documentation ...
999 $(MAKE
) -C subsys
/win32k docu
1001 echo generating ReactOS apps
+tools documentation ...
1002 $(MAKE
) -C apps docu
1004 echo generating ReactOS explorer documentation ...
1005 $(MAKE
) -C subsys
/system
/explorer full-docu
1007 echo generating remaining ReactOS documentation ...
1012 include $(TOOLS_PATH
)/config.mk