restructure for makefile

This commit is contained in:
2025-07-18 16:41:39 +02:00
parent 7fcf5f816b
commit d1959539e2
2 changed files with 1 additions and 5 deletions

View File

@ -24,15 +24,12 @@ INC_FLAGS := $(addprefix -I,$(INC_DIRS))
# The -MMD and -MP flags together generate Makefiles for us!
CPPFLAGS := $(INC_FLAGS) -MMD -MP
# The final build step.
$(BUILD_DIR)/$(TARGET_EXEC): $(OBJS)
$(CXX) $(OBJS) -o $@ $(LDFLAGS)
# Build step for C++ source
$(BUILD_DIR)/%.cpp.o: %.cpp $(SPIRVS) .simdb
mkdir -p $(dir $@)
$(BUILD_DIR)/%.cpp.o: %.cpp .simdb $(SPIRVS)
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $< -o $i@
#build the shaders
@ -40,6 +37,5 @@ $(SPIRVS): $(GLSL)
mkdir -p $(dir $@)
glslc $(shaders).glsl $(shaders).spv
run: $(BUILD_DIR)/$(TARGET_EXEC)
./$(BUILD_DIR)/$(TARGET_EXEC)