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.
48 ifeq ($(word 1,$(shell gcc
-dumpmachine
)),mingw32
)
55 # Default to half-verbose mode
71 ifeq ($(HALFVERBOSEECHO
),yes
)
72 ECHO_CP
=@echo
[COPY
] $@
73 ECHO_MKDIR
=@echo
[MKDIR
] $@
74 ECHO_BUILDNO
=@echo
[BUILDNO
] $@
75 ECHO_INVOKE
=@echo
[INVOKE
] $<
76 ECHO_PCH
=@echo
[PCH
] $@
77 ECHO_CC
=@echo
[CC
] $<
78 ECHO_GAS
=@echo
[GAS
] $<
79 ECHO_NASM
=@echo
[NASM
] $<
80 ECHO_AR
=@echo
[AR
] $@
81 ECHO_WINEBLD
=@echo
[WINEBLD
] $@
82 ECHO_WRC
=@echo
[WRC
] $@
83 ECHO_WIDL
=@echo
[WIDL
] $@
84 ECHO_BIN2RES
=@echo
[BIN2RES
] $<
85 ECHO_DLLTOOL
=@echo
[DLLTOOL
] $@
86 ECHO_LD
=@echo
[LD
] $@
87 ECHO_NM
=@echo
[NM
] $@
88 ECHO_OBJDUMP
=@echo
[OBJDUMP
] $@
89 ECHO_RBUILD
=@echo
[RBUILD
] $@
90 ECHO_RSYM
=@echo
[RSYM
] $@
91 ECHO_WMC
=@echo
[WMC
] $@
92 ECHO_NCI
=@echo
[NCI
] $@
93 ECHO_CABMAN
=@echo
[CABMAN
] $<
94 ECHO_CDMAKE
=@echo
[CDMAKE
] $@
95 ECHO_MKHIVE
=@echo
[MKHIVE
] $@
96 ECHO_REGTESTS
=@echo
[REGTESTS
] $@
97 ECHO_TEST
=@echo
[TEST
] $@
132 host_objcopy
= $(Q
)objcopy
133 ifeq ($(HOST
),mingw32-linux
)
137 mkdir
= -$(Q
)mkdir
-p
138 gcc
= $(Q
)mingw32-gcc
139 gpp
= $(Q
)mingw32-g
++
142 objdump
= $(Q
)mingw32-objdump
144 objcopy
= $(Q
)mingw32-objcopy
145 dlltool
= $(Q
)mingw32-dlltool
146 windres
= $(Q
)mingw32-windres
150 else # mingw32-windows
160 objdump
= $(Q
)objdump
162 objcopy
= $(Q
)objcopy
163 dlltool
= $(Q
)dlltool
164 windres
= $(Q
)windres
170 ifneq ($(ROS_INTERMEDIATE
),)
171 INTERMEDIATE
:= $(ROS_INTERMEDIATE
)
173 INTERMEDIATE
:= obj-i386
175 INTERMEDIATE_
:= $(INTERMEDIATE
)$(SEP
)
177 ifneq ($(ROS_OUTPUT
),)
178 OUTPUT
:= $(ROS_OUTPUT
)
180 OUTPUT
:= output-i386
182 OUTPUT_
:= $(OUTPUT
)$(SEP
)
184 ifneq ($(ROS_TEMPORARY
),)
185 TEMPORARY
:= $(ROS_TEMPORARY
)
189 TEMPORARY_
:= $(TEMPORARY
)$(SEP
)
191 ifneq ($(ROS_INSTALL
),)
192 INSTALL
:= $(ROS_INSTALL
)
196 INSTALL_
:= $(INSTALL
)$(SEP
)
201 ifneq ($(INTERMEDIATE
),$(OUTPUT
))
207 NTOSKRNL_MC
= ntoskrnl
$(SEP
)ntoskrnl.mc
208 KERNEL32_MC
= lib
$(SEP
)kernel32
$(SEP
)kernel32.mc
209 BUILDNO_H
= include$(SEP
)reactos
$(SEP
)buildno.h
210 BUGCODES_H
= include$(SEP
)reactos
$(SEP
)bugcodes.h
211 BUGCODES_RC
= ntoskrnl
$(SEP
)bugcodes.rc
212 ERRCODES_H
= include$(SEP
)reactos
$(SEP
)errcodes.h
213 ERRCODES_RC
= lib
$(SEP
)kernel32
$(SEP
)errcodes.rc
216 include tools
/tools.mak
217 -include makefile.auto
227 makefile.auto
: $(RBUILD_TARGET
) $(PREAUTO
) $(XMLBUILDFILES
)
229 $(Q
)$(RBUILD_TARGET
) $(ROS_RBUILDFLAGS
) mingw
232 $(BUGCODES_H
) $(BUGCODES_RC
): $(WMC_TARGET
) $(NTOSKRNL_MC
)
234 $(Q
)$(WMC_TARGET
) -i
-H
$(BUGCODES_H
) -o
$(BUGCODES_RC
) $(NTOSKRNL_MC
)
236 $(ERRCODES_H
) $(ERRCODES_RC
): $(WMC_TARGET
) $(KERNEL32_MC
)
238 $(Q
)$(WMC_TARGET
) -i
-H
$(ERRCODES_H
) -o
$(ERRCODES_RC
) $(KERNEL32_MC
)
240 .PHONY
: makefile_auto_clean
242 -@
$(rm) makefile.auto
$(PREAUTO
) 2>$(NUL
)
245 clean: makefile_auto_clean