Merge 13159:13510 from trunk
[reactos.git] / reactos / Makefile
1 ifeq ($(HOST),mingw32-linux)
2 EXEPOSTFIX =
3 SEP = /
4 host_gcc = gcc
5 host_gpp = g++
6 nmkdir = mkdir -p
7 else # mingw32-windows
8 EXEPOSTFIX = .exe
9 SEP = \$(EMPTY_VAR)
10 host_gcc = gcc
11 host_gpp = g++
12 nmkdir = mkdir
13 endif
14
15 default: Makefile.auto
16
17 ifneq ($(ROS_INTERMEDIATE),)
18 $(ROS_INTERMEDIATE)tools: $(ROS_INTERMEDIATE)
19 else
20 $(ROS_INTERMEDIATE)tools:
21 endif
22 ${nmkdir} $(ROS_INTERMEDIATE)tools
23
24 ifneq ($(ROS_INTERMEDIATE),)
25 $(ROS_INTERMEDIATE):
26 ${nmkdir} $(ROS_INTERMEDIATE)
27 endif
28
29 include tools/Makefile
30 -include Makefile.auto
31
32 Makefile.auto: $(RMKDIR_TARGET) $(BUILDNO_TARGET) $(NCI_SERVICE_FILES) $(WMC_TARGET) $(RBUILD_TARGET)
33 tools$(SEP)rbuild$(SEP)rbuild$(EXEPOSTFIX) mingw
34 $(MAKE) $(MAKECMDGOALS)
35
36 init: \
37 include$(SEP)reactos$(SEP)bugcodes.h \
38 ntoskrnl$(SEP)bugcodes.rc \
39 include$(SEP)reactos$(SEP)errcodes.h \
40 lib$(SEP)kernel32$(SEP)errcodes.rc
41
42 include$(SEP)reactos$(SEP)bugcodes.h ntoskrnl$(SEP)bugcodes.rc: $(WMC_TARGET) ntoskrnl$(SEP)ntoskrnl.mc
43 $(WMC_TARGET) -H include$(SEP)reactos$(SEP)bugcodes.h -o ntoskrnl$(SEP)bugcodes.rc ntoskrnl$(SEP)ntoskrnl.mc
44
45 include$(SEP)reactos$(SEP)errcodes.h lib$(SEP)kernel32$(SEP)errcodes.rc: $(WMC_TARGET) lib$(SEP)kernel32$(SEP)kernel32.mc
46 $(WMC_TARGET) -H include$(SEP)reactos$(SEP)errcodes.h -o lib$(SEP)kernel32$(SEP)errcodes.rc lib$(SEP)kernel32$(SEP)kernel32.mc