Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

869 lines
32 KiB

  1. #
  2. # Base makefile for Linux and OSX
  3. #
  4. # !!!!! Note to future editors !!!!!
  5. #
  6. # before you make changes, make sure you grok:
  7. # 1. the difference between =, :=, +=, and ?=
  8. # 2. how and when this base makefile gets included in the generated makefile(s)
  9. # ( see http://www.gnu.org/software/make/manual/make.html#Flavors )
  10. #
  11. # Command line prefixes:
  12. # - errors are ignored
  13. # @ command is not printed to stdout before being executed
  14. # + command is executed even if Make is invoked in "do not exec" mode
  15. OS := $(shell uname)
  16. HOSTNAME := $(shell hostname)
  17. IDENTIFY_CURRENT_MAKEFILE_RELATIVE_FUNCTION = $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
  18. MAKEFILE_BASE_POSIX_MAK := $(call IDENTIFY_CURRENT_MAKEFILE_RELATIVE_FUNCTION)
  19. CROSS_COMPILE_DIR := $(realpath $(dir $(MAKEFILE_BASE_POSIX_MAK))../../cross_compile)
  20. ifeq ($(MAKE_VERBOSE),1)
  21. QUIET_PREFIX =
  22. QUIET_ECHO_POSTFIX =
  23. else
  24. QUIET_PREFIX = @
  25. QUIET_ECHO_POSTFIX = > /dev/null
  26. # Use abbreviated progress messages in the schema compiler.
  27. VALVE_SCHEMA_QUIET = 1
  28. export VALVE_SCHEMA_QUIET
  29. endif
  30. BASENAME := basename
  31. CAT := cat
  32. CP := cp
  33. CUT := cut
  34. DIRNAME := dirname
  35. ECHO := echo
  36. ETAGS := etags
  37. EXPR := expr
  38. FALSE := false
  39. FGREP := fgrep
  40. FIND := find
  41. GREP := grep
  42. ICONV := iconv
  43. MKDIR := mkdir
  44. PWD := PWD
  45. PWD_TOOL := pwd
  46. RM := rm
  47. SED := sed
  48. SLEEP := sleep
  49. TAIL := tail
  50. TOUCH := touch
  51. TR := tr
  52. TRUE := true
  53. UNAME := uname
  54. WHICH := which
  55. ECHO_LF = $(ECHO) -e
  56. BUILD_DEBUG_ECHO = $(TRUE)
  57. #uncomment or define ENABLE_BUILD_DEBUG=1 on the make commandline to debug build phases and dependency updates
  58. # ENABLE_BUILD_DEBUG = 1
  59. ifneq "$(ENABLE_BUILD_DEBUG)" ""
  60. BUILD_DEBUG_ECHO = $(ECHO)
  61. endif
  62. # SPEW_UPDATED_DEPENDENCIES spews the list of dependencies whose current timestamps invalidate this rule.
  63. # This is only done when ENABLE_BUILD_DEBUG is 1
  64. ifeq ("$(ENABLE_BUILD_DEBUG)","1")
  65. SPEW_DEPENDENCY_CHUNK = \
  66. SpewDependencyChunk () \
  67. { \
  68. $(BUILD_DEBUG_ECHO) " $${1}"; \
  69. return 0; \
  70. }
  71. SPEW_UPDATED_DEPENDENCIES = \
  72. $(QUIET_PREFIX) \
  73. { \
  74. $(BUILD_DEBUG_ECHO) "[SPEW_UPDATED_DEPENDENCIES] rule \"$@\" triggered by files:" && \
  75. $(BUILD_DEBUG_ECHO) " $?"; \
  76. }
  77. else
  78. SPEW_UPDATED_DEPENDENCIES = $(QUIET_PREFIX) $(TRUE)
  79. endif
  80. -include $(SRCROOT)/devtools/steam_def.mak
  81. # To build with clang, set the following in your environment:
  82. # CC = clang
  83. # CXX = clang++
  84. ifeq ($(CFG), release)
  85. # With gcc 4.6.3, engine.so went from 7,383,765 to 8,429,109 when building with -O3.
  86. # There also was no speed difference running at 1280x1024. May 2012, mikesart.
  87. # -fno-omit-frame-pointer: need this for stack traces with perf.
  88. OptimizerLevel_CompilerSpecific = -O2 -fno-strict-aliasing -ffast-math -fno-omit-frame-pointer
  89. else
  90. OptimizerLevel_CompilerSpecific = -O0
  91. #-O1 -finline-functions
  92. endif
  93. # CPPFLAGS == "c/c++ *preprocessor* flags" - not "cee-plus-plus flags"
  94. ARCH_FLAGS =
  95. BUILDING_MULTI_ARCH = 0
  96. CPPFLAGS = $(DEFINES) $(FORCEINCLUDES) $(addprefix -I, $(abspath $(INCLUDEDIRS) ))
  97. ifeq ($(TARGET_PLATFORM),linux64)
  98. CPPFLAGS += -fPIC
  99. endif
  100. CFLAGS = $(ARCH_FLAGS) $(CPPFLAGS) $(WARN_FLAGS) -fvisibility=$(SymbolVisibility) $(OptimizerLevel) -ffast-math -pipe $(GCC_ExtraCompilerFlags) -Usprintf -Ustrncpy -UPROTECTED_THINGS_ENABLE
  101. # In -std=gnu++11 mode we get lots of errors about "error: narrowing conversion". -fpermissive
  102. # turns these into warnings in gcc, and -Wno-c++11-narrowing suppresses them entirely in clang 3.1+.
  103. ifeq ($(OS),Linux)
  104. CXXFLAGS = $(CFLAGS) -std=gnu++0x -fpermissive
  105. else
  106. CXXFLAGS = $(CFLAGS) -std=gnu++11 -stdlib=libc++ -Wno-c++11-narrowing -Wno-dangling-else
  107. endif
  108. DEFINES += -DVPROF_LEVEL=1 -DGNUC
  109. # This causes all filesystem interfaces to default to their 64bit versions on
  110. # 32bit systems, which means we don't break on filesystems with inodes > 32bit.
  111. DEFINES += -D_FILE_OFFSET_BITS=64
  112. LDFLAGS = $(CFLAGS) $(GCC_ExtraLinkerFlags) $(OptimizerLevel)
  113. GENDEP_CXXFLAGS = -MD -MP -MF $(@:.o=.P)
  114. MAP_FLAGS =
  115. ifeq ($(STEAM_BRANCH),1)
  116. WARN_FLAGS = -Wall -Wextra -Wshadow -Wno-invalid-offsetof
  117. else
  118. WARN_FLAGS = -Wno-write-strings -Wno-multichar
  119. endif
  120. WARN_FLAGS += -Wno-unknown-pragmas -Wno-unused-parameter -Wno-unused-value -Wno-missing-field-initializers -Wno-sign-compare -Wno-reorder -Wno-invalid-offsetof -Wno-float-equal -Wno-switch -fdiagnostics-show-option -Wformat -Werror=format-security -Wstrict-aliasing=2
  121. ifeq ($(OS),Linux)
  122. # We should always specify -Wl,--build-id, as documented at:
  123. # http://linux.die.net/man/1/ld and http://fedoraproject.org/wiki/Releases/FeatureBuildId.http://fedoraproject.org/wiki/Releases/FeatureBuildId
  124. LDFLAGS += -Wl,--build-id
  125. UUID_LIB =
  126. # Set USE_STEAM_RUNTIME to build with the Steam Runtime. Otherwise uses
  127. # The toolchain in /valve
  128. ifneq ($(USE_STEAM_RUNTIME),1)
  129. # dedicated server flags
  130. ifeq ($(TARGET_PLATFORM),linux64)
  131. VALVE_BINDIR = /valve/bin64/
  132. MARCH_TARGET = nocona
  133. else
  134. VALVE_BINDIR = /valve/bin/
  135. MARCH_TARGET = pentium4
  136. endif
  137. STRIP_FLAGS = -x
  138. LIBCPP_EXT = a
  139. else
  140. # linux desktop client flags
  141. VALVE_BINDIR =
  142. DEFINES +=
  143. # If the steam-runtime is available, use it. We should just default to using it when
  144. # buildbot and everyone has a bit of time to get it installed.
  145. ifneq "$(wildcard /valve/steam-runtime/bin/)" ""
  146. # The steam-runtime is incompatible with clang at this point, so disable it
  147. # if clang is enabled.
  148. ifneq ($(CXX),clang++)
  149. VALVE_BINDIR = /valve/steam-runtime/bin/
  150. endif
  151. endif
  152. GCC_VER =
  153. ifeq ($(TARGET_PLATFORM),linux64)
  154. MARCH_TARGET = nocona
  155. else
  156. MARCH_TARGET = pentium4
  157. endif
  158. # On dedicated servers, some plugins depend on global variable symbols in addition to functions.
  159. # So symbols like _Z16ClearMultiDamagev should show up when you do "nm server_srv.so" in TF2.
  160. STRIP_FLAGS = -x
  161. LIBCPP_EXT = so
  162. UUID_LIB = -luuid
  163. endif
  164. # We want to make all TLS use the global-dynamic
  165. # model, to avoid having to use -fpic but avoid problems with dlopen()
  166. # failing due to TLS clashes. This happens in particular when trying
  167. # to run the game with primus. Note that -ftls-model=global-dynamic
  168. # doesn't work due to undocumented 'features' in gcc that only allow
  169. # the TLS model to be 'downgraded' from the default and not upgraded.
  170. CFLAGS += -D__thread='__thread __attribute__((tls_model("global-dynamic")))'
  171. CXXFLAGS += -D__thread='__thread __attribute__((tls_model("global-dynamic")))'
  172. ifeq ($(CXX),clang++)
  173. # Clang does not support -mfpmath=sse
  174. SSE_GEN_FLAGS = -msse2
  175. else
  176. SSE_GEN_FLAGS = -msse2 -mfpmath=sse
  177. endif
  178. # Turn this on when ready to fix errors that crop up (can merge fixes from console eventually).
  179. #WARN_FLAGS += -Werror=return-type
  180. ifeq ($(CXX),clang++)
  181. # The C-linkage return-type warning (no returning of references) must be disabled after the
  182. # return-type error is enabled.
  183. WARN_FLAGS += -Wno-return-type-c-linkage
  184. # -g0 must be specified because -g2 makes server.so.dbg so huge that the linker sometimes
  185. # fails due to memory exhaustion.
  186. CFLAGS += -g0
  187. endif
  188. CCACHE := $(SRCROOT)/devtools/bin/linux/ccache
  189. ifeq ($(origin GCC_VER), undefined)
  190. GCC_VER=-4.6
  191. endif
  192. ifeq ($(origin AR), default)
  193. AR = $(VALVE_BINDIR)ar crs
  194. endif
  195. ifeq ($(origin CC),default)
  196. CC = $(CCACHE) $(VALVE_BINDIR)gcc$(GCC_VER)
  197. endif
  198. ifeq ($(origin CXX), default)
  199. CXX = $(CCACHE) $(VALVE_BINDIR)g++$(GCC_VER)
  200. endif
  201. # Support ccache with clang. Add -Qunused-arguments to avoid excessive warnings due to
  202. # a ccache quirk. Could also upgrade ccache.
  203. # http://petereisentraut.blogspot.com/2011/05/ccache-and-clang.html
  204. ifeq ($(CC),clang)
  205. CC = $(CCACHE) $(VALVE_BINDIR)clang -Qunused-arguments
  206. endif
  207. ifeq ($(CXX),clang++)
  208. CXX = $(CCACHE) $(VALVE_BINDIR)clang++ -Qunused-arguments
  209. endif
  210. LINK ?= $(CC)
  211. ifeq ($(TARGET_PLATFORM),linux64)
  212. # nocona = pentium4 + 64bit + MMX, SSE, SSE2, SSE3 - no SSSE3 (that's three s's - added in core2)
  213. ARCH_FLAGS += -march=$(MARCH_TARGET) -mtune=core2
  214. LD_SO = ld-linux-x86-64.so.2
  215. LIBSTDCXX := $(shell $(CXX) -print-file-name=libstdc++.$(LIBCPP_EXT))
  216. LIBSTDCXXPIC := $(shell $(CXX) -print-file-name=libstdc++.$(LIBCPP_EXT))
  217. else
  218. # core2 = Intel Core2 CPU with 64-bit extensions, MMX, SSE, SSE2, SSE3 and SSSE3 instruction set support.
  219. # changed for DOTA since we are running servers on newer hardware
  220. ifeq ($(TARGET_PLATFORM_EXT),_client)
  221. # on non-server Linux client builds let's be a little more conservative
  222. ARCH_FLAGS += -m32 -march=prescott -mtune=core2 $(SSE_GEN_FLAGS)
  223. else
  224. ARCH_FLAGS += -m32 -march=core2 -mtune=core2 $(SSE_GEN_FLAGS)
  225. endif
  226. LD_SO = ld-linux.so.2
  227. LIBSTDCXX := $(shell $(CXX) $(ARCH_FLAGS) -print-file-name=libstdc++.$(LIBCPP_EXT))
  228. LIBSTDCXXPIC := $(shell $(CXX) $(ARCH_FLAGS) -print-file-name=libstdc++.$(LIBCPP_EXT))
  229. LDFLAGS += -m32
  230. endif
  231. GEN_SYM ?= $(SRCROOT)/devtools/gendbg.sh
  232. ifeq ($(CFG),release)
  233. STRIP ?= strip $(STRIP_FLAGS) -S
  234. # CFLAGS += -ffunction-sections -fdata-sections
  235. # LDFLAGS += -Wl,--gc-sections -Wl,--print-gc-sections
  236. else
  237. STRIP ?= true
  238. endif
  239. VSIGN ?= true
  240. LINK_MAP_FLAGS = -Wl,-Map,$(@:.so=).map
  241. SHLIBLDFLAGS = -shared $(LDFLAGS) -Wl,--no-undefined
  242. _WRAP := -Xlinker --wrap=
  243. PATHWRAP = $(_WRAP)fopen $(_WRAP)freopen $(_WRAP)open $(_WRAP)creat $(_WRAP)access $(_WRAP)__xstat \
  244. $(_WRAP)stat $(_WRAP)lstat $(_WRAP)fopen64 $(_WRAP)open64 $(_WRAP)opendir $(_WRAP)__lxstat \
  245. $(_WRAP)chmod $(_WRAP)chown $(_WRAP)lchown $(_WRAP)symlink $(_WRAP)link $(_WRAP)__lxstat64 \
  246. $(_WRAP)mknod $(_WRAP)utimes $(_WRAP)unlink $(_WRAP)rename $(_WRAP)utime $(_WRAP)__xstat64 \
  247. $(_WRAP)mount $(_WRAP)mkfifo $(_WRAP)mkdir $(_WRAP)rmdir $(_WRAP)scandir $(_WRAP)realpath
  248. LIB_START_EXE = $(PATHWRAP) -static-libgcc -Wl,--start-group
  249. LIB_END_EXE = -Wl,--end-group -lm -ldl $(LIBSTDCXX) -lpthread $(UUID_LIB)
  250. LIB_START_SHLIB = $(PATHWRAP) -static-libgcc -Wl,--start-group
  251. LIB_END_SHLIB = -Wl,--end-group -lm -ldl $(LIBSTDCXXPIC) -lpthread $(UUID_LIB) -l:$(LD_SO) -Wl,--version-script=$(SRCROOT)/devtools/version_script.linux.txt
  252. endif
  253. ifeq ($(OS),Darwin)
  254. LDFLAGS += -stdlib=libc++
  255. OSXVER := $(shell sw_vers -productVersion)
  256. CCACHE := $(SRCROOT)/devtools/bin/osx32/ccache
  257. DEVELOPER_DIR := $(shell /usr/bin/xcode-select -print-path)
  258. XCODEVER := $(shell /usr/bin/xcode-select -version)
  259. USE_DEV_USR_BIN := 0
  260. ifeq (,$(findstring 10.7, $(OSXVER)))
  261. USE_DEV_USR_BIN := 1
  262. endif
  263. ifeq (/Developer, $(DEVELOPER_DIR))
  264. USE_DEV_USR_BIN := 1
  265. endif
  266. ifeq (1,$(USE_DEV_USR_BIN))
  267. COMPILER_BIN_DIR := $(DEVELOPER_DIR)/usr/bin
  268. SDK_DIR := $(DEVELOPER_DIR)/SDKs
  269. else
  270. COMPILER_BIN_DIR := $(DEVELOPER_DIR)/Toolchains/XcodeDefault.xctoolchain/usr/bin
  271. SDK_DIR := $(DEVELOPER_DIR)/Platforms/MacOSX.platform/Developer/SDKs
  272. endif
  273. SDKROOT ?= $(SDK_DIR)/MacOSX10.9.sdk
  274. #test to see if you have a compiler in the right place, if you don't abort with an error
  275. ifeq ($(wildcard $(COMPILER_BIN_DIR)/clang),)
  276. $(error Unable to find compiler, install and configure XCode)
  277. endif
  278. ifeq ($(wildcard $(COMPILER_BIN_DIR)/clang++),)
  279. $(error Unable to find compiler, install and configure XCode)
  280. endif
  281. ifeq ($(origin AR), default)
  282. AR = libtool -static -o
  283. endif
  284. ifeq ($(origin CC), default)
  285. CC = $(CCACHE) $(COMPILER_BIN_DIR)/clang -Qunused-arguments -Wno-c++11-narrowing -Wno-dangling-else
  286. endif
  287. ifeq ($(origin CXX), default)
  288. CXX = $(CCACHE) $(COMPILER_BIN_DIR)/clang++ -Qunused-arguments -Wno-c++11-narrowing -Wno-dangling-else
  289. endif
  290. LINK ?= $(CXX)
  291. ifeq ($(TARGET_PLATFORM),osx64)
  292. ARCH_FLAGS += -arch x86_64 -m64 -march=core2
  293. else ifeq (,$(findstring -arch x86_64,$(GCC_ExtraCompilerFlags)))
  294. ARCH_FLAGS += -arch i386 -m32 -march=prescott -momit-leaf-frame-pointer -mtune=core2
  295. else
  296. # dirty hack to build a universal binary - don't specify the architecture
  297. ARCH_FLAGS += -arch i386 -Xarch_i386 -march=prescott -Xarch_i386 -mtune=core2 -Xarch_i386 -momit-leaf-frame-pointer -Xarch_x86_64 -march=core2
  298. endif
  299. #FIXME: NOTE:Full path specified because the xcode 4.0 preview has a terribly broken dsymutil, so ref the 3.2 one
  300. GEN_SYM ?= /usr/bin/dsymutil
  301. ifeq ($(CFG),release)
  302. STRIP ?= strip -x -S
  303. else
  304. STRIP ?= true
  305. endif
  306. VSIGN ?= true
  307. CPPFLAGS += -I$(SDKROOT)/usr/include/malloc -ftemplate-depth=1024
  308. CFLAGS += -isysroot $(SDKROOT) -mmacosx-version-min=10.7 -fasm-blocks -fno-color-diagnostics
  309. WARN_FLAGS += -Wno-parentheses -Wno-constant-logical-operand -Wno-deprecated
  310. LIB_START_EXE = -lm -ldl -lpthread
  311. LIB_END_EXE =
  312. LIB_START_SHLIB =
  313. LIB_END_SHLIB =
  314. SHLIBLDFLAGS = $(LDFLAGS) -bundle -flat_namespace -undefined suppress -Wl,-dead_strip -Wl,-no_dead_strip_inits_and_terms
  315. ifeq (lib,$(findstring lib,$(GAMEOUTPUTFILE)))
  316. SHLIBLDFLAGS = $(LDFLAGS) -dynamiclib -current_version 1.0 -compatibility_version 1.0 -install_name @rpath/$(basename $(notdir $(GAMEOUTPUTFILE))).dylib $(SystemLibraries) -Wl,-dead_strip -Wl,-no_dead_strip_inits_and_terms
  317. endif
  318. endif
  319. #
  320. # Profile-directed optimizations.
  321. # Note: Last time these were tested 3/5/08, it actually slowed down the server benchmark by 5%!
  322. #
  323. # First, uncomment these, build, and test. It will generate .gcda and .gcno files where the .o files are.
  324. # PROFILE_LINKER_FLAG=-fprofile-arcs
  325. # PROFILE_COMPILER_FLAG=-fprofile-arcs
  326. #
  327. # Then, comment the above flags out again and rebuild with this flag uncommented:
  328. # PROFILE_COMPILER_FLAG=-fprofile-use
  329. #
  330. #############################################################################
  331. # The compiler command lne for each src code file to compile
  332. #############################################################################
  333. OBJ_DIR = ./obj_$(NAME)_$(TARGET_PLATFORM)$(TARGET_PLATFORM_EXT)/$(CFG)
  334. CPP_TO_OBJ = $(CPPFILES:.cpp=.o)
  335. CXX_TO_OBJ = $(CPP_TO_OBJ:.cxx=.o)
  336. CC_TO_OBJ = $(CXX_TO_OBJ:.cc=.o)
  337. MM_TO_OBJ = $(CC_TO_OBJ:.mm=.o)
  338. C_TO_OBJ = $(MM_TO_OBJ:.c=.o)
  339. OBJS = $(addprefix $(OBJ_DIR)/, $(notdir $(C_TO_OBJ)))
  340. export OBJ_DIR
  341. ifeq ($(MAKE_VERBOSE),1)
  342. QUIET_PREFIX =
  343. QUIET_ECHO_POSTFIX =
  344. else
  345. QUIET_PREFIX = @
  346. QUIET_ECHO_POSTFIX = > /dev/null
  347. endif
  348. ifeq ($(MAKE_CC_VERBOSE),1)
  349. CC += -v
  350. endif
  351. ifeq ($(CONFTYPE),lib)
  352. LIB_File = $(OUTPUTFILE)
  353. endif
  354. ifeq ($(CONFTYPE),dll)
  355. SO_File = $(OUTPUTFILE)
  356. endif
  357. ifeq ($(CONFTYPE),exe)
  358. EXE_File = $(OUTPUTFILE)
  359. endif
  360. # we generate dependencies as a side-effect of compilation now
  361. GEN_DEP_FILE=
  362. PRE_COMPILE_FILE =
  363. POST_COMPILE_FILE =
  364. ifeq ($(BUILDING_MULTI_ARCH),1)
  365. SINGLE_ARCH_CXXFLAGS=$(subst -arch x86_64,,$(CXXFLAGS))
  366. COMPILE_FILE = \
  367. $(QUIET_PREFIX) \
  368. echo "---- $(lastword $(subst /, ,$<)) as MULTIARCH----";\
  369. mkdir -p $(OBJ_DIR) && \
  370. $(CXX) $(SINGLE_ARCH_CXXFLAGS) $(GENDEP_CXXFLAGS) -o $@ -c $< && \
  371. $(CXX) $(CXXFLAGS) -o $@ -c $<
  372. else
  373. COMPILE_FILE = \
  374. $(QUIET_PREFIX) \
  375. echo "---- $(lastword $(subst /, ,$<)) ----";\
  376. mkdir -p $(OBJ_DIR) && \
  377. $(CXX) $(CXXFLAGS) $(GENDEP_CXXFLAGS) -o $@ -c $<
  378. endif
  379. ifneq "$(origin VALVE_NO_AUTO_P4)" "undefined"
  380. P4_EDIT_START = chmod -R +w
  381. P4_EDIT_END = || true
  382. P4_REVERT_START = true
  383. P4_REVERT_END =
  384. else
  385. ifndef P4_EDIT_CHANGELIST
  386. # You can use an environment variable to specify what changelist to check the Linux Binaries out into. Normally the default
  387. # setting is best, but here is an alternate example:
  388. # export P4_EDIT_CHANGELIST_CMD="echo 1424335"
  389. # ?= means that if P4_EDIT_CHANGELIST_CMD is already set it won't be changed.
  390. P4_EDIT_CHANGELIST_CMD ?= p4 changes -c `p4 client -o | grep ^Client | cut -f 2` -s pending | fgrep 'POSIX Auto Checkout' | cut -d' ' -f 2 | tail -n 1
  391. P4_EDIT_CHANGELIST := $(shell $(P4_EDIT_CHANGELIST_CMD))
  392. endif
  393. ifeq ($(P4_EDIT_CHANGELIST),)
  394. # If we haven't found a changelist to check out to then create one. The name must match the one from a few
  395. # lines above or else a new changelist will be created each time.
  396. # Warning: the behavior of 'echo' is not consistent. In bash you need the "-e" option in order for \n to be
  397. # interpreted as a line-feed, but in dash you do not, and if "-e" is passed along then it is printed, which
  398. # confuses p4. So, if you run this command from the bash shell don't forget to add "-e" to the echo command.
  399. P4_EDIT_CHANGELIST = $(shell echo "Change: new\nDescription: POSIX Auto Checkout" | p4 change -i | cut -f 2 -d ' ')
  400. endif
  401. P4_EDIT_START := for f in
  402. P4_EDIT_END := ; do if [ -n $$f ]; then if [ -d $$f ]; then find $$f -type f -print | p4 -x - edit -c $(P4_EDIT_CHANGELIST); else p4 edit -c $(P4_EDIT_CHANGELIST) $$f; fi; fi; done $(QUIET_ECHO_POSTFIX)
  403. P4_REVERT_START := for f in
  404. P4_REVERT_END := ; do if [ -n $$f ]; then if [ -d $$f ]; then find $$f -type f -print | p4 -x - revert; else p4 revert $$f; fi; fi; done $(QUIET_ECHO_POSTFIX)
  405. endif
  406. ifeq ($(CONFTYPE),dll)
  407. all: $(OTHER_DEPENDENCIES) $(OBJS) $(GAMEOUTPUTFILE)
  408. @echo $(GAMEOUTPUTFILE) $(QUIET_ECHO_POSTFIX)
  409. else
  410. all: $(OTHER_DEPENDENCIES) $(OBJS) $(OUTPUTFILE)
  411. @echo $(OUTPUTFILE) $(QUIET_ECHO_POSTFIX)
  412. endif
  413. .PHONY: clean cleantargets cleanandremove rebuild relink RemoveOutputFile SingleFile
  414. rebuild :
  415. $(MAKE) -f $(firstword $(MAKEFILE_LIST)) cleanandremove
  416. $(MAKE) -f $(firstword $(MAKEFILE_LIST))
  417. # Use the relink target to force to relink the project.
  418. relink: RemoveOutputFile all
  419. RemoveOutputFile:
  420. rm -f $(OUTPUTFILE)
  421. # This rule is so you can say "make SingleFile SingleFilename=/home/myname/valve_main/src/engine/language.cpp" and have it only build that file.
  422. # It basically just translates the full filename to create a dependency on the appropriate .o file so it'll build that.
  423. SingleFile : RemoveSingleFile $(OBJ_DIR)/$(basename $(notdir $(SingleFilename))).o
  424. @echo ""
  425. RemoveSingleFile:
  426. $(QUIET_PREFIX) rm -f $(OBJ_DIR)/$(basename $(notdir $(SingleFilename))).o
  427. clean:
  428. ifneq "$(OBJ_DIR)" ""
  429. $(QUIET_PREFIX) echo "rm -rf $(OBJ_DIR)"
  430. $(QUIET_PREFIX) rm -rf $(OBJ_DIR)
  431. endif
  432. ifneq "$(OUTPUTFILE)" ""
  433. $(QUIET_PREFIX) if [ -e $(OUTPUTFILE) ]; then \
  434. echo "p4 revert $(OUTPUTFILE)"; \
  435. $(P4_REVERT_START) $(OUTPUTFILE) $(OUTPUTFILE)$(SYM_EXT) $(P4_REVERT_END); \
  436. fi;
  437. endif
  438. ifneq "$(OTHER_DEPENDENCIES)" ""
  439. $(QUIET_PREFIX) echo "rm -f $(OTHER_DEPENDENCIES)"
  440. ifneq "$(GAMEOUTPUTFILE)" ""
  441. endif
  442. $(QUIET_PREFIX) rm -f $(OTHER_DEPENDENCIES)
  443. endif
  444. ifneq "$(GAMEOUTPUTFILE)" ""
  445. $(QUIET_PREFIX) echo "p4 revert $(GAMEOUTPUTFILE)"
  446. $(QUIET_PREFIX) $(P4_REVERT_START) $(GAMEOUTPUTFILE) $(GAMEOUTPUTFILE)$(SYM_EXT) $(P4_REVERT_END)
  447. endif
  448. # Do the above cleaning, except with p4 edit and rm. Reason being ar crs adds and replaces obj files to the
  449. # archive. However if you've renamed or deleted a source file, $(AR) won't remove it. This can leave
  450. # us with archive files that have extra unused symbols, and also potentially cause compilation errors
  451. # when you rename a file and have many duplicate symbols.
  452. cleanandremove:
  453. ifneq "$(OBJ_DIR)" ""
  454. $(QUIET_PREFIX) echo "rm -rf $(OBJ_DIR)"
  455. $(QUIET_PREFIX) -rm -rf $(OBJ_DIR)
  456. endif
  457. ifneq "$(OUTPUTFILE)" ""
  458. $(QUIET_PREFIX) if [ -e $(OUTPUTFILE) ]; then \
  459. echo "p4 edit and rm -f $(OUTPUTFILE) $(OUTPUTFILE)$(SYM_EXT)"; \
  460. $(P4_EDIT_START) $(OUTPUTFILE) $(OUTPUTFILE)$(SYM_EXT) $(P4_EDIT_END); \
  461. fi;
  462. $(QUIET_PREFIX) -rm -f $(OUTPUTFILE) $(OUTPUTFILE)$(SYM_EXT);
  463. endif
  464. ifneq "$(OTHER_DEPENDENCIES)" ""
  465. $(QUIET_PREFIX) echo "rm -f $(OTHER_DEPENDENCIES)"
  466. $(QUIET_PREFIX) -rm -f $(OTHER_DEPENDENCIES)
  467. endif
  468. ifneq "$(GAMEOUTPUTFILE)" ""
  469. $(QUIET_PREFIX) echo "p4 edit and rm -f $(GAMEOUTPUTFILE) $(GAMEOUTPUTFILE)$(SYM_EXT)"
  470. $(QUIET_PREFIX) $(P4_EDIT_START) $(GAMEOUTPUTFILE) $(GAMEOUTPUTFILE)$(SYM_EXT) $(P4_EDIT_END)
  471. $(QUIET_PREFIX) -rm -f $(GAMEOUTPUTFILE)
  472. endif
  473. # This just deletes the final targets so it'll do a relink next time we build.
  474. cleantargets:
  475. $(QUIET_PREFIX) rm -f $(OUTPUTFILE) $(GAMEOUTPUTFILE)
  476. $(LIB_File): $(OTHER_DEPENDENCIES) $(OBJS)
  477. $(QUIET_PREFIX) -$(P4_EDIT_START) $(LIB_File) $(P4_EDIT_END);
  478. $(QUIET_PREFIX) $(AR) $(LIB_File) $(OBJS) $(LIBFILES);
  479. SO_GameOutputFile = $(GAMEOUTPUTFILE)
  480. $(SO_GameOutputFile): $(SO_File)
  481. $(QUIET_PREFIX) \
  482. $(P4_EDIT_START) $(GAMEOUTPUTFILE) $(P4_EDIT_END) && \
  483. echo "----" $(QUIET_ECHO_POSTFIX);\
  484. echo "---- COPYING TO $@ [$(CFG)] ----";\
  485. echo "----" $(QUIET_ECHO_POSTFIX);
  486. $(QUIET_PREFIX) -$(P4_EDIT_START) $(GAMEOUTPUTFILE) $(P4_EDIT_END);
  487. $(QUIET_PREFIX) -mkdir -p `dirname $(GAMEOUTPUTFILE)` > /dev/null;
  488. $(QUIET_PREFIX) cp -v $(OUTPUTFILE) $(GAMEOUTPUTFILE) $(QUIET_ECHO_POSTFIX);
  489. $(QUIET_PREFIX) -$(P4_EDIT_START) $(GAMEOUTPUTFILE)$(SYM_EXT) $(P4_EDIT_END);
  490. $(QUIET_PREFIX) $(GEN_SYM) $(GAMEOUTPUTFILE);
  491. $(QUIET_PREFIX) -$(STRIP) $(GAMEOUTPUTFILE);
  492. $(QUIET_PREFIX) $(VSIGN) -signvalve $(GAMEOUTPUTFILE);
  493. $(QUIET_PREFIX) if [ "$(IMPORTLIBRARY)" != "" ]; then\
  494. echo "----" $(QUIET_ECHO_POSTFIX);\
  495. echo "---- COPYING TO IMPORT LIBRARY $(IMPORTLIBRARY) ----";\
  496. echo "----" $(QUIET_ECHO_POSTFIX);\
  497. $(P4_EDIT_START) $(IMPORTLIBRARY) $(P4_EDIT_END) && \
  498. mkdir -p `dirname $(IMPORTLIBRARY)` > /dev/null && \
  499. cp -v $(OUTPUTFILE) $(IMPORTLIBRARY); \
  500. fi;
  501. $(SO_File): $(OTHER_DEPENDENCIES) $(OBJS) $(LIBFILENAMES)
  502. $(QUIET_PREFIX) \
  503. echo "----" $(QUIET_ECHO_POSTFIX);\
  504. echo "---- LINKING $@ [$(CFG)] ----";\
  505. echo "----" $(QUIET_ECHO_POSTFIX);\
  506. \
  507. $(LINK) $(LINK_MAP_FLAGS) $(SHLIBLDFLAGS) $(PROFILE_LINKER_FLAG) -o $(OUTPUTFILE) $(LIB_START_SHLIB) $(OBJS) $(LIBFILES) $(SystemLibraries) $(LIB_END_SHLIB);
  508. $(VSIGN) -signvalve $(OUTPUTFILE);
  509. $(EXE_File) : $(OTHER_DEPENDENCIES) $(OBJS) $(LIBFILENAMES)
  510. $(QUIET_PREFIX) \
  511. echo "----" $(QUIET_ECHO_POSTFIX);\
  512. echo "---- LINKING EXE $@ [$(CFG)] ----";\
  513. echo "----" $(QUIET_ECHO_POSTFIX);\
  514. \
  515. $(P4_EDIT_START) $(OUTPUTFILE) $(P4_EDIT_END);\
  516. $(LINK) $(LINK_MAP_FLAGS) $(LDFLAGS) $(PROFILE_LINKER_FLAG) -o $(OUTPUTFILE) $(LIB_START_EXE) $(OBJS) $(LIBFILES) $(SystemLibraries) $(LIB_END_EXE);
  517. $(QUIET_PREFIX) -$(P4_EDIT_START) $(OUTPUTFILE)$(SYM_EXT) $(P4_EDIT_END);
  518. $(QUIET_PREFIX) $(GEN_SYM) $(OUTPUTFILE);
  519. $(QUIET_PREFIX) -$(STRIP) $(OUTPUTFILE);
  520. $(QUIET_PREFIX) $(VSIGN) -signvalve $(OUTPUTFILE);
  521. tags:
  522. etags -a -C -o $(SRCROOT)/TAGS *.cpp *.cxx *.h *.hxx
  523. P4EXE ?= p4
  524. # DETECT_STRING_CHANGE_BETWEEN_BUILDS is a macro that lets you update the timestamp on a file whenever a string changes between invokations of make
  525. # This lets us know that our compile flags are consistent with the last time we ran and avoid overbuilding
  526. #
  527. # Parameters: $(1) = a unique name as a basis for intermediate variables and file names, the exact name will not be used if you want to give it a name used for $(2).
  528. # $(2) = extra escaped deref or call that you would invoke to fully evaluate the string in $(1)
  529. # A file specified with $(call DETECT_STRING_CHANGE_BETWEEN_BUILDS_TIMESTAMP_FILE,$(1)) will have it's timestamp updated whenever the cached settings change
  530. # Make string substitions on the value so it can be represented cleanly in an "$(ECHO) > file" operation
  531. DETECT_STRING_CHANGE_BETWEEN_BUILDS_STRING_FILTER = $(strip $(subst $$,_dollar,$(subst \\,_bs,$(subst =,_eq,$(subst ',_sq,$(subst ",_dq,$(1)))))))
  532. DETECT_STRING_CHANGE_BETWEEN_BUILDS_TIMESTAMP_FILE = $(OBJ_DIR)/_detect_string_change_between_builds/$(1)_updated
  533. define DETECT_STRING_CHANGE_BETWEEN_BUILDS
  534. ifeq "$$(DISABLE_DETECT_STRING_CHANGE_BETWEEN_BUILDS)" ""
  535. include $$(wildcard $$(OBJ_DIR)/_detect_string_change_between_builds/$(1)_previous)
  536. unexport $(1)_FILTERED_PREV
  537. $(1)_FILTERED_CURRENT := $$(call DETECT_STRING_CHANGE_BETWEEN_BUILDS_STRING_FILTER,$(2))
  538. unexport $(1)_FILTERED_CURRENT
  539. ifeq "1" "0"
  540. # Invalidate any cached settings whenever the base makefile changes in any way. This is mostly paranoia and we should be able to rely on the second rule by itself
  541. $$(OBJ_DIR)/_detect_string_change_between_builds/$(1)_eval:: $(MAKEFILE_BASE_POSIX_MAK) ; \
  542. $$(QUIET_PREFIX) \
  543. { \
  544. $$(BUILD_DEBUG_ECHO) detect string change between builds $(1) eval base start && \
  545. if [ -e "$$(OBJ_DIR)/_detect_string_change_between_builds/$(1)_updated" ]; then \
  546. { \
  547. $$(BUILD_DEBUG_ECHO) "Discarding $(1) cached value due to changes in \"$$^\""; \
  548. }; \
  549. fi; \
  550. $$(RM) -f $$(OBJ_DIR)/_detect_string_change_between_builds/$(1)_updated; \
  551. $$(RM) -f $$(OBJ_DIR)/_detect_string_change_between_builds/$(1)_previous; \
  552. $$(RM) -f $$(OBJ_DIR)/_detect_string_change_between_builds/$(1)_eval; \
  553. }
  554. endif
  555. ifneq ("$$($(1)_FILTERED_CURRENT)","$$($(1)_FILTERED_PREV)")
  556. $(1)_WRITE_CHUNK_FUNC = \
  557. WriteStringChunkToPrevFile () \
  558. { \
  559. $$(ECHO) -n "$$$${1}" >> $$(OBJ_DIR)/_detect_string_change_between_builds/$(1)_previous && \
  560. return 0; \
  561. }
  562. #value changed, write out the new value, touch the updated and eval file
  563. $$(OBJ_DIR)/_detect_string_change_between_builds/$(1)_eval:: $(MAKEFILE_BASE_POSIX_MAK) $(COMPILE_DEPENDANT_MAKEFILES)
  564. $$(QUIET_PREFIX) $$(BUILD_DEBUG_ECHO) detect string change between builds $(1) eval incremental start
  565. $$(SPEW_UPDATED_DEPENDENCIES)
  566. $$(QUIET_PREFIX) \
  567. { \
  568. { $$(MKDIR) -p $$(OBJ_DIR)/_detect_string_change_between_builds $$(QUIET_ECHO_POSTFIX) || $(TRUE); } && \
  569. $$(BUILD_DEBUG_ECHO) "$(1) changed since last build" && \
  570. $$(TOUCH) $$(OBJ_DIR)/_detect_string_change_between_builds/$(1)_updated && \
  571. $$(ECHO) -n "$(1)_FILTERED_PREV = " > $$(OBJ_DIR)/_detect_string_change_between_builds/$(1)_previous; \
  572. }
  573. $$(QUIET_PREFIX) $$(call CHUNK_OUT_STRING_FOR_SHELL_LIMITS,$$($(1)_WRITE_CHUNK_FUNC),WriteStringChunkToPrevFile, ,$$($(1)_FILTERED_CURRENT))
  574. $$(QUIET_PREFIX) $$(TOUCH) $$(OBJ_DIR)/_detect_string_change_between_builds/$(1)_eval
  575. else
  576. #value is the same, just touch the eval file
  577. $$(OBJ_DIR)/_detect_string_change_between_builds/$(1)_eval:: $(MAKEFILE_BASE_POSIX_MAK) $(COMPILE_DEPENDANT_MAKEFILES)
  578. $$(QUIET_PREFIX) $$(BUILD_DEBUG_ECHO) detect string change between builds $(1) eval incremental start
  579. $$(SPEW_UPDATED_DEPENDENCIES)
  580. $$(QUIET_PREFIX) \
  581. { \
  582. { $$(MKDIR) -p $$(OBJ_DIR)/_detect_string_change_between_builds $$(QUIET_ECHO_POSTFIX) || $(TRUE); } && \
  583. $$(BUILD_DEBUG_ECHO) $(1) unchanged since last build && \
  584. $$(TOUCH) $$(OBJ_DIR)/_detect_string_change_between_builds/$(1)_eval; \
  585. }
  586. endif
  587. $$(OBJ_DIR)/_detect_string_change_between_builds/$(1)_updated: $$(OBJ_DIR)/_detect_string_change_between_builds/$(1)_eval ; \
  588. $$(QUIET_PREFIX) \
  589. { \
  590. if [ ! -e "$$(OBJ_DIR)/_detect_string_change_between_builds/$(1)_updated" ]; then \
  591. { \
  592. $$(TOUCH) $$(OBJ_DIR)/_detect_string_change_between_builds/$(1)_updated; \
  593. }; \
  594. fi; \
  595. $$(BUILD_DEBUG_ECHO) detect string change between builds $(1) has evaluated; \
  596. }
  597. else
  598. # if $(DISABLE_DETECT_STRING_CHANGE_BETWEEN_BUILDS) is defined to not do anything, always update the strings when any relevant makefile changes
  599. $$(OBJ_DIR)/_detect_string_change_between_builds/$(1)_updated: $(MAKEFILE_BASE_POSIX_MAK) $(COMPILE_DEPENDANT_MAKEFILES) ; \
  600. $$(QUIET_PREFIX) \
  601. {
  602. $$(BUILD_DEBUG_ECHO) detect string change between builds $(1) updated disabled start && \
  603. $$(TOUCH) $$(OBJ_DIR)/_detect_string_change_between_builds/$(1)_updated; \
  604. }
  605. endif
  606. endef
  607. unexport DETECT_STRING_CHANGE_BETWEEN_BUILDS
  608. # RUN_RECIPE_ACTION_ONCE ensures you run a recipe action exactly one time among many parallel threads
  609. # and none of the recipes trying to run it return from the function until the action has completed
  610. #
  611. # Parameters: $(1) = unique "already run" sentinel file, $(2) = unique mutex directory, $(3) = action to run
  612. # The existence of the sentinel is used to note that the action has already run and should not run again. The contents of the file are a shell script to replciate the exit status of the action. You are responsible for ensuring this file is deleted before the action will run again
  613. # The existence of the mutex directory causes parallel recipes to spin until it is removed (which automatically happens at the end of the function). You are responsible for ensuring this directory is deleted before any locks can be acquired
  614. # "_prebuild_always::" is a good place to remove both files.
  615. # You are also responsible for ensuring the base directories for both items exist prior to calling RUN_RECIPE_ACTION_ONCE
  616. #
  617. # The sentinel file is used because shell scripts cannot promote environment variables to the parent make process, so the filesystem is used to create a boolean flag out of the sentinel file
  618. # The mutex directory is used because directory creation is atomic and will return an error if the directory cannot be created (already exists)
  619. RUN_RECIPE_ACTION_ONCE = \
  620. ( \
  621. until [ -e $(1) ]; do \
  622. { \
  623. $(MKDIR) -p $(2) > /dev/null 2>&1 && \
  624. { \
  625. ! [ -e $(1) ] && \
  626. { \
  627. { $(3); } && \
  628. $(ECHO) "exit 0" > $(1) || \
  629. $(ECHO) "exit 1" > $(1); \
  630. }; \
  631. $(RM) -fr $(2); \
  632. } \
  633. || \
  634. { \
  635. $(SLEEP) 1; \
  636. }; \
  637. }; \
  638. done; \
  639. $(SHELL) $(1); \
  640. )
  641. #
  642. # Standard directory creation targets to ensure we can just touch files we need knowing that their directory exists
  643. #
  644. # Ensure $(OBJ_DIR) exists
  645. $(OBJ_DIR)/_create_dir:
  646. $(QUIET_PREFIX) $(BUILD_DEBUG_ECHO) $(OBJ_DIR)/_create_dir start
  647. $(QUIET_PREFIX) $(MKDIR) -p $(OBJ_DIR) $(QUIET_ECHO_POSTFIX)
  648. $(QUIET_PREFIX) $(TOUCH) $(OBJ_DIR)/_create_dir
  649. PREBUILD_EVENT_ACTION ?= { $(TRUE); }
  650. PREBUILD_EVENT_WRAPPED = \
  651. { \
  652. { \
  653. $(BUILD_DEBUG_ECHO) "Pre-Build Event For \"$(NAME)\"" && \
  654. $(call PREBUILD_EVENT_ACTION); \
  655. } \
  656. || \
  657. { \
  658. $(ECHO) "Error executing Pre-Build Event for \"$(NAME)\""; \
  659. $(FALSE); \
  660. }; \
  661. }
  662. RUN_PREBUILD_EVENT_ONCE = $(call RUN_RECIPE_ACTION_ONCE,"$(OBJ_DIR)/_ran_prebuild_event","$(OBJ_DIR)/_lock_prebuild_event",$(call PREBUILD_EVENT_WRAPPED))
  663. _prebuild_always::
  664. $(QUIET_PREFIX) $(BUILD_DEBUG_ECHO) _prebuild_always delete prebuild event start
  665. $(QUIET_PREFIX) $(RM) -fr $(OBJ_DIR)/_ran_prebuild_event
  666. $(QUIET_PREFIX) $(RM) -fr $(OBJ_DIR)/_lock_prebuild_event
  667. # Analogous to MSVC Pre-Link Event
  668. PRELINK_EVENT_ACTION ?= { $(TRUE); }
  669. $(OBJ_DIR)/_prelink_event: $(LINK_STEP_DEPENDENCIES) | _prebuild_steps _predepgen_steps _precompile_steps
  670. $(QUIET_PREFIX) $(BUILD_DEBUG_ECHO) _prelink_event start
  671. $(SPEW_UPDATED_DEPENDENCIES)
  672. $(QUIET_PREFIX) \
  673. { \
  674. { \
  675. $(call RUN_PREBUILD_EVENT_ONCE) && \
  676. $(BUILD_DEBUG_ECHO) "Pre-Link Event For \"$(NAME)\"" && \
  677. $(call PRELINK_EVENT_ACTION) && \
  678. $(TOUCH) $(OBJ_DIR)/_prelink_event && \
  679. $(RM) -f $(OBJ_DIR)/_prelink_event_failed; \
  680. } \
  681. || \
  682. { \
  683. $(ECHO) "Error executing Pre-Link Event for \"$(NAME)\""; \
  684. $(RM) -f $(OBJ_DIR)/_prelink_event; \
  685. $(TOUCH) $(OBJ_DIR)/_prelink_event_failed; \
  686. $(FALSE); \
  687. }; \
  688. }
  689. # Analogous to MSVC Post-Build Event
  690. POSTBUILD_EVENT_ACTION ?= { $(TRUE); }
  691. $(OBJ_DIR)/_postbuild_event: $(ALL_CUSTOM_BUILD_TOOL_OUTPUTS) $(LINK_STEP) $(wildcard $(OBJ_DIR)/_postbuild_event_failed) | _prebuild_steps
  692. $(QUIET_PREFIX) $(BUILD_DEBUG_ECHO) _postbuild_event start
  693. $(SPEW_UPDATED_DEPENDENCIES)
  694. $(QUIET_PREFIX) \
  695. { \
  696. { \
  697. $(call RUN_PREBUILD_EVENT_ONCE) && \
  698. $(BUILD_DEBUG_ECHO) "Post-Build Event For \"$(NAME)\"" && \
  699. $(call POSTBUILD_EVENT_ACTION) && \
  700. $(TOUCH) $(OBJ_DIR)/_postbuild_event && \
  701. $(RM) -f $(OBJ_DIR)/_postbuild_event_failed; \
  702. } \
  703. || \
  704. { \
  705. $(ECHO) "Error executing Post-Build Event for \"$(NAME)\""; \
  706. $(RM) -f $(OBJ_DIR)/_postbuild_event; \
  707. $(TOUCH) $(OBJ_DIR)/_postbuild_event_failed; \
  708. $(FALSE); \
  709. }; \
  710. }
  711. # Everything that should run before anything starts generating intermediate files
  712. _prebuild_steps: _prebuild_always $(OBJ_DIR)/_create_dir
  713. $(QUIET_PREFIX) $(BUILD_DEBUG_ECHO) _prebuild_steps completed
  714. # Everything that needs to run before depgen. Running after custom build tools because they can generate cpp's we depend on
  715. _predepgen_steps: _prebuild_steps $(ALL_CUSTOM_BUILD_TOOL_OUTPUTS)
  716. $(QUIET_PREFIX) $(BUILD_DEBUG_ECHO) _predepgen_steps completed
  717. # Everything that needs to finish before compiling cpps.
  718. _precompile_steps: _predepgen_steps
  719. $(QUIET_PREFIX) $(BUILD_DEBUG_ECHO) _precompile_steps completed
  720. # Everything that needs to finish before linking
  721. _prelink_steps: $(OBJ_DIR)/_prelink_event
  722. $(QUIET_PREFIX) $(BUILD_DEBUG_ECHO) _prelink_steps completed
  723. # Everything to do after linking
  724. _postbuild_steps: $(OBJ_DIR)/_postbuild_event
  725. $(QUIET_PREFIX) $(BUILD_DEBUG_ECHO) _postbuild_steps completed