bootleg-game-engine/makefile

20 lines
455 B
Makefile
Raw Permalink Normal View History

2024-09-06 09:34:29 +00:00
CXX = g++
2024-09-08 10:53:58 +00:00
LDFLAGS = `sdl2-config --libs` -l SDL2_ttf -l SDL2_mixer
2024-09-06 09:34:29 +00:00
CXXFLAGS = `sdl2-config --cflags` -pedantic -O2 -std=c++17 -lX11 -lstdc++fs -I include
SRC = $(wildcard src/*.cpp)
OBJ = $(addprefix build/, $(notdir $(SRC:.cpp=.o)))
TARGET = build/x86_64/main.x86_64
2024-09-06 13:17:43 +00:00
all: dirs $(TARGET)
2024-09-06 09:34:29 +00:00
2024-09-06 12:38:39 +00:00
dirs:
@mkdir -p build/x86_64
2024-09-06 09:34:29 +00:00
$(TARGET): $(OBJ)
@$(CXX) -o $@ $^ $(LDFLAGS)
build/%.o: src/%.cpp
@$(CXX) -c -o $@ $< $(CXXFLAGS)
clean:
@rm -f $(OBJ) $(TARGET)