X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=Makefile;h=d063a9a75befe1793abccf50fcac8bcd010476c2;hb=b7d09e1e35ef90282c97509e0020b20db3c7ea9f;hp=67b9bf1b5f200ba9c2b8f9a0b4ec088d362ef15e;hpb=e5b1f5ef948724145ec2ed5777f4da1d6d862afd;p=blank.git diff --git a/Makefile b/Makefile index 67b9bf1..d063a9a 100644 --- a/Makefile +++ b/Makefile @@ -23,7 +23,9 @@ PROFILE_DIR := build/profile RELEASE_DIR := build/release DIR := $(RELEASE_DIR) $(DEBUG_DIR) $(PROFILE_DIR) build -SRC := $(wildcard $(SOURCE_DIR)/*.cpp) +LIB_SRC := $(wildcard $(SOURCE_DIR)/*/*.cpp) +BIN_SRC := $(wildcard $(SOURCE_DIR)/*.cpp) +SRC := $(LIB_SRC) $(BIN_SRC) RELEASE_OBJ := $(patsubst $(SOURCE_DIR)/%.cpp, $(RELEASE_DIR)/%.o, $(SRC)) DEBUG_OBJ := $(patsubst $(SOURCE_DIR)/%.cpp, $(DEBUG_DIR)/%.o, $(SRC)) PROFILE_OBJ := $(patsubst $(SOURCE_DIR)/%.cpp, $(PROFILE_DIR)/%.o, $(SRC)) @@ -59,7 +61,7 @@ callgrind: blank.profile --branch-sim=yes --cacheuse=yes --cache-sim=yes \ --collect-bus=yes --collect-systime=yes --collect-jumps=yes \ --dump-instr=yes --simulate-hwpref=yes --simulate-wb=yes \ - ./blank.profile + ./blank.profile -n 128 -t 16 --no-keyboard --no-mouse -d --no-vsync clean: rm -df $(OBJ) $(DEP) $(DIR) @@ -84,14 +86,17 @@ $(PROFILE_BIN): $(PROFILE_OBJ) @$(LDXX) -o $@ $(CXXFLAGS) $(LDXXFLAGS) $(PROFILE_FLAGS) $^ $(RELEASE_DIR)/%.o: $(SOURCE_DIR)/%.cpp | $(RELEASE_DIR) + @mkdir -p "$(@D)" @echo compile: $@ @$(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $(RELEASE_FLAGS) -o $@ -MMD -MP -MF"$(@:.o=.d)" -MT"$@" $< $(DEBUG_DIR)/%.o: $(SOURCE_DIR)/%.cpp | $(DEBUG_DIR) + @mkdir -p "$(@D)" @echo compile: $@ @$(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $(DEBUG_FLAGS) -o $@ -MMD -MP -MF"$(@:.o=.d)" -MT"$@" $< $(PROFILE_DIR)/%.o: $(SOURCE_DIR)/%.cpp | $(PROFILE_DIR) + @mkdir -p "$(@D)" @echo compile: $@ @$(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $(PROFILE_FLAGS) -o $@ -MMD -MP -MF"$(@:.o=.d)" -MT"$@" $<