sent from android
This commit is contained in:
10
makefile
10
makefile
@@ -10,10 +10,10 @@ IMGUI_DIR = imgui
|
||||
CXX = g++
|
||||
|
||||
# Libs
|
||||
LIBS = -lGL `pkg-config --libs sdl3`
|
||||
LIBS = -lGL -lglm `pkg-config --libs sdl3 sdl3-image`
|
||||
|
||||
# Compiler and linker settings
|
||||
CXXFLAGS = `pkg-config --cflags sdl3` -std=c++17 -I $(INCLUDE_DIR)
|
||||
CXXFLAGS = -std=c++17 -I $(INCLUDE_DIR)
|
||||
|
||||
# If ImGui directory is set, include its source files
|
||||
ifdef IMGUI_DIR
|
||||
@@ -51,6 +51,10 @@ dirs:
|
||||
@mkdir -p $(BUILD_DIR)
|
||||
@mkdir -p $(OBJ_DIR)
|
||||
|
||||
# Clear build directory
|
||||
clear:
|
||||
@find $(OBJ_DIR) -type f -name '*.o' ! -name 'imgui*.o' -exec rm -f {} +
|
||||
|
||||
# Pattern rule for source files in src directory
|
||||
$(OBJ_DIR)/%.o: $(SRC_DIR)/%.cpp
|
||||
$(CXX) $(CXXFLAGS) -c -o $@ $<
|
||||
@@ -64,7 +68,7 @@ $(OBJ_DIR)/%.o: $(IMGUI_DIR)/backends/%.cpp
|
||||
$(CXX) $(CXXFLAGS) -c -o $@ $<
|
||||
endif
|
||||
|
||||
all: dirs $(BIN)
|
||||
all: dirs clear $(BIN)
|
||||
@echo Build complete
|
||||
|
||||
$(BIN): $(OBJS)
|
||||
|
Reference in New Issue
Block a user