Properly include generated dependency files in Makefile

This commit is contained in:
Tyrann 2012-01-07 16:45:31 +10:30
parent c6d6d44326
commit a16d9b07c9
1 changed files with 14 additions and 2 deletions

View File

@ -4,6 +4,8 @@
.PHONY: all clean
default: all
# ============================================================================
BUILD_DIR ?= build
BIN_DIR ?= bin
@ -145,6 +147,18 @@ define do_strip
endef
endif
DEPFILES = \
$(wildcard $(BUILD_DIR)/bspinfo/.*.d) \
$(wildcard $(BUILD_DIR)/bsputil/.*.d) \
$(wildcard $(BUILD_DIR)/common/.*.d) \
$(wildcard $(BUILD_DIR)/light/.*.d) \
$(wildcard $(BUILD_DIR)/qbsp/.*.d) \
$(wildcard $(BUILD_DIR)/vis/.*.d)
ifneq ($(DEPFILES),)
-include $(DEPFILES)
endif
# ---------------------------------------
# Define some build variables
# ---------------------------------------
@ -188,8 +202,6 @@ APPS = \
$(BIN_PFX)bsputil$(EXT) \
$(BIN_PFX)qbsp$(EXT)
default: all
all: prepare $(patsubst %,$(BIN_DIR)/%,$(APPS))
.PHONY: prepare