1 # Accepted environment variables:
4 # This variable controls where to put intermediate files. Intermediate
5 # files are generated files that are needed to generate the final
6 # output files. Examples of intermediate files include *.o, *.a, and
7 # *.coff. N.B. Don't put a path separator at the end. The variable
8 # defaults to .\obj-i386.
11 # This variable controls where to put output files. Output files are
12 # generated files that makes up the result of the build process.
13 # Examples of output files include *.exe, *.dll, and *.sys. N.B. Don't
14 # put a path separator at the end. The variable defaults to .\output-i386.
17 # This variable controls where to put temporary files. Temporary files
18 # are (usually small) generated files that are needed to generate the
19 # intermediate or final output files. Examples of temporary files include
20 # *.rci (preprocessed .rc files for wrc), *.tmp, and *.exp. N.B. Don't put
21 # a path separator at the end. The variable defaults to the current
25 # This variable controls if map files are to be generated for executable
26 # output files. Map files have the extension .map. The value can be either
27 # full (to build map files with assembly code), yes (to build map files
28 # without source code) or no (to not build any map files). The variable
39 ifeq ($(word 1,$(shell gcc
-dumpmachine
)),mingw32
)
46 # Default to half-verbose mode
62 ifeq ($(HALFVERBOSEECHO
),yes
)
63 ECHO_MKDIR
=@echo
[MKDIR
] $@
64 ECHO_BUILDNO
=@echo
[BUILDNO
] $@
65 ECHO_INVOKE
=@echo
[INVOKE
] $<
66 ECHO_PCH
=@echo
[PCH
] $@
67 ECHO_CC
=@echo
[CC
] $<
68 ECHO_GAS
=@echo
[GAS
] $<
69 ECHO_NASM
=@echo
[NASM
] $<
70 ECHO_AR
=@echo
[AR
] $@
71 ECHO_WINEBLD
=@echo
[WINEBLD
] $@
72 ECHO_WRC
=@echo
[WRC
] $@
73 ECHO_BIN2RES
=@echo
[BIN2RES
] $<
74 ECHO_DLLTOOL
=@echo
[DLLTOOL
] $@
75 ECHO_LD
=@echo
[LD
] $@
76 ECHO_NM
=@echo
[NM
] $@
77 ECHO_OBJDUMP
=@echo
[OBJDUMP
] $@
78 ECHO_RBUILD
=@echo
[RBUILD
] $@
79 ECHO_RSYM
=@echo
[RSYM
] $@
80 ECHO_WMC
=@echo
[WMC
] $@
81 ECHO_NCI
=@echo
[NCI
] $@
82 ECHO_CABMAN
=@echo
[CABMAN
] $<
83 ECHO_CDMAKE
=@echo
[CDMAKE
] $@
84 ECHO_REGTESTS
=@echo
[REGTESTS
] $@
85 ECHO_TEST
=@echo
[TEST
] $@
117 host_objcopy
= $(Q
)objcopy
118 ifeq ($(HOST
),mingw32-linux
)
122 mkdir
= -$(Q
)mkdir
-p
123 gcc
= $(Q
)mingw32-gcc
124 gpp
= $(Q
)mingw32-g
++
127 objdump
= $(Q
)mingw32-objdump
129 objcopy
= $(Q
)mingw32-objcopy
130 dlltool
= $(Q
)mingw32-dlltool
131 windres
= $(Q
)mingw32-windres
135 else # mingw32-windows
145 objdump
= $(Q
)objdump
147 objcopy
= $(Q
)objcopy
148 dlltool
= $(Q
)dlltool
149 windres
= $(Q
)windres
155 ifneq ($(ROS_INTERMEDIATE
),)
156 INTERMEDIATE
:= $(ROS_INTERMEDIATE
)
158 INTERMEDIATE
:= obj-i386
160 INTERMEDIATE_
:= $(INTERMEDIATE
)$(SEP
)
162 ifneq ($(ROS_OUTPUT
),)
163 OUTPUT
:= $(ROS_OUTPUT
)
165 OUTPUT
:= output-i386
167 OUTPUT_
:= $(OUTPUT
)$(SEP
)
172 ifneq ($(INTERMEDIATE
),$(OUTPUT
))
177 NTOSKRNL_MC
= ntoskrnl
$(SEP
)ntoskrnl.mc
178 KERNEL32_MC
= lib
$(SEP
)kernel32
$(SEP
)kernel32.mc
179 BUILDNO_H
= include$(SEP
)reactos
$(SEP
)buildno.h
180 BUGCODES_H
= include$(SEP
)reactos
$(SEP
)bugcodes.h
181 BUGCODES_RC
= ntoskrnl
$(SEP
)bugcodes.rc
182 ERRCODES_H
= include$(SEP
)reactos
$(SEP
)errcodes.h
183 ERRCODES_RC
= lib
$(SEP
)kernel32
$(SEP
)errcodes.rc
186 include tools
/tools.mak
187 -include makefile.auto
197 makefile.auto
: $(RBUILD_TARGET
) $(PREAUTO
) $(XMLBUILDFILES
)
199 $(Q
)$(RBUILD_TARGET
) mingw
202 $(BUGCODES_H
) $(BUGCODES_RC
): $(WMC_TARGET
) $(NTOSKRNL_MC
)
204 $(Q
)$(WMC_TARGET
) -i
-H
$(BUGCODES_H
) -o
$(BUGCODES_RC
) $(NTOSKRNL_MC
)
206 $(ERRCODES_H
) $(ERRCODES_RC
): $(WMC_TARGET
) $(KERNEL32_MC
)
208 $(Q
)$(WMC_TARGET
) -i
-H
$(ERRCODES_H
) -o
$(ERRCODES_RC
) $(KERNEL32_MC
)
210 .PHONY
: makefile_auto_clean
212 -@
$(rm) makefile.auto
$(PREAUTO
) 2>$(NUL
)
215 clean: makefile_auto_clean