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 # Pass parameters to rbuild.
52 ifeq ($(word 1,$(shell gcc
-dumpmachine
)),mingw32
)
59 # Default to half-verbose mode
75 ifeq ($(HALFVERBOSEECHO
),yes
)
76 ECHO_CP
=@echo
[COPY
] $@
77 ECHO_MKDIR
=@echo
[MKDIR
] $@
78 ECHO_BUILDNO
=@echo
[BUILDNO
] $@
79 ECHO_INVOKE
=@echo
[INVOKE
] $<
80 ECHO_PCH
=@echo
[PCH
] $@
81 ECHO_CC
=@echo
[CC
] $<
82 ECHO_GAS
=@echo
[GAS
] $<
83 ECHO_NASM
=@echo
[NASM
] $<
84 ECHO_AR
=@echo
[AR
] $@
85 ECHO_WINEBLD
=@echo
[WINEBLD
] $@
86 ECHO_WRC
=@echo
[WRC
] $@
87 ECHO_WIDL
=@echo
[WIDL
] $@
88 ECHO_BIN2RES
=@echo
[BIN2RES
] $<
89 ECHO_DLLTOOL
=@echo
[DLLTOOL
] $@
90 ECHO_LD
=@echo
[LD
] $@
91 ECHO_NM
=@echo
[NM
] $@
92 ECHO_OBJDUMP
=@echo
[OBJDUMP
] $@
93 ECHO_RBUILD
=@echo
[RBUILD
] $@
94 ECHO_RSYM
=@echo
[RSYM
] $@
95 ECHO_WMC
=@echo
[WMC
] $@
96 ECHO_NCI
=@echo
[NCI
] $@
97 ECHO_CABMAN
=@echo
[CABMAN
] $<
98 ECHO_CDMAKE
=@echo
[CDMAKE
] $@
99 ECHO_MKHIVE
=@echo
[MKHIVE
] $@
100 ECHO_REGTESTS
=@echo
[REGTESTS
] $@
101 ECHO_TEST
=@echo
[TEST
] $@
136 host_objcopy
= $(Q
)objcopy
137 ifeq ($(HOST
),mingw32-linux
)
141 mkdir
= -$(Q
)mkdir
-p
142 gcc
= $(Q
)mingw32-gcc
143 gpp
= $(Q
)mingw32-g
++
146 objdump
= $(Q
)mingw32-objdump
148 objcopy
= $(Q
)mingw32-objcopy
149 dlltool
= $(Q
)mingw32-dlltool
150 windres
= $(Q
)mingw32-windres
154 else # mingw32-windows
164 objdump
= $(Q
)objdump
166 objcopy
= $(Q
)objcopy
167 dlltool
= $(Q
)dlltool
168 windres
= $(Q
)windres
174 ifneq ($(ROS_INTERMEDIATE
),)
175 INTERMEDIATE
:= $(ROS_INTERMEDIATE
)
177 INTERMEDIATE
:= obj-i386
179 INTERMEDIATE_
:= $(INTERMEDIATE
)$(SEP
)
181 ifneq ($(ROS_OUTPUT
),)
182 OUTPUT
:= $(ROS_OUTPUT
)
184 OUTPUT
:= output-i386
186 OUTPUT_
:= $(OUTPUT
)$(SEP
)
188 ifneq ($(ROS_TEMPORARY
),)
189 TEMPORARY
:= $(ROS_TEMPORARY
)
193 TEMPORARY_
:= $(TEMPORARY
)$(SEP
)
195 ifneq ($(ROS_INSTALL
),)
196 INSTALL
:= $(ROS_INSTALL
)
200 INSTALL_
:= $(INSTALL
)$(SEP
)
205 ifneq ($(INTERMEDIATE
),$(OUTPUT
))
211 NTOSKRNL_MC
= ntoskrnl
$(SEP
)ntoskrnl.mc
212 KERNEL32_MC
= lib
$(SEP
)kernel32
$(SEP
)kernel32.mc
213 BUILDNO_H
= include$(SEP
)reactos
$(SEP
)buildno.h
214 BUGCODES_H
= include$(SEP
)reactos
$(SEP
)bugcodes.h
215 BUGCODES_RC
= ntoskrnl
$(SEP
)bugcodes.rc
216 ERRCODES_H
= include$(SEP
)reactos
$(SEP
)errcodes.h
217 ERRCODES_RC
= lib
$(SEP
)kernel32
$(SEP
)errcodes.rc
220 include tools
/tools.mak
221 -include makefile.auto
231 makefile.auto
: $(RBUILD_TARGET
) $(PREAUTO
) $(XMLBUILDFILES
)
233 $(Q
)$(RBUILD_TARGET
) $(ROS_RBUILDFLAGS
) mingw
236 $(BUGCODES_H
) $(BUGCODES_RC
): $(WMC_TARGET
) $(NTOSKRNL_MC
)
238 $(Q
)$(WMC_TARGET
) -i
-H
$(BUGCODES_H
) -o
$(BUGCODES_RC
) $(NTOSKRNL_MC
)
240 $(ERRCODES_H
) $(ERRCODES_RC
): $(WMC_TARGET
) $(KERNEL32_MC
)
242 $(Q
)$(WMC_TARGET
) -i
-H
$(ERRCODES_H
) -o
$(ERRCODES_RC
) $(KERNEL32_MC
)
244 .PHONY
: makefile_auto_clean
246 -@
$(rm) makefile.auto
$(PREAUTO
) 2>$(NUL
)
249 clean: makefile_auto_clean