17 lines
405 B
Makefile
17 lines
405 B
Makefile
|
CXX = g++
|
||
|
LDFLAGS = `sdl2-config --libs` -l SDL2_ttf
|
||
|
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
|
||
|
|
||
|
all: $(TARGET)
|
||
|
|
||
|
$(TARGET): $(OBJ)
|
||
|
@$(CXX) -o $@ $^ $(LDFLAGS)
|
||
|
|
||
|
build/%.o: src/%.cpp
|
||
|
@$(CXX) -c -o $@ $< $(CXXFLAGS)
|
||
|
|
||
|
clean:
|
||
|
@rm -f $(OBJ) $(TARGET)
|