1 # $Id: Makefile,v 1.268 2004/12/09 06:04:40 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
30 HALS
= halx86
/up halx86
/mp
36 # Filesystem libraries
41 LIB_STATIC
= string rosrtl epsapi uuid libwine zlib rtl tgetopt pseh adns dxguid
43 # Keyboard layout libraries
44 DLLS_KBD
= kbdda kbddv kbdfr kbdgr kbdse kbduk kbdus
50 DLLS_SHELLEXT
= shellext
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
)
62 SUBSYS
= smss win32k csrss ntvdm
65 # Select the server(s) you want to build
67 #SERVERS = posix linux os2
70 # Driver support libraries
72 DRIVERS_LIB
= bzip2 oskittcp ip 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 msiexec
100 SYS_APPS
= autochk calc cmd explorer expand format regedt32 regsvr32 \
101 services setup taskmgr userinit usetup welcome vmwinst winlogon \
106 SYS_SVC
= rpcss eventlog
108 APPS
= testsets utils
111 # External modules and (sub)systems for ReactOS
112 # rosapps posix os2 (requires c++) java (non-existant)
115 ifeq ($(ROS_BUILD_EXT
),yes
)
116 EXT_MODULES
= $(EXTERNALS
)
121 KERNEL_DRIVERS
= $(DRIVERS_LIB
) $(DEVICE_DRIVERS
) $(INPUT_DRIVERS
) $(FS_DRIVERS
) \
122 $(NET_DRIVERS
) $(NET_DEVICE_DRIVERS
) $(STORAGE_DRIVERS
) VIDEO_DRIVERS
127 all: bootstrap
$(COMPONENTS
) $(REGTESTS
) $(HALS
) $(BUS
) $(LIB_FSLIB
) $(DLLS
) $(SUBSYS
) \
128 $(KERNEL_DRIVERS
) $(SYS_APPS
) $(SYS_SVC
) \
129 $(APPS
) $(EXT_MODULES
)
131 bootstrap
: dk implib iface_native iface_additional
133 #config: $(TOOLS:%=%_config)
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
)
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
)
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
)
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
159 $(RM
) $(PATH_TO_TOP
)/include/roscfg.h
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
169 FREELDR_DIR
= ..
/freeldr
172 $(MAKE
) -C
$(FREELDR_DIR
)
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
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
)
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
208 bootcd_basic
: bootcd_directory_layout bootcd_bootstrap_files bootcd_install_before
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
217 $(CP
) bootdata
/unattend.inf
$(BOOTCD_DIR
)/reactos
/unattend.inf
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
230 livecd_bootstrap_files
:
231 $(MAKE
) LIVECD_INSTALL
=yes fastinstall
233 livecd_install_before
:
234 $(MKHIVE
) bootdata
$(LIVECD_DIR
)/reactos
/system32
/config bootdata
/livecd.inf bootdata
/hiveinst.inf
236 livecd_basic
: livecd_directory_layout livecd_bootstrap_files livecd_install_before
239 $(CDMAKE
) -m
-j
-b
$(LIVECD_DIR
)/..
/isoboot.bin
$(LIVECD_DIR
) REACTOS roslive.iso
241 bootcd
: bootcd_basic bootcd_makecd
243 ubootcd
: bootcd_basic ubootcd_unattend bootcd_makecd
245 livecd
: livecd_basic livecd_makecd
248 $(MKHIVE
) bootdata
$(INSTALL_DIR
)/system32
/config bootdata
/hiveinst.inf
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
257 # System Applications
259 $(SYS_APPS
): %: $(IMPLIB
)
260 $(MAKE
) -C subsys
/system
/$*
262 $(SYS_APPS
:%=%_implib
): %_implib
: dk
263 $(MAKE
) --silent
-C subsys
/system
/$* implib
265 $(SYS_APPS
:%=%_test
): %_test
:
266 $(MAKE
) -C subsys
/system
/$* test
268 $(SYS_APPS
:%=%_clean
): %_clean
:
269 $(MAKE
) -C subsys
/system
/$* clean
271 $(SYS_APPS
:%=%_install
): %_install
:
272 $(MAKE
) -C subsys
/system
/$* install
274 $(SYS_APPS
:%=%_bootcd
): %_bootcd
:
275 $(MAKE
) -C subsys
/system
/$* bootcd
277 .PHONY
: $(SYS_APPS
) $(SYS_APPS
:%=%_implib
) $(SYS_APPS
:%=%_test
) \
278 $(SYS_APPS
:%=%_clean
) $(SYS_APPS
:%=%_install
) $(SYS_APPS
:%=%_bootcd
)
283 $(SYS_SVC
): %: $(IMPLIB
)
284 $(MAKE
) -C services
/$*
286 $(SYS_SVC
:%=%_depends
): %_depends
:
287 $(MAKE
) -C services
/$* depends
289 $(SYS_SVC
:%=%_implib
): %_implib
: dk
290 $(MAKE
) --silent
-C services
/$* implib
292 $(SYS_SVC
:%=%_test
): %_test
:
293 $(MAKE
) -C services
/$* test
295 $(SYS_SVC
:%=%_clean
): %_clean
:
296 $(MAKE
) -C services
/$* clean
298 $(SYS_SVC
:%=%_install
): %_install
:
299 $(MAKE
) -C services
/$* install
301 .PHONY
: $(SYS_SVC
) $(SYS_SVC
:%=%_depends
) $(SYS_SVC
:%=%_implib
) \
302 $(SYS_SVC
:%=%_test
) $(SYS_SVC
:%=%_clean
) $(SYS_SVC
:%=%_install
)
309 # Extra (optional system) Applications
311 $(APPS
): %: $(IMPLIB
)
315 # $(APPS:%=%_implib): %_implib: dk
316 # $(MAKE) --silent -C apps/$* implib
318 $(APPS
:%=%_test
): %_test
:
319 $(MAKE
) -C apps
/$* test
321 $(APPS
:%=%_clean
): %_clean
:
322 $(MAKE
) -C apps
/$* clean
324 $(APPS
:%=%_install
): %_install
:
325 $(MAKE
) -C apps
/$* install
327 .PHONY
: $(APPS
) $(APPS
:%=%_test
) $(APPS
:%=%_clean
) $(APPS
:%=%_install
)
331 # External ports and subsystem personalities
334 $(MAKE
) -C
$(ROOT_PATH
)/$*
336 $(EXTERNALS
:%=%_depends
): %_depends
:
337 $(MAKE
) -C
$(ROOT_PATH
)/$* depends
339 $(EXTERNALS
:%=%_implib
): %_implib
: dk
340 $(MAKE
) --silent
-C
$(ROOT_PATH
)/$* implib
342 $(EXTERNALS
:%=%_clean
): %_clean
:
343 $(MAKE
) -C
$(ROOT_PATH
)/$* clean
345 $(EXTERNALS
:%=%_install
): %_install
:
346 $(MAKE
) -C
$(ROOT_PATH
)/$* install
348 .PHONY
: $(EXTERNALS
) $(EXTERNALS
:%=%_depends
) $(EXTERNALS
:%=%_implib
) $(EXTERNALS
:%=%_clean
) $(EXTERNALS
:%=%_install
)
355 $(MAKE
) --silent
-C tools
364 $(MAKE
) -C tools
clean
368 .PHONY
: tools tools_implib tools_test tools_clean tools_install
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)
388 # WARNING! Be very sure that there are no important files
389 # in these directories before cleaning them!!!
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)
406 .PHONY
: dk dk_implib dk_clean dk_install
413 $(MAKE
) --silent
-C iface
/native
420 $(MAKE
) --silent
-C iface
/native
clean
422 iface_native_install
:
427 $(MAKE
) --silent
-C iface
/addsys
429 iface_additional_implib
:
431 iface_additional_test
:
433 iface_additional_clean
:
434 $(MAKE
) --silent
-C iface
/addsys
clean
436 iface_additional_install
:
438 iface_additional_bootcd
:
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
450 $(MAKE
) -C drivers
/bus
/$*
452 $(BUS
:%=%_implib
): %_implib
: dk
453 $(MAKE
) --silent
-C drivers
/bus
/$* implib
455 $(BUS
:%=%_test
): %_test
:
456 $(MAKE
) -C drivers
/bus
/$* test
458 $(BUS
:%=%_clean
): %_clean
:
459 $(MAKE
) -C drivers
/bus
/$* clean
461 $(BUS
:%=%_install
): %_install
:
462 $(MAKE
) -C drivers
/bus
/$* install
464 $(BUS
:%=%_bootcd
): %_bootcd
:
465 $(MAKE
) -C drivers
/bus
/$* bootcd
467 .PHONY
: $(BUS
) $(BUS
:%=%_implib
) $(BUS
:%=%_clean
) \
468 $(BUS
:%=%_install
) $(BUS
:%=%_bootcd
)
472 # Driver support libraries rules
474 $(DRIVERS_LIB
): %: $(IMPLIB
)
475 $(MAKE
) -C drivers
/lib
/$*
477 $(DRIVERS_LIB
:%=%_implib
): %_implib
: dk
478 $(MAKE
) --silent
-C drivers
/lib
/$* implib
480 $(DRIVERS_LIB
:%=%_test
): %_test
:
481 $(MAKE
) -C drivers
/lib
/$* test
483 $(DRIVERS_LIB
:%=%_clean
): %_clean
:
484 $(MAKE
) -C drivers
/lib
/$* clean
486 $(DRIVERS_LIB
:%=%_install
): %_install
:
487 $(MAKE
) -C drivers
/lib
/$* install
489 $(DRIVERS_LIB
:%=%_bootcd
): %_bootcd
:
490 $(MAKE
) -C drivers
/lib
/$* bootcd
492 .PHONY
: $(DRIVERS_LIB
) $(DRIVERS_LIB
:%=%_implib
) $(DRIVERS_LIB
:%=%_test
) \
493 $(DRIVERS_LIB
:%=%_clean
) $(DRIVERS_LIB
:%=%_install
) $(DRIVERS_LIB
:%=%_bootcd
)
497 # Device driver rules
499 $(DEVICE_DRIVERS
): %: $(IMPLIB
)
500 $(MAKE
) -C drivers
/dd
/$*
502 $(DEVICE_DRIVERS
:%=%_implib
): %_implib
: dk
503 $(MAKE
) --silent
-C drivers
/dd
/$* implib
505 $(DEVICE_DRIVERS
:%=%_test
): %_test
:
506 $(MAKE
) -C drivers
/dd
/$* test
508 $(DEVICE_DRIVERS
:%=%_clean
): %_clean
:
509 $(MAKE
) -C drivers
/dd
/$* clean
511 $(DEVICE_DRIVERS
:%=%_install
): %_install
:
512 $(MAKE
) -C drivers
/dd
/$* install
514 $(DEVICE_DRIVERS
:%=%_bootcd
): %_bootcd
:
515 $(MAKE
) -C drivers
/dd
/$* bootcd
517 .PHONY
: $(DEVICE_DRIVERS
) $(DEVICE_DRIVERS
:%=%_implib
) $(DEVICE_DRIVERS
:%=%_test
) \
518 $(DEVICE_DRIVERS
:%=%_clean
) $(DEVICE_DRIVERS
:%=%_install
) $(DEVICE_DRIVERS
:%=%_bootcd
)
522 # Video device driver rules
524 VIDEO_DRIVERS
: $(IMPLIB
)
525 $(MAKE
) -C drivers
/video
527 VIDEO_DRIVERS_implib
: dk
528 $(MAKE
) --silent
-C drivers
/video implib
531 $(MAKE
) -C drivers
/video
test
534 $(MAKE
) -C drivers
/video
clean
536 VIDEO_DRIVERS_install
:
537 $(MAKE
) -C drivers
/video
install
539 VIDEO_DRIVERS_bootcd
:
540 $(MAKE
) -C drivers
/video bootcd
542 .PHONY
: VIDEO_DRIVERS VIDEO_DRIVERS_implib VIDEO_DRIVERS_test\
543 VIDEO_DRIVERS_clean VIDEO_DRIVERS_install VIDEO_DRIVERS_bootcd
549 $(INPUT_DRIVERS
): %: $(IMPLIB
)
550 $(MAKE
) -C drivers
/input
/$*
552 $(INPUT_DRIVERS
:%=%_implib
): %_implib
: dk
553 $(MAKE
) --silent
-C drivers
/input
/$* implib
555 $(INPUT_DRIVERS
:%=%_test
): %_test
:
556 $(MAKE
) -C drivers
/input
/$* test
558 $(INPUT_DRIVERS
:%=%_clean
): %_clean
:
559 $(MAKE
) -C drivers
/input
/$* clean
561 $(INPUT_DRIVERS
:%=%_install
): %_install
:
562 $(MAKE
) -C drivers
/input
/$* install
564 $(INPUT_DRIVERS
:%=%_bootcd
): %_bootcd
:
565 $(MAKE
) -C drivers
/input
/$* bootcd
567 .PHONY
: $(INPUT_DRIVERS
) $(INPUT_DRIVERS
:%=%_implib
) $(INPUT_DRIVERS
:%=%_test
) \
568 $(INPUT_DRIVERS
:%=%_clean
) $(INPUT_DRIVERS
:%=%_install
) $(INPUT_DRIVERS
:%=%_bootcd
)
571 # Filesystem driver rules
573 $(FS_DRIVERS
): %: $(IMPLIB
)
574 $(MAKE
) -C drivers
/fs
/$*
576 $(FS_DRIVERS
:%=%_implib
): %_implib
: dk
577 $(MAKE
) --silent
-C drivers
/fs
/$* implib
579 $(FS_DRIVERS
:%=%_test
): %_test
:
580 $(MAKE
) -C drivers
/fs
/$* test
582 $(FS_DRIVERS
:%=%_clean
): %_clean
:
583 $(MAKE
) -C drivers
/fs
/$* clean
585 $(FS_DRIVERS
:%=%_install
): %_install
:
586 $(MAKE
) -C drivers
/fs
/$* install
588 $(FS_DRIVERS
:%=%_bootcd
): %_bootcd
:
589 $(MAKE
) -C drivers
/fs
/$* bootcd
591 .PHONY
: $(FS_DRIVERS
) $(FS_DRIVERS
:%=%_implib
) $(FS_DRIVERS
:%=%_test
) \
592 $(FS_DRIVERS
:%=%_clean
) $(FS_DRIVERS
:%=%_install
) $(FS_DRIVERS
:%=%_bootcd
)
596 # Network driver rules
598 $(NET_DRIVERS
): %: $(IMPLIB
)
599 $(MAKE
) -C drivers
/net
/$*
601 $(NET_DRIVERS
:%=%_implib
): %_implib
: dk
602 $(MAKE
) --silent
-C drivers
/net
/$* implib
604 $(NET_DRIVERS
:%=%_test
): %_test
:
605 $(MAKE
) -C drivers
/net
/$* test
607 $(NET_DRIVERS
:%=%_clean
): %_clean
:
608 $(MAKE
) -C drivers
/net
/$* clean
610 $(NET_DRIVERS
:%=%_install
): %_install
:
611 $(MAKE
) -C drivers
/net
/$* install
613 $(NET_DRIVERS
:%=%_bootcd
): %_bootcd
:
614 $(MAKE
) -C drivers
/net
/$* bootcd
616 .PHONY
: $(NET_DRIVERS
) $(NET_DRIVERS
:%=%_implib
) $(NET_DRIVERS
:%=%_test
) \
617 $(NET_DRIVERS
:%=%_clean
) $(NET_DRIVERS
:%=%_install
) $(NET_DRIVERS
:%=%_bootcd
)
621 # Network device driver rules
623 $(NET_DEVICE_DRIVERS
): %: $(IMPLIB
)
624 $(MAKE
) -C drivers
/net
/dd
/$*
626 $(NET_DEVICE_DRIVERS
:%=%_implib
): %_implib
: dk
627 $(MAKE
) --silent
-C drivers
/net
/dd
/$* implib
629 $(NET_DEVICE_DRIVERS
:%=%_test
): %_test
:
630 $(MAKE
) -C drivers
/net
/dd
/$* test
632 $(NET_DEVICE_DRIVERS
:%=%_clean
): %_clean
:
633 $(MAKE
) -C drivers
/net
/dd
/$* clean
635 $(NET_DEVICE_DRIVERS
:%=%_install
): %_install
:
636 $(MAKE
) -C drivers
/net
/dd
/$* install
638 $(NET_DEVICE_DRIVERS
:%=%_bootcd
): %_bootcd
:
639 $(MAKE
) -C drivers
/net
/dd
/$* bootcd
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
)
647 # storage driver rules
649 $(STORAGE_DRIVERS
): %: $(IMPLIB
)
650 $(MAKE
) -C drivers
/storage
/$*
652 $(STORAGE_DRIVERS
:%=%_implib
): %_implib
: dk
653 $(MAKE
) --silent
-C drivers
/storage
/$* implib
655 $(STORAGE_DRIVERS
:%=%_test
): %_test
:
656 $(MAKE
) -C drivers
/storage
/$* test
658 $(STORAGE_DRIVERS
:%=%_clean
): %_clean
:
659 $(MAKE
) -C drivers
/storage
/$* clean
661 $(STORAGE_DRIVERS
:%=%_install
): %_install
:
662 $(MAKE
) -C drivers
/storage
/$* install
664 $(STORAGE_DRIVERS
:%=%_bootcd
): %_bootcd
:
665 $(MAKE
) -C drivers
/storage
/$* bootcd
667 .PHONY
: $(STORAGE_DRIVERS
) $(STORAGE_DRIVERS
:%=%_clean
) \
668 $(STORAGE_DRIVERS
:%=%_implib
) $(STORAGE_DRIVERS
:%=%_test
) \
669 $(STORAGE_DRIVERS
:%=%_install
) $(STORAGE_DRIVERS
:%=%_bootcd
)
673 # Required system components
679 $(MAKE
) --silent
-C ntoskrnl implib
682 $(MAKE
) -C ntoskrnl
test
685 $(MAKE
) -C ntoskrnl
clean
688 $(MAKE
) -C ntoskrnl
install
691 $(MAKE
) -C ntoskrnl bootcd
693 .PHONY
: ntoskrnl ntoskrnl_implib ntoskrnl_test \
694 ntoskrnl_clean ntoskrnl_install ntoskrnl_bootcd
698 # Hardware Abstraction Layer import library
700 hallib
: $(PATH_TO_TOP
)/include/roscfg.h ntoskrnl_implib
701 $(MAKE
) --silent
-C hal
/hal
703 hallib_implib
: dk ntoskrnl_implib
704 $(MAKE
) --silent
-C hal
/hal implib
707 $(MAKE
) -C hal
/hal
test
710 $(MAKE
) -C hal
/hal
clean
713 $(MAKE
) -C hal
/hal
install
716 $(MAKE
) -C hal
/hal bootcd
718 .PHONY
: hallib hallib_implib hallib_test hallib_clean \
719 hallib_install hallib_bootcd
723 # Hardware Abstraction Layers
725 $(HALS
): %: $(IMPLIB
)
728 $(HALS
:%=%_implib
): %_implib
: dk
729 $(MAKE
) --silent
-C hal
/$* implib
731 $(HALS
:%=%_test
): %_test
:
732 $(MAKE
) -C hal
/$* test
734 $(HALS
:%=%_clean
): %_clean
:
735 $(MAKE
) -C hal
/$* clean
737 $(HALS
:%=%_install
): %_install
:
738 $(MAKE
) -C hal
/$* install
740 $(HALS
:%=%_bootcd
): %_bootcd
:
741 $(MAKE
) -C hal
/$* bootcd
743 .PHONY
: $(HALS
) $(HALS
:%=%_implib
) $(HALS
:%=%_test
) \
744 $(HALS
:%=%_clean
) $(HALS
:%=%_install
) $(HALS
:%=%_bootcd
)
748 # File system libraries
751 $(MAKE
) -C lib
/fslib
/$*
753 $(LIB_FSLIB
:%=%_depends
): %_depends
:
754 $(MAKE
) -C lib
/fslib
/$* depends
756 $(LIB_FSLIB
:%=%_implib
): %_implib
: dk
757 $(MAKE
) --silent
-C lib
/fslib
/$* implib
759 $(LIB_FSLIB
:%=%_test
): %_test
:
760 $(MAKE
) -C lib
/fslib
/$* test
762 $(LIB_FSLIB
:%=%_clean
): %_clean
:
763 $(MAKE
) -C lib
/fslib
/$* clean
765 $(LIB_FSLIB
:%=%_install
): %_install
:
766 $(MAKE
) -C lib
/fslib
/$* install
768 $(LIB_FSLIB
:%=%_bootcd
): %_bootcd
:
769 $(MAKE
) -C lib
/fslib
/$* bootcd
771 .PHONY
: $(LIB_FSLIB
) $(LIB_FSLIB
:%=%_depends
) $(LIB_FSLIB
:%=%_implib
) \
772 $(LIB_FSLIB
:%=%_test
) $(LIB_FSLIB
:%=%_clean
) \
773 $(LIB_FSLIB
:%=%_install
) $(LIB_FSLIB
:%=%_bootcd
)
780 $(MAKE
) --silent
-C lib
/$*
782 $(LIB_STATIC
:%=%_depends
): %_depends
:
783 $(MAKE
) -C lib
/string depends
785 $(LIB_STATIC
:%=%_implib
): %_implib
: dk
786 $(MAKE
) --silent
-C lib
/$* implib
788 $(LIB_STATIC
:%=%_test
): %_test
:
789 $(MAKE
) -C lib
/$* test
791 $(LIB_STATIC
:%=%_clean
): %_clean
:
792 $(MAKE
) -C lib
/$* clean
794 $(LIB_STATIC
:%=%_install
): %_install
:
795 $(MAKE
) -C lib
/$* install
797 $(LIB_STATIC
:%=%_bootcd
): %_bootcd
:
798 $(MAKE
) -C lib
/$* bootcd
800 .PHONY
: $(LIB_STATIC
) $(LIB_STATIC
:%=%_depends
) $(LIB_STATIC
:%=%_implib
) \
801 $(LIB_STATIC
:%=%_test
) $(LIB_STATIC
:%=%_clean
) \
802 $(LIB_STATIC
:%=%_install
) $(LIB_STATIC
:%=%_bootcd
)
806 # MSVCRT is seperate since CRTDLL depend on this
809 $(MAKE
) -C lib
/msvcrt
812 $(MAKE
) -C lib
/msvcrt depends
815 $(MAKE
) --silent
-C lib
/msvcrt implib
818 $(MAKE
) -C lib
/msvcrt
test
821 $(MAKE
) -C lib
/msvcrt
clean
824 $(MAKE
) -C lib
/msvcrt
install
827 $(MAKE
) -C lib
/msvcrt bootcd
829 .PHONY
: msvcrt msvcrt_depends msvcrt_implib msvcrt_test \
830 msvcrt_clean msvcrt_install msvcrt_bootcd
836 $(DLLS
): %: $(IMPLIB
) msvcrt
839 $(DLLS
:%=%_depends
): %_depends
:
840 $(MAKE
) -C lib
/$* depends
842 $(DLLS
:%=%_implib
): %_implib
: dk
843 $(MAKE
) --silent
-C lib
/$* implib
845 $(DLLS
:%=%_test
): %_test
:
846 $(MAKE
) -C lib
/$* test
848 $(DLLS
:%=%_clean
): %_clean
:
849 $(MAKE
) -C lib
/$* clean
851 $(DLLS
:%=%_install
): %_install
:
852 $(MAKE
) -C lib
/$* install
854 $(DLLS
:%=%_bootcd
): %_bootcd
:
855 $(MAKE
) -C lib
/$* bootcd
857 .PHONY
: $(DLLS
) $(DLLS
:%=%_depends
) $(DLLS
:%=%_implib
) $(DLLS
:%=%_test
) \
858 $(DLLS
:%=%_clean
) $(DLLS
:%=%_install
) $(DLLS
:%=%_bootcd
)
862 # Subsystem support modules
864 $(SUBSYS
): %: $(IMPLIB
)
867 $(SUBSYS
:%=%_depends
): %_depends
:
868 $(MAKE
) -C subsys
/$* depends
870 $(SUBSYS
:%=%_implib
): %_implib
: dk
871 $(MAKE
) --silent
-C subsys
/$* implib
873 $(SUBSYS
:%=%_test
): %_test
:
874 $(MAKE
) -C subsys
/$* test
876 $(SUBSYS
:%=%_clean
): %_clean
:
877 $(MAKE
) -C subsys
/$* clean
879 $(SUBSYS
:%=%_install
): %_install
:
880 $(MAKE
) -C subsys
/$* install
882 $(SUBSYS
:%=%_bootcd
): %_bootcd
:
883 $(MAKE
) -C subsys
/$* bootcd
885 .PHONY
: $(SUBSYS
) $(SUBSYS
:%=%_depends
) $(SUBSYS
:%=%_implib
) $(SUBSYS
:%=%_test
) \
886 $(SUBSYS
:%=%_clean
) $(SUBSYS
:%=%_install
) $(SUBSYS
:%=%_bootcd
)
889 # Regression testsuite
892 $(REGTESTS
): %: $(IMPLIB
)
893 $(MAKE
) --silent
-C regtests
895 $(REGTESTS
:%=%_implib
): %_implib
: dk
896 $(MAKE
) --silent
-C regtests implib
898 $(REGTESTS
:%=%_clean
): %_clean
:
899 $(MAKE
) -C regtests
clean
901 $(REGTESTS
:%=%_install
): %_install
:
902 $(MAKE
) -C regtests
install
904 .PHONY
: $(REGTESTS
) $(REGTESTS
:%=%_depends
) $(SUBSYS
:%=%_clean
) $(REGTESTS
:%=%_install
)
908 # Create an installation
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
)
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
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
952 .PHONY
: install_clean install_dirs install_before
956 find .
-name
"*.[ch]" -print | etags
--language
=c
-
960 echo generating ReactOS NTOSKRNL documentation ...
961 $(MAKE
) -C ntoskrnl docu
963 echo generating ReactOS drivers documentation ...
964 $(MAKE
) -C drivers docu
966 echo generating ReactOS NTDLL documentation ...
967 $(MAKE
) -C lib
/ntdll docu
969 echo generating ReactOS Freetype documentation ...
970 $(MAKE
) -C lib
/freetype docu
972 echo generating ReactOS libs documentation ...
975 echo generating ReactOS WIN32K documentation ...
976 $(MAKE
) -C subsys
/win32k docu
978 echo generating ReactOS apps
+tools documentation ...
981 echo generating ReactOS explorer documentation ...
982 $(MAKE
) -C subsys
/system
/explorer full-docu
984 echo generating remaining ReactOS documentation ...
989 include $(TOOLS_PATH
)/config.mk