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 where to install output files to when using
26 # 'make install'. N.B. Don't put a path separator at the end. The variable
27 # defaults to .\reactos.
30 # This variable controls if map files are to be generated for executable
31 # output files. Map files have the extension .map. The value can be either
32 # full (to build map files with assembly code), yes (to build map files
33 # without source code) or no (to not build any map files). The variable
37 # Pass parameters to rbuild.
47 ifeq ($(word 1,$(shell gcc
-dumpmachine
)),mingw32
)
54 # Default to half-verbose mode
70 ifeq ($(HALFVERBOSEECHO
),yes
)
71 ECHO_CP
=@echo
[COPY
] $@
72 ECHO_MKDIR
=@echo
[MKDIR
] $@
73 ECHO_BUILDNO
=@echo
[BUILDNO
] $@
74 ECHO_INVOKE
=@echo
[INVOKE
] $<
75 ECHO_PCH
=@echo
[PCH
] $@
76 ECHO_CC
=@echo
[CC
] $<
77 ECHO_GAS
=@echo
[GAS
] $<
78 ECHO_NASM
=@echo
[NASM
] $<
79 ECHO_AR
=@echo
[AR
] $@
80 ECHO_WINEBLD
=@echo
[WINEBLD
] $@
81 ECHO_WRC
=@echo
[WRC
] $@
82 ECHO_BIN2RES
=@echo
[BIN2RES
] $<
83 ECHO_DLLTOOL
=@echo
[DLLTOOL
] $@
84 ECHO_LD
=@echo
[LD
] $@
85 ECHO_NM
=@echo
[NM
] $@
86 ECHO_OBJDUMP
=@echo
[OBJDUMP
] $@
87 ECHO_RBUILD
=@echo
[RBUILD
] $@
88 ECHO_RSYM
=@echo
[RSYM
] $@
89 ECHO_WMC
=@echo
[WMC
] $@
90 ECHO_NCI
=@echo
[NCI
] $@
91 ECHO_CABMAN
=@echo
[CABMAN
] $<
92 ECHO_CDMAKE
=@echo
[CDMAKE
] $@
93 ECHO_MKHIVE
=@echo
[MKHIVE
] $@
94 ECHO_REGTESTS
=@echo
[REGTESTS
] $@
95 ECHO_TEST
=@echo
[TEST
] $@
129 host_objcopy
= $(Q
)objcopy
130 ifeq ($(HOST
),mingw32-linux
)
134 mkdir
= -$(Q
)mkdir
-p
135 gcc
= $(Q
)mingw32-gcc
136 gpp
= $(Q
)mingw32-g
++
139 objdump
= $(Q
)mingw32-objdump
141 objcopy
= $(Q
)mingw32-objcopy
142 dlltool
= $(Q
)mingw32-dlltool
143 windres
= $(Q
)mingw32-windres
147 else # mingw32-windows
157 objdump
= $(Q
)objdump
159 objcopy
= $(Q
)objcopy
160 dlltool
= $(Q
)dlltool
161 windres
= $(Q
)windres
167 ifneq ($(ROS_INTERMEDIATE
),)
168 INTERMEDIATE
:= $(ROS_INTERMEDIATE
)
170 INTERMEDIATE
:= obj-i386
172 INTERMEDIATE_
:= $(INTERMEDIATE
)$(SEP
)
174 ifneq ($(ROS_OUTPUT
),)
175 OUTPUT
:= $(ROS_OUTPUT
)
177 OUTPUT
:= output-i386
179 OUTPUT_
:= $(OUTPUT
)$(SEP
)
181 ifneq ($(ROS_TEMPORARY
),)
182 TEMPORARY
:= $(ROS_TEMPORARY
)
186 TEMPORARY_
:= $(TEMPORARY
)$(SEP
)
188 ifneq ($(ROS_INSTALL
),)
189 INSTALL
:= $(ROS_INSTALL
)
193 INSTALL_
:= $(INSTALL
)$(SEP
)
198 ifneq ($(INTERMEDIATE
),$(OUTPUT
))
204 NTOSKRNL_MC
= ntoskrnl
$(SEP
)ntoskrnl.mc
205 KERNEL32_MC
= lib
$(SEP
)kernel32
$(SEP
)kernel32.mc
206 BUILDNO_H
= include$(SEP
)reactos
$(SEP
)buildno.h
207 BUGCODES_H
= include$(SEP
)reactos
$(SEP
)bugcodes.h
208 BUGCODES_RC
= ntoskrnl
$(SEP
)bugcodes.rc
209 ERRCODES_H
= include$(SEP
)reactos
$(SEP
)errcodes.h
210 ERRCODES_RC
= lib
$(SEP
)kernel32
$(SEP
)errcodes.rc
213 include tools
/tools.mak
214 -include makefile.auto
224 makefile.auto
: $(RBUILD_TARGET
) $(PREAUTO
) $(XMLBUILDFILES
)
226 $(Q
)$(RBUILD_TARGET
) $(ROS_RBUILDFLAGS
) mingw
229 $(BUGCODES_H
) $(BUGCODES_RC
): $(WMC_TARGET
) $(NTOSKRNL_MC
)
231 $(Q
)$(WMC_TARGET
) -i
-H
$(BUGCODES_H
) -o
$(BUGCODES_RC
) $(NTOSKRNL_MC
)
233 $(ERRCODES_H
) $(ERRCODES_RC
): $(WMC_TARGET
) $(KERNEL32_MC
)
235 $(Q
)$(WMC_TARGET
) -i
-H
$(ERRCODES_H
) -o
$(ERRCODES_RC
) $(KERNEL32_MC
)
237 .PHONY
: makefile_auto_clean
239 -@
$(rm) makefile.auto
$(PREAUTO
) 2>$(NUL
)
242 clean: makefile_auto_clean