70ac1cdff9065e3aeb9dc14f0425b17dcb29d93d
[reactos.git] / reactos / makefile_rex
1 #
2 # Global makefile
3 #
4
5 #
6 # Select your host
7 #
8 HOST = mingw32-linux
9 #HOST = djgpp-msdos
10 #HOST = mingw32-windows
11
12 include rules.mak
13
14 #
15 # Required to run the system
16 #
17 COMPONENTS = iface_native ntoskrnl
18 DLLS = ntdll kernel32 crtdll user32 fmifs
19 #DLLS = crtdll mingw32
20 SUBSYS = win32k
21
22 #
23 # Select the server(s) you want to build
24 #
25 SERVERS = win32 posix linux os2
26
27 #
28 # Select the loader(s) you want to build
29 #
30 LOADERS = dos
31 # LOADERS = boot
32
33 #
34 # Select the device drivers and filesystems you want
35 #
36 DEVICE_DRIVERS = blue ide keyboard mouse null parallel serial
37 # DEVICE_DRIVERS = beep event floppy ide_test sound test test1
38 FS_DRIVERS = minix vfat ext2
39 # FS_DRIVERS = template
40 KERNEL_SERVICES = $(DEVICE_DRIVERS) $(FS_DRIVERS)
41
42 APPS = args hello shell test cat bench
43 # APPS = cmd
44
45 all: $(COMPONENTS) $(DLLS) $(SUBSYS) $(LOADERS) $(KERNEL_SERVICES) $(APPS)
46 .PHONY: all
47
48 clean: $(COMPONENTS:%=%_clean) $(DLLS:%=%_clean) $(LOADERS:%=%_clean) \
49 $(KERNEL_SERVICES:%=%_clean) $(APPS:%=%_clean)
50 .PHONY: clean
51
52 #
53 # Applications
54 #
55 $(APPS): %:
56 make -C apps/$*
57
58 $(APPS:%=%_clean): %_clean:
59 make -C apps/$* clean
60
61 .PHONY: $(APPS) $(APPS:%=%_clean)
62
63 #
64 # Interfaces
65 #
66 iface_native:
67 make -C iface/native
68
69 iface_native_clean:
70 make -C iface/native clean
71
72 .PHONY: iface_native iface_native_clean
73
74 #
75 # Device driver rules
76 #
77 $(DEVICE_DRIVERS): %:
78 make -C services/dd/$*
79
80 $(DEVICE_DRIVERS:%=%_clean): %_clean:
81 make -C services/dd/$* clean
82
83 .PHONY: $(DEVICE_DRIVERS) $(DEVICE_DRIVERS:%=%_clean)
84
85 $(FS_DRIVERS): %:
86 make -C services/fs/$*
87
88 $(FS_DRIVERS:%=%_clean): %_clean:
89 make -C services/fs/$* clean
90
91 .PHONY: $(FS_DRIVERS) $(FS_DRIVERS:%=%_clean)
92
93 #
94 # Kernel loaders
95 #
96
97 $(LOADERS): %:
98 make -C loaders/$*
99
100 $(LOADERS:%=%_clean): %_clean:
101 make -C loaders/$* clean
102
103 .PHONY: $(LOADERS) $(LOADERS:%=%_clean)
104
105 #
106 # Required system components
107 #
108
109 ntoskrnl:
110 make -C ntoskrnl
111
112 ntoskrnl_clean:
113 make -C ntoskrnl clean
114
115 .PHONY: ntoskrnl ntoskrnl_clean
116
117 #
118 # Required DLLs
119 #
120
121 $(DLLS): %:
122 make -C lib/$*
123
124 $(DLLS:%=%_clean): %_clean:
125 make -C lib/$* clean
126
127 .PHONY: $(DLLS) $(DLLS:%=%_clean)
128
129 #
130 # Kernel Subsystems
131 #
132 $(SUBSYS): %:
133 make -C subsys/$*
134
135 $(SUBSYS:%=%_clean): %_clean:
136 make -C lib/$* clean
137
138 .PHONY: $(SUBSYS) $(SUBSYS:%=%_clean)
139
140