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". If your gcc is named i386-mingw32-gcc then set
8 # ROS_PREFIX to i386-mingw32. Don't include the dash (-) before gcc.
11 # This variable controls where to put intermediate files. Intermediate
12 # files are generated files that are needed to generate the final
13 # output files. Examples of intermediate files include *.o, *.a, and
14 # *.coff. N.B. Don't put a path separator at the end. The variable
15 # defaults to .\obj-i386.
18 # This variable controls where to put output files. Output files are
19 # generated files that makes up the result of the build process.
20 # Examples of output files include *.exe, *.dll, and *.sys. N.B. Don't
21 # put a path separator at the end. The variable defaults to .\output-i386.
24 # This variable controls where to put temporary files. Temporary files
25 # are (usually small) generated files that are needed to generate the
26 # intermediate or final output files. Examples of temporary files include
27 # *.rci (preprocessed .rc files for wrc), *.tmp, and *.exp. N.B. Don't put
28 # a path separator at the end. The variable defaults to the current
32 # This variable controls where to install output files to when using
33 # 'make install'. N.B. Don't put a path separator at the end. The variable
34 # defaults to .\reactos.
37 # This variable controls if map files are to be generated for executable
38 # output files. Map files have the extension .map. The value can be either
39 # full (to build map files with assembly code), yes (to build map files
40 # without source code) or no (to not build any map files). The variable
44 # This variable controls if non-symbol-stripped versions are to be built
45 # of executable output files. Non-symbol-stripped executable output files
46 # have .nostrip added to the filename just before the extension. The value
47 # can be either yes (to build non-symbol-stripped versions of executable
48 # output files) or no (to not build non-symbol-stripped versions of
49 # executable output files). The variable defaults to no.
52 # Pass parameters to rbuild.
61 ifeq ($(word 1,$(shell gcc
-dumpmachine
)),mingw32
)
68 # Default to half-verbose mode
74 ifeq ($(VERBOSE
),full
)
84 ifeq ($(HALFVERBOSEECHO
),yes
)
85 ECHO_CP
=@echo
[COPY
] $@
86 ECHO_MKDIR
=@echo
[MKDIR
] $@
87 ECHO_BUILDNO
=@echo
[BUILDNO
] $@
88 ECHO_INVOKE
=@echo
[INVOKE
] $<
89 ECHO_PCH
=@echo
[PCH
] $@
90 ECHO_CC
=@echo
[CC
] $<
91 ECHO_GAS
=@echo
[GAS
] $<
92 ECHO_NASM
=@echo
[NASM
] $<
93 ECHO_AR
=@echo
[AR
] $@
94 ECHO_WINEBLD
=@echo
[WINEBLD
] $@
95 ECHO_WRC
=@echo
[WRC
] $@
96 ECHO_WIDL
=@echo
[WIDL
] $@
97 ECHO_BIN2RES
=@echo
[BIN2RES
] $<
98 ECHO_DLLTOOL
=@echo
[DLLTOOL
] $@
99 ECHO_LD
=@echo
[LD
] $@
100 ECHO_NM
=@echo
[NM
] $@
101 ECHO_OBJDUMP
=@echo
[OBJDUMP
] $@
102 ECHO_RBUILD
=@echo
[RBUILD
] $@
103 ECHO_RSYM
=@echo
[RSYM
] $@
104 ECHO_WMC
=@echo
[WMC
] $@
105 ECHO_NCI
=@echo
[NCI
] $@
106 ECHO_CABMAN
=@echo
[CABMAN
] $<
107 ECHO_CDMAKE
=@echo
[CDMAKE
] $@
108 ECHO_MKHIVE
=@echo
[MKHIVE
] $@
109 ECHO_REGTESTS
=@echo
[REGTESTS
] $@
110 ECHO_TEST
=@echo
[TEST
] $@
145 host_objcopy
= $(Q
)objcopy
146 ifeq ($(HOST
),mingw32-linux
)
150 mkdir
= -$(Q
)mkdir
-p
151 gcc
= $(Q
)$(PREFIX
)-gcc
152 gpp
= $(Q
)$(PREFIX
)-g
++
153 ld = $(Q
)$(PREFIX
)-ld
154 nm
= $(Q
)$(PREFIX
)-nm
155 objdump
= $(Q
)$(PREFIX
)-objdump
156 ar = $(Q
)$(PREFIX
)-ar
157 objcopy
= $(Q
)$(PREFIX
)-objcopy
158 dlltool
= $(Q
)$(PREFIX
)-dlltool
159 windres
= $(Q
)$(PREFIX
)-windres
163 else # mingw32-windows
173 objdump
= $(Q
)objdump
175 objcopy
= $(Q
)objcopy
176 dlltool
= $(Q
)dlltool
177 windres
= $(Q
)windres
183 ifneq ($(ROS_INTERMEDIATE
),)
184 INTERMEDIATE
:= $(ROS_INTERMEDIATE
)
186 INTERMEDIATE
:= obj-i386
188 INTERMEDIATE_
:= $(INTERMEDIATE
)$(SEP
)
190 ifneq ($(ROS_OUTPUT
),)
191 OUTPUT
:= $(ROS_OUTPUT
)
193 OUTPUT
:= output-i386
195 OUTPUT_
:= $(OUTPUT
)$(SEP
)
197 ifneq ($(ROS_TEMPORARY
),)
198 TEMPORARY
:= $(ROS_TEMPORARY
)
202 TEMPORARY_
:= $(TEMPORARY
)$(SEP
)
204 ifneq ($(ROS_INSTALL
),)
205 INSTALL
:= $(ROS_INSTALL
)
209 INSTALL_
:= $(INSTALL
)$(SEP
)
214 ifneq ($(INTERMEDIATE
),$(OUTPUT
))
220 NTOSKRNL_MC
= ntoskrnl
$(SEP
)ntoskrnl.mc
221 KERNEL32_MC
= lib
$(SEP
)kernel32
$(SEP
)kernel32.mc
222 BUILDNO_H
= include$(SEP
)reactos
$(SEP
)buildno.h
223 BUGCODES_H
= include$(SEP
)reactos
$(SEP
)bugcodes.h
224 BUGCODES_RC
= ntoskrnl
$(SEP
)bugcodes.rc
225 ERRCODES_H
= include$(SEP
)reactos
$(SEP
)errcodes.h
226 ERRCODES_RC
= lib
$(SEP
)kernel32
$(SEP
)errcodes.rc
229 include tools
/tools.mak
230 -include makefile.auto
241 makefile.auto
: $(RBUILD_TARGET
) $(PREAUTO
) $(XMLBUILDFILES
)
243 $(Q
)$(RBUILD_TARGET
) $(ROS_RBUILDFLAGS
) mingw
246 $(BUGCODES_H
) $(BUGCODES_RC
): $(WMC_TARGET
) $(NTOSKRNL_MC
)
248 $(Q
)$(WMC_TARGET
) -i
-H
$(BUGCODES_H
) -o
$(BUGCODES_RC
) $(NTOSKRNL_MC
)
250 $(ERRCODES_H
) $(ERRCODES_RC
): $(WMC_TARGET
) $(KERNEL32_MC
)
252 $(Q
)$(WMC_TARGET
) -i
-H
$(ERRCODES_H
) -o
$(ERRCODES_RC
) $(KERNEL32_MC
)
254 .PHONY
: makefile_auto_clean
256 -@
$(rm) makefile.auto
$(PREAUTO
) 2>$(NUL
)
259 clean: makefile_auto_clean
263 @
-$(rm) makefile.auto
264 @
$(MAKE
) $(filter-out depends
, $(MAKECMDGOALS
))