1 # Accepted environment variables:
4 # This variable specifies the prefix of the MinGW installation. On Windows
5 # a prefix is usually not needed, but on linux it is usually "mingw32-". If
6 # not present and no executable named "gcc" can be found, then the prefix is
7 # assumed to be "mingw32-".
10 # This variable controls where to put intermediate files. Intermediate
11 # files are generated files that are needed to generate the final
12 # output files. Examples of intermediate files include *.o, *.a, and
13 # *.coff. N.B. Don't put a path separator at the end. The variable
14 # defaults to .\obj-i386.
17 # This variable controls where to put output files. Output files are
18 # generated files that makes up the result of the build process.
19 # Examples of output files include *.exe, *.dll, and *.sys. N.B. Don't
20 # put a path separator at the end. The variable defaults to .\output-i386.
23 # This variable controls where to put temporary files. Temporary files
24 # are (usually small) generated files that are needed to generate the
25 # intermediate or final output files. Examples of temporary files include
26 # *.rci (preprocessed .rc files for wrc), *.tmp, and *.exp. N.B. Don't put
27 # a path separator at the end. The variable defaults to the current
31 # This variable controls where to install output files to when using
32 # 'make install'. N.B. Don't put a path separator at the end. The variable
33 # defaults to .\reactos.
36 # This variable controls if map files are to be generated for executable
37 # output files. Map files have the extension .map. The value can be either
38 # full (to build map files with assembly code), yes (to build map files
39 # without source code) or no (to not build any map files). The variable
43 # This variable controls if non-symbol-stripped versions are to be built
44 # of executable output files. Non-symbol-stripped executable output files
45 # have .nostrip added to the filename just before the extension. The value
46 # can be either yes (to build non-symbol-stripped versions of executable
47 # output files) or no (to not build non-symbol-stripped versions of
48 # executable output files). The variable defaults to no.
51 # Pass parameters to rbuild.
60 ifeq ($(word 1,$(shell gcc
-dumpmachine
)),mingw32
)
67 # Default to half-verbose mode
73 ifeq ($(VERBOSE
),full
)
83 ifeq ($(HALFVERBOSEECHO
),yes
)
84 ECHO_CP
=@echo
[COPY
] $@
85 ECHO_MKDIR
=@echo
[MKDIR
] $@
86 ECHO_BUILDNO
=@echo
[BUILDNO
] $@
87 ECHO_INVOKE
=@echo
[INVOKE
] $<
88 ECHO_PCH
=@echo
[PCH
] $@
89 ECHO_CC
=@echo
[CC
] $<
90 ECHO_GAS
=@echo
[GAS
] $<
91 ECHO_NASM
=@echo
[NASM
] $<
92 ECHO_AR
=@echo
[AR
] $@
93 ECHO_WINEBLD
=@echo
[WINEBLD
] $@
94 ECHO_WRC
=@echo
[WRC
] $@
95 ECHO_WIDL
=@echo
[WIDL
] $@
96 ECHO_BIN2RES
=@echo
[BIN2RES
] $<
97 ECHO_DLLTOOL
=@echo
[DLLTOOL
] $@
98 ECHO_LD
=@echo
[LD
] $@
99 ECHO_NM
=@echo
[NM
] $@
100 ECHO_OBJDUMP
=@echo
[OBJDUMP
] $@
101 ECHO_RBUILD
=@echo
[RBUILD
] $@
102 ECHO_RSYM
=@echo
[RSYM
] $@
103 ECHO_WMC
=@echo
[WMC
] $@
104 ECHO_NCI
=@echo
[NCI
] $@
105 ECHO_CABMAN
=@echo
[CABMAN
] $<
106 ECHO_CDMAKE
=@echo
[CDMAKE
] $@
107 ECHO_MKHIVE
=@echo
[MKHIVE
] $@
108 ECHO_REGTESTS
=@echo
[REGTESTS
] $@
109 ECHO_TEST
=@echo
[TEST
] $@
144 host_objcopy
= $(Q
)objcopy
145 ifeq ($(HOST
),mingw32-linux
)
149 mkdir
= -$(Q
)mkdir
-p
150 gcc
= $(Q
)mingw32-gcc
151 gpp
= $(Q
)mingw32-g
++
154 objdump
= $(Q
)mingw32-objdump
156 objcopy
= $(Q
)mingw32-objcopy
157 dlltool
= $(Q
)mingw32-dlltool
158 windres
= $(Q
)mingw32-windres
162 else # mingw32-windows
172 objdump
= $(Q
)objdump
174 objcopy
= $(Q
)objcopy
175 dlltool
= $(Q
)dlltool
176 windres
= $(Q
)windres
182 ifneq ($(ROS_INTERMEDIATE
),)
183 INTERMEDIATE
:= $(ROS_INTERMEDIATE
)
185 INTERMEDIATE
:= obj-i386
187 INTERMEDIATE_
:= $(INTERMEDIATE
)$(SEP
)
189 ifneq ($(ROS_OUTPUT
),)
190 OUTPUT
:= $(ROS_OUTPUT
)
192 OUTPUT
:= output-i386
194 OUTPUT_
:= $(OUTPUT
)$(SEP
)
196 ifneq ($(ROS_TEMPORARY
),)
197 TEMPORARY
:= $(ROS_TEMPORARY
)
201 TEMPORARY_
:= $(TEMPORARY
)$(SEP
)
203 ifneq ($(ROS_INSTALL
),)
204 INSTALL
:= $(ROS_INSTALL
)
208 INSTALL_
:= $(INSTALL
)$(SEP
)
213 ifneq ($(INTERMEDIATE
),$(OUTPUT
))
219 NTOSKRNL_MC
= ntoskrnl
$(SEP
)ntoskrnl.mc
220 KERNEL32_MC
= lib
$(SEP
)kernel32
$(SEP
)kernel32.mc
221 BUILDNO_H
= include$(SEP
)reactos
$(SEP
)buildno.h
222 BUGCODES_H
= include$(SEP
)reactos
$(SEP
)bugcodes.h
223 BUGCODES_RC
= ntoskrnl
$(SEP
)bugcodes.rc
224 ERRCODES_H
= include$(SEP
)reactos
$(SEP
)errcodes.h
225 ERRCODES_RC
= lib
$(SEP
)kernel32
$(SEP
)errcodes.rc
228 include tools
/tools.mak
229 -include makefile.auto
240 makefile.auto
: $(RBUILD_TARGET
) $(PREAUTO
) $(XMLBUILDFILES
)
242 $(Q
)$(RBUILD_TARGET
) $(ROS_RBUILDFLAGS
) mingw
245 $(BUGCODES_H
) $(BUGCODES_RC
): $(WMC_TARGET
) $(NTOSKRNL_MC
)
247 $(Q
)$(WMC_TARGET
) -i
-H
$(BUGCODES_H
) -o
$(BUGCODES_RC
) $(NTOSKRNL_MC
)
249 $(ERRCODES_H
) $(ERRCODES_RC
): $(WMC_TARGET
) $(KERNEL32_MC
)
251 $(Q
)$(WMC_TARGET
) -i
-H
$(ERRCODES_H
) -o
$(ERRCODES_RC
) $(KERNEL32_MC
)
253 .PHONY
: makefile_auto_clean
255 -@
$(rm) makefile.auto
$(PREAUTO
) 2>$(NUL
)
258 clean: makefile_auto_clean
262 @
-$(rm) makefile.auto
263 @
$(MAKE
) $(filter-out depends
, $(MAKECMDGOALS
))