9 #HOST = mingw32-windows
14 # Required to run the system
16 COMPONENTS
= iface_native iface_additional ntoskrnl
17 DLLS
= ntdll kernel32 crtdll advapi32 fmifs gdi32 secur32 user32
18 SUBSYS
= smss win32k csrss
21 # Select the server(s) you want to build
24 # SERVERS = posix linux os2
27 # Select the loader(s) you want to build
33 # Select the device drivers and filesystems you want
35 DEVICE_DRIVERS
= vidport vga blue ide keyboard null parallel serial floppy
36 # DEVICE_DRIVERS = beep event floppy ide_test mouse sound test test1
39 # FS_DRIVERS = minix ext2 template
41 # ndis tdi tcpip tditest
42 NET_DRIVERS
= ndis tcpip tditest
45 NET_DEVICE_DRIVERS
= ne2000
47 KERNEL_SERVICES
= $(DEVICE_DRIVERS
) $(FS_DRIVERS
) $(NET_DRIVERS
) $(NET_DEVICE_DRIVERS
)
49 APPS
= args hello
shell test cat bench apc shm lpc thread event file gditest \
50 pteb consume dump_shared_data vmtest wstest
53 all: buildno
$(COMPONENTS
) $(DLLS
) $(SUBSYS
) $(LOADERS
) $(KERNEL_SERVICES
) $(APPS
)
57 clean: buildno_clean
$(COMPONENTS
:%=%_clean
) $(DLLS
:%=%_clean
) $(LOADERS
:%=%_clean
) \
58 $(KERNEL_SERVICES
:%=%_clean
) $(SUBSYS
:%=%_clean
) $(APPS
:%=%_clean
)
62 ifeq ($(HOST
),mingw32-linux
)
63 rcopy
$(EXE_POSTFIX
): rcopy.c
64 $(NATIVE_CC
) -g
-DUNIX_PATHS rcopy.c
-o rcopy
$(EXE_POSTFIX
)
66 ifeq ($(HOST
),mingw32-windows
)
67 rcopy
$(EXE_POSTFIX
): rcopy.c
68 $(NATIVE_CC
) -g
-DDOS_PATHS rcopy.c
-o rcopy
$(EXE_POSTFIX
)
71 install: rcopy
$(EXE_POSTFIX
) make_install_dirs autoexec_install
$(COMPONENTS
:%=%_install
) \
72 $(DLLS
:%=%_install
) $(LOADERS
:%=%_install
) \
73 $(KERNEL_SERVICES
:%=%_install
) $(SUBSYS
:%=%_install
) \
76 dist: clean_dist_dir make_dist_dirs
$(COMPONENTS
:%=%_dist
) $(DLLS
:%=%_dist
) \
77 $(LOADERS
:%=%_dist
) $(KERNEL_SERVICES
:%=%_dist
) $(SUBSYS
:%=%_dist
) \
81 # Build number generator
83 buildno
: include/reactos
/version.h
87 make
-C apps
/buildno
clean
93 .PHONY
: buildno buildno_clean buildno_dist buildno_install
101 $(APPS
:%=%_clean
): %_clean
:
102 make
-C apps
/$* clean
104 $(APPS
:%=%_dist
): %_dist
:
107 $(APPS
:%=%_install
): %_install
:
108 make
-C apps
/$* install
110 .PHONY
: $(APPS
) $(APPS
:%=%_clean
) $(APPS
:%=%_install
) $(APPS
:%=%_dist
)
119 make
-C iface
/native
clean
121 iface_native_install
:
128 iface_additional_clean
:
129 make
-C iface
/addsys
clean
131 iface_additional_install
:
133 iface_additional_dist
:
135 .PHONY
: iface_native iface_native_clean iface_native_install \
137 iface_additional iface_additional_clean iface_additional_install \
138 iface_additional_dist
141 # Device driver rules
143 $(DEVICE_DRIVERS
): %:
144 make
-C services
/dd
/$*
146 $(DEVICE_DRIVERS
:%=%_clean
): %_clean
:
147 make
-C services
/dd
/$* clean
149 $(DEVICE_DRIVERS
:%=%_install
): %_install
:
150 make
-C services
/dd
/$* install
152 $(DEVICE_DRIVERS
:%=%_dist
): %_dist
:
153 make
-C services
/dd
/$* dist
155 .PHONY
: $(DEVICE_DRIVERS
) $(DEVICE_DRIVERS
:%=%_clean
) \
156 $(DEVICE_DRIVERS
:%=%_install
) $(DEVICE_DRIVERS
:%=%_dist
)
159 make
-C services
/fs
/$*
161 $(FS_DRIVERS
:%=%_clean
): %_clean
:
162 make
-C services
/fs
/$* clean
164 $(FS_DRIVERS
:%=%_install
): %_install
:
165 make
-C services
/fs
/$* install
167 $(FS_DRIVERS
:%=%_dist
): %_dist
:
168 make
-C services
/fs
/$* dist
170 .PHONY
: $(FS_DRIVERS
) $(FS_DRIVERS
:%=%_clean
) $(FS_DRIVERS
:%=%_install
) \
171 $(FS_DRIVERS
:%=%_dist
)
174 make
-C services
/net
/$*
176 $(NET_DRIVERS
:%=%_clean
): %_clean
:
177 make
-C services
/net
/$* clean
179 $(NET_DRIVERS
:%=%_install
): %_install
:
180 make
-C services
/net
/$* install
182 $(NET_DRIVERS
:%=%_dist
): %_dist
:
183 make
-C services
/net
/$* dist
185 .PHONY
: $(NET_DRIVERS
) $(NET_DRIVERS
:%=%_clean
) $(NET_DRIVERS
:%=%_install
) \
186 $(NET_DRIVERS
:%=%_dist
)
188 $(NET_DEVICE_DRIVERS
): %:
189 make
-C services
/net
/dd
/$*
191 $(NET_DEVICE_DRIVERS
:%=%_clean
): %_clean
:
192 make
-C services
/net
/dd
/$* clean
194 $(NET_DEVICE_DRIVERS
:%=%_install
): %_install
:
195 make
-C services
/net
/dd
/$* install
197 $(NET_DEVICE_DRIVERS
:%=%_dist
): %_dist
:
198 make
-C services
/net
/dd
/$* dist
200 .PHONY
: $(NET_DEVICE_DRIVERS
) $(NET_DEVICE_DRIVERS
:%=%_clean
) \
201 $(NET_DEVICE_DRIVERS
:%=%_install
) $(NET_DEVICE_DRIVERS
:%=%_dist
)
210 $(LOADERS
:%=%_clean
): %_clean
:
211 make
-C loaders
/$* clean
213 $(LOADERS
:%=%_install
): %_install
:
214 make
-C loaders
/$* install
216 $(LOADERS
:%=%_dist
): %_dist
:
217 make
-C loaders
/$* dist
219 .PHONY
: $(LOADERS
) $(LOADERS
:%=%_clean
) $(LOADERS
:%=%_install
) \
223 # Required system components
230 make
-C ntoskrnl
clean
233 make
-C ntoskrnl
install
236 make
-C ntoskrnl
dist
238 .PHONY
: ntoskrnl ntoskrnl_clean ntoskrnl_install ntoskrnl_dist
247 $(DLLS
:%=%_clean
): %_clean
:
250 $(DLLS
:%=%_install
): %_install
:
251 make
-C lib
/$* install
253 $(DLLS
:%=%_dist
): %_dist
:
256 .PHONY
: $(DLLS
) $(DLLS
:%=%_clean
) $(DLLS
:%=%_install
) $(DLLS
:%=%_dist
)
265 $(SUBSYS
:%=%_clean
): %_clean
:
266 make
-C subsys
/$* clean
268 $(SUBSYS
:%=%_install
): %_install
:
269 make
-C subsys
/$* install
271 $(SUBSYS
:%=%_dist
): %_dist
:
272 make
-C subsys
/$* dist
274 .PHONY
: $(SUBSYS
) $(SUBSYS
:%=%_clean
) $(SUBSYS
:%=%_install
) \
278 # Make an install floppy
282 .
/install.sh
/mnt
/hda1
283 .
/install.sh
/mnt
/hda4
288 mkdir
$(FLOPPY_DIR
)\dlls
289 mkdir
$(FLOPPY_DIR
)\apps
290 mkdir
$(FLOPPY_DIR
)\drivers
291 mkdir
$(FLOPPY_DIR
)\subsys
293 mkdir
$(FLOPPY_DIR
)/dlls
$(FLOPPY_DIR
)/apps
$(FLOPPY_DIR
)/drivers
294 mkdir
$(FLOPPY_DIR
)/subsys
297 .PHONY
: make_install_dirs
299 autoexec_install
: $(FLOPPY_DIR
)/autoexec.bat
301 $(FLOPPY_DIR
)/autoexec.bat
: bootflop.bat
303 $(CP
) bootflop.bat
$(FLOPPY_DIR
)\autoexec.bat
305 $(CP
) bootflop.bat
$(FLOPPY_DIR
)/autoexec.bat
309 # Make a distribution saveset
314 - $(RM
) $(DIST_DIR
)\dlls\
*.dll
315 - $(RM
) $(DIST_DIR
)\apps\
*.exe
316 - $(RM
) $(DIST_DIR
)\drivers\
*.sys
317 - $(RM
) $(DIST_DIR
)\subsys\
*.exe
318 - $(RMDIR
) $(DIST_DIR
)\dlls
319 - $(RMDIR
) $(DIST_DIR
)\apps
320 - $(RMDIR
) $(DIST_DIR
)\drivers
321 - $(RMDIR
) $(DIST_DIR
)\subsys
322 - $(RMDIR
) $(DIST_DIR
)
330 mkdir
$(DIST_DIR
)\dlls
331 mkdir
$(DIST_DIR
)\apps
332 mkdir
$(DIST_DIR
)\drivers
333 mkdir
$(DIST_DIR
)\dlls
334 mkdir
$(DIST_DIR
)\subsys
336 mkdir
$(DIST_DIR
) $(DIST_DIR
)/dlls
$(DIST_DIR
)/apps
$(DIST_DIR
)/drivers
337 mkdir
$(DIST_DIR
)/subsys
340 .PHONY
: clean_dist_dir make_dist_dirs
346 find .
-name
"*.[ch]" -print | etags
--language
=c
-