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
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
44 KERNEL_SERVICES
= $(DEVICE_DRIVERS
) $(FS_DRIVERS
) $(NET_DRIVERS
)
46 APPS
= args hello
shell test cat bench apc shm lpc thread event file gditest \
47 pteb consume dump_shared_data
51 all: buildno
$(COMPONENTS
) $(DLLS
) $(SUBSYS
) $(LOADERS
) $(KERNEL_SERVICES
) $(APPS
)
55 clean: buildno_clean
$(COMPONENTS
:%=%_clean
) $(DLLS
:%=%_clean
) $(LOADERS
:%=%_clean
) \
56 $(KERNEL_SERVICES
:%=%_clean
) $(SUBSYS
:%=%_clean
) $(APPS
:%=%_clean
)
60 ifeq ($(HOST
),mingw32-linux
)
61 rcopy
$(EXE_POSTFIX
): rcopy.c
62 $(NATIVE_CC
) -g
-DUNIX_PATHS rcopy.c
-o rcopy
$(EXE_POSTFIX
)
64 ifeq ($(HOST
),mingw32-windows
)
65 rcopy
$(EXE_POSTFIX
): rcopy.c
66 $(NATIVE_CC
) -g
-DDOS_PATHS rcopy.c
-o rcopy
$(EXE_POSTFIX
)
69 install: rcopy
$(EXE_POSTFIX
) make_install_dirs autoexec_install
$(COMPONENTS
:%=%_install
) \
70 $(DLLS
:%=%_install
) $(LOADERS
:%=%_install
) \
71 $(KERNEL_SERVICES
:%=%_install
) $(SUBSYS
:%=%_install
) \
74 dist: clean_dist_dir make_dist_dirs
$(COMPONENTS
:%=%_dist
) $(DLLS
:%=%_dist
) \
75 $(LOADERS
:%=%_dist
) $(KERNEL_SERVICES
:%=%_dist
) $(SUBSYS
:%=%_dist
) \
79 # Build number generator
81 buildno
: include/reactos
/version.h
85 make
-C apps
/buildno
clean
91 .PHONY
: buildno buildno_clean buildno_dist buildno_install
99 $(APPS
:%=%_clean
): %_clean
:
100 make
-C apps
/$* clean
102 $(APPS
:%=%_dist
): %_dist
:
105 $(APPS
:%=%_install
): %_install
:
106 make
-C apps
/$* install
108 .PHONY
: $(APPS
) $(APPS
:%=%_clean
) $(APPS
:%=%_install
) $(APPS
:%=%_dist
)
117 make
-C iface
/native
clean
119 iface_native_install
:
126 iface_additional_clean
:
127 make
-C iface
/addsys
clean
129 iface_additional_install
:
131 iface_additional_dist
:
133 .PHONY
: iface_native iface_native_clean iface_native_install \
135 iface_additional iface_additional_clean iface_additional_install \
136 iface_additional_dist
139 # Device driver rules
141 $(DEVICE_DRIVERS
): %:
142 make
-C services
/dd
/$*
144 $(DEVICE_DRIVERS
:%=%_clean
): %_clean
:
145 make
-C services
/dd
/$* clean
147 $(DEVICE_DRIVERS
:%=%_install
): %_install
:
148 make
-C services
/dd
/$* install
150 $(DEVICE_DRIVERS
:%=%_dist
): %_dist
:
151 make
-C services
/dd
/$* dist
153 .PHONY
: $(DEVICE_DRIVERS
) $(DEVICE_DRIVERS
:%=%_clean
) \
154 $(DEVICE_DRIVERS
:%=%_install
) $(DEVICE_DRIVERS
:%=%_dist
)
157 make
-C services
/fs
/$*
159 $(FS_DRIVERS
:%=%_clean
): %_clean
:
160 make
-C services
/fs
/$* clean
162 $(FS_DRIVERS
:%=%_install
): %_install
:
163 make
-C services
/fs
/$* install
165 $(FS_DRIVERS
:%=%_dist
): %_dist
:
166 make
-C services
/fs
/$* dist
168 .PHONY
: $(FS_DRIVERS
) $(FS_DRIVERS
:%=%_clean
) $(FS_DRIVERS
:%=%_install
) \
169 $(FS_DRIVERS
:%=%_dist
)
172 make
-C services
/net
/$*
174 $(NET_DRIVERS
:%=%_clean
): %_clean
:
175 make
-C services
/net
/$* clean
177 $(NET_DRIVERS
:%=%_install
): %_install
:
178 make
-C services
/net
/$* install
180 $(NET_DRIVERS
:%=%_dist
): %_dist
:
181 make
-C services
/net
/$* dist
183 .PHONY
: $(NET_DRIVERS
) $(NET_DRIVERS
:%=%_clean
) $(NET_DRIVERS
:%=%_install
) \
184 $(NET_DRIVERS
:%=%_dist
)
193 $(LOADERS
:%=%_clean
): %_clean
:
194 make
-C loaders
/$* clean
196 $(LOADERS
:%=%_install
): %_install
:
197 make
-C loaders
/$* install
199 $(LOADERS
:%=%_dist
): %_dist
:
200 make
-C loaders
/$* dist
202 .PHONY
: $(LOADERS
) $(LOADERS
:%=%_clean
) $(LOADERS
:%=%_install
) \
206 # Required system components
213 make
-C ntoskrnl
clean
216 make
-C ntoskrnl
install
219 make
-C ntoskrnl
dist
221 .PHONY
: ntoskrnl ntoskrnl_clean ntoskrnl_install ntoskrnl_dist
230 $(DLLS
:%=%_clean
): %_clean
:
233 $(DLLS
:%=%_install
): %_install
:
234 make
-C lib
/$* install
236 $(DLLS
:%=%_dist
): %_dist
:
239 .PHONY
: $(DLLS
) $(DLLS
:%=%_clean
) $(DLLS
:%=%_install
) $(DLLS
:%=%_dist
)
248 $(SUBSYS
:%=%_clean
): %_clean
:
249 make
-C subsys
/$* clean
251 $(SUBSYS
:%=%_install
): %_install
:
252 make
-C subsys
/$* install
254 $(SUBSYS
:%=%_dist
): %_dist
:
255 make
-C subsys
/$* dist
257 .PHONY
: $(SUBSYS
) $(SUBSYS
:%=%_clean
) $(SUBSYS
:%=%_install
) \
261 # Make an install floppy
265 .
/install.sh
/mnt
/hda1
266 .
/install.sh
/mnt
/hda4
271 mkdir
$(FLOPPY_DIR
)\dlls
272 mkdir
$(FLOPPY_DIR
)\apps
273 mkdir
$(FLOPPY_DIR
)\drivers
274 mkdir
$(FLOPPY_DIR
)\subsys
276 mkdir
$(FLOPPY_DIR
)/dlls
$(FLOPPY_DIR
)/apps
$(FLOPPY_DIR
)/drivers
277 mkdir
$(FLOPPY_DIR
)/subsys
280 .PHONY
: make_install_dirs
282 autoexec_install
: $(FLOPPY_DIR
)/autoexec.bat
284 $(FLOPPY_DIR
)/autoexec.bat
: bootflop.bat
286 $(CP
) bootflop.bat
$(FLOPPY_DIR
)\autoexec.bat
288 $(CP
) bootflop.bat
$(FLOPPY_DIR
)/autoexec.bat
292 # Make a distribution saveset
297 - $(RM
) $(DIST_DIR
)\dlls\
*.dll
298 - $(RM
) $(DIST_DIR
)\apps\
*.exe
299 - $(RM
) $(DIST_DIR
)\drivers\
*.sys
300 - $(RM
) $(DIST_DIR
)\subsys\
*.exe
301 - $(RMDIR
) $(DIST_DIR
)\dlls
302 - $(RMDIR
) $(DIST_DIR
)\apps
303 - $(RMDIR
) $(DIST_DIR
)\drivers
304 - $(RMDIR
) $(DIST_DIR
)\subsys
305 - $(RMDIR
) $(DIST_DIR
)
313 mkdir
$(DIST_DIR
)\dlls
314 mkdir
$(DIST_DIR
)\apps
315 mkdir
$(DIST_DIR
)\drivers
316 mkdir
$(DIST_DIR
)\dlls
317 mkdir
$(DIST_DIR
)\subsys
319 mkdir
$(DIST_DIR
) $(DIST_DIR
)/dlls
$(DIST_DIR
)/apps
$(DIST_DIR
)/drivers
320 mkdir
$(DIST_DIR
)/subsys
323 .PHONY
: clean_dist_dir make_dist_dirs
329 find .
-name
"*.[ch]" -print | etags
--language
=c
-