Added Novell Eagle 2000 Driver
[reactos.git] / reactos / Makefile
1 #
2 # Global makefile
3 #
4
5 #
6 # Select your host
7 #
8 #HOST = mingw32-linux
9 #HOST = mingw32-windows
10
11 include rules.mak
12
13 #
14 # Required to run the system
15 #
16 COMPONENTS = iface_native iface_additional ntoskrnl
17 DLLS = ntdll kernel32 crtdll advapi32 fmifs gdi32 secur32 user32
18 SUBSYS = smss win32k csrss
19
20 #
21 # Select the server(s) you want to build
22 #
23 SERVERS = win32
24 # SERVERS = posix linux os2
25
26 #
27 # Select the loader(s) you want to build
28 #
29 LOADERS = dos
30 # LOADERS = boot
31
32 #
33 # Select the device drivers and filesystems you want
34 #
35 DEVICE_DRIVERS = vidport vga blue ide keyboard null parallel serial floppy
36 # DEVICE_DRIVERS = beep event floppy ide_test mouse sound test test1
37
38 FS_DRIVERS = vfat
39 # FS_DRIVERS = minix ext2 template
40
41 # ndis tdi tcpip tditest
42 NET_DRIVERS = ndis tcpip tditest
43
44 # ne2000
45 NET_DEVICE_DRIVERS = ne2000
46
47 KERNEL_SERVICES = $(DEVICE_DRIVERS) $(FS_DRIVERS) $(NET_DRIVERS) $(NET_DEVICE_DRIVERS)
48
49 APPS = args hello shell test cat bench apc shm lpc thread event file gditest \
50 pteb consume dump_shared_data vmtest wstest
51 # objdir
52
53 all: buildno $(COMPONENTS) $(DLLS) $(SUBSYS) $(LOADERS) $(KERNEL_SERVICES) $(APPS)
54
55 .PHONY: all
56
57 clean: buildno_clean $(COMPONENTS:%=%_clean) $(DLLS:%=%_clean) $(LOADERS:%=%_clean) \
58 $(KERNEL_SERVICES:%=%_clean) $(SUBSYS:%=%_clean) $(APPS:%=%_clean)
59
60 .PHONY: clean
61
62 ifeq ($(HOST),mingw32-linux)
63 rcopy$(EXE_POSTFIX): rcopy.c
64 $(NATIVE_CC) -g -DUNIX_PATHS rcopy.c -o rcopy$(EXE_POSTFIX)
65 endif
66 ifeq ($(HOST),mingw32-windows)
67 rcopy$(EXE_POSTFIX): rcopy.c
68 $(NATIVE_CC) -g -DDOS_PATHS rcopy.c -o rcopy$(EXE_POSTFIX)
69 endif
70
71 install: rcopy$(EXE_POSTFIX) make_install_dirs autoexec_install $(COMPONENTS:%=%_install) \
72 $(DLLS:%=%_install) $(LOADERS:%=%_install) \
73 $(KERNEL_SERVICES:%=%_install) $(SUBSYS:%=%_install) \
74 $(APPS:%=%_install)
75
76 dist: clean_dist_dir make_dist_dirs $(COMPONENTS:%=%_dist) $(DLLS:%=%_dist) \
77 $(LOADERS:%=%_dist) $(KERNEL_SERVICES:%=%_dist) $(SUBSYS:%=%_dist) \
78 $(APPS:%=%_dist)
79
80 #
81 # Build number generator
82 #
83 buildno: include/reactos/version.h
84 make -C apps/buildno
85
86 buildno_clean:
87 make -C apps/buildno clean
88
89 buildno_dist:
90
91 buildno_install:
92
93 .PHONY: buildno buildno_clean buildno_dist buildno_install
94
95 #
96 # Applications
97 #
98 $(APPS): %:
99 make -C apps/$*
100
101 $(APPS:%=%_clean): %_clean:
102 make -C apps/$* clean
103
104 $(APPS:%=%_dist): %_dist:
105 make -C apps/$* dist
106
107 $(APPS:%=%_install): %_install:
108 make -C apps/$* install
109
110 .PHONY: $(APPS) $(APPS:%=%_clean) $(APPS:%=%_install) $(APPS:%=%_dist)
111
112 #
113 # Interfaces
114 #
115 iface_native:
116 make -C iface/native
117
118 iface_native_clean:
119 make -C iface/native clean
120
121 iface_native_install:
122
123 iface_native_dist:
124
125 iface_additional:
126 make -C iface/addsys
127
128 iface_additional_clean:
129 make -C iface/addsys clean
130
131 iface_additional_install:
132
133 iface_additional_dist:
134
135 .PHONY: iface_native iface_native_clean iface_native_install \
136 iface_native_dist \
137 iface_additional iface_additional_clean iface_additional_install \
138 iface_additional_dist
139
140 #
141 # Device driver rules
142 #
143 $(DEVICE_DRIVERS): %:
144 make -C services/dd/$*
145
146 $(DEVICE_DRIVERS:%=%_clean): %_clean:
147 make -C services/dd/$* clean
148
149 $(DEVICE_DRIVERS:%=%_install): %_install:
150 make -C services/dd/$* install
151
152 $(DEVICE_DRIVERS:%=%_dist): %_dist:
153 make -C services/dd/$* dist
154
155 .PHONY: $(DEVICE_DRIVERS) $(DEVICE_DRIVERS:%=%_clean) \
156 $(DEVICE_DRIVERS:%=%_install) $(DEVICE_DRIVERS:%=%_dist)
157
158 $(FS_DRIVERS): %:
159 make -C services/fs/$*
160
161 $(FS_DRIVERS:%=%_clean): %_clean:
162 make -C services/fs/$* clean
163
164 $(FS_DRIVERS:%=%_install): %_install:
165 make -C services/fs/$* install
166
167 $(FS_DRIVERS:%=%_dist): %_dist:
168 make -C services/fs/$* dist
169
170 .PHONY: $(FS_DRIVERS) $(FS_DRIVERS:%=%_clean) $(FS_DRIVERS:%=%_install) \
171 $(FS_DRIVERS:%=%_dist)
172
173 $(NET_DRIVERS): %:
174 make -C services/net/$*
175
176 $(NET_DRIVERS:%=%_clean): %_clean:
177 make -C services/net/$* clean
178
179 $(NET_DRIVERS:%=%_install): %_install:
180 make -C services/net/$* install
181
182 $(NET_DRIVERS:%=%_dist): %_dist:
183 make -C services/net/$* dist
184
185 .PHONY: $(NET_DRIVERS) $(NET_DRIVERS:%=%_clean) $(NET_DRIVERS:%=%_install) \
186 $(NET_DRIVERS:%=%_dist)
187
188 $(NET_DEVICE_DRIVERS): %:
189 make -C services/net/dd/$*
190
191 $(NET_DEVICE_DRIVERS:%=%_clean): %_clean:
192 make -C services/net/dd/$* clean
193
194 $(NET_DEVICE_DRIVERS:%=%_install): %_install:
195 make -C services/net/dd/$* install
196
197 $(NET_DEVICE_DRIVERS:%=%_dist): %_dist:
198 make -C services/net/dd/$* dist
199
200 .PHONY: $(NET_DEVICE_DRIVERS) $(NET_DEVICE_DRIVERS:%=%_clean) \
201 $(NET_DEVICE_DRIVERS:%=%_install) $(NET_DEVICE_DRIVERS:%=%_dist)
202
203 #
204 # Kernel loaders
205 #
206
207 $(LOADERS): %:
208 make -C loaders/$*
209
210 $(LOADERS:%=%_clean): %_clean:
211 make -C loaders/$* clean
212
213 $(LOADERS:%=%_install): %_install:
214 make -C loaders/$* install
215
216 $(LOADERS:%=%_dist): %_dist:
217 make -C loaders/$* dist
218
219 .PHONY: $(LOADERS) $(LOADERS:%=%_clean) $(LOADERS:%=%_install) \
220 $(LOADERS:%=%_dist)
221
222 #
223 # Required system components
224 #
225
226 ntoskrnl:
227 make -C ntoskrnl
228
229 ntoskrnl_clean:
230 make -C ntoskrnl clean
231
232 ntoskrnl_install:
233 make -C ntoskrnl install
234
235 ntoskrnl_dist:
236 make -C ntoskrnl dist
237
238 .PHONY: ntoskrnl ntoskrnl_clean ntoskrnl_install ntoskrnl_dist
239
240 #
241 # Required DLLs
242 #
243
244 $(DLLS): %:
245 make -C lib/$*
246
247 $(DLLS:%=%_clean): %_clean:
248 make -C lib/$* clean
249
250 $(DLLS:%=%_install): %_install:
251 make -C lib/$* install
252
253 $(DLLS:%=%_dist): %_dist:
254 make -C lib/$* dist
255
256 .PHONY: $(DLLS) $(DLLS:%=%_clean) $(DLLS:%=%_install) $(DLLS:%=%_dist)
257
258 #
259 # Kernel Subsystems
260 #
261
262 $(SUBSYS): %:
263 make -C subsys/$*
264
265 $(SUBSYS:%=%_clean): %_clean:
266 make -C subsys/$* clean
267
268 $(SUBSYS:%=%_install): %_install:
269 make -C subsys/$* install
270
271 $(SUBSYS:%=%_dist): %_dist:
272 make -C subsys/$* dist
273
274 .PHONY: $(SUBSYS) $(SUBSYS:%=%_clean) $(SUBSYS:%=%_install) \
275 $(SUBSYS:%=%_dist)
276
277 #
278 # Make an install floppy
279 #
280
281 install: all
282 ./install.sh /mnt/hda1
283 ./install.sh /mnt/hda4
284 ./install.bochs
285
286 make_install_dirs:
287 ifeq ($(DOSCLI),yes)
288 mkdir $(FLOPPY_DIR)\dlls
289 mkdir $(FLOPPY_DIR)\apps
290 mkdir $(FLOPPY_DIR)\drivers
291 mkdir $(FLOPPY_DIR)\subsys
292 else
293 mkdir $(FLOPPY_DIR)/dlls $(FLOPPY_DIR)/apps $(FLOPPY_DIR)/drivers
294 mkdir $(FLOPPY_DIR)/subsys
295 endif
296
297 .PHONY: make_install_dirs
298
299 autoexec_install: $(FLOPPY_DIR)/autoexec.bat
300
301 $(FLOPPY_DIR)/autoexec.bat: bootflop.bat
302 ifeq ($(DOSCLI),yes)
303 $(CP) bootflop.bat $(FLOPPY_DIR)\autoexec.bat
304 else
305 $(CP) bootflop.bat $(FLOPPY_DIR)/autoexec.bat
306 endif
307
308 #
309 # Make a distribution saveset
310 #
311
312 clean_dist_dir:
313 ifeq ($(DOSCLI),yes)
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)
323 else
324 $(RM) -r $(DIST_DIR)
325 endif
326
327 make_dist_dirs:
328 ifeq ($(DOSCLI),yes)
329 mkdir $(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
335 else
336 mkdir $(DIST_DIR) $(DIST_DIR)/dlls $(DIST_DIR)/apps $(DIST_DIR)/drivers
337 mkdir $(DIST_DIR)/subsys
338 endif
339
340 .PHONY: clean_dist_dir make_dist_dirs
341
342 #
343 #
344 #
345 etags:
346 find . -name "*.[ch]" -print | etags --language=c -
347
348 # EOF