game/tetris/Makefile
2020-09-11 15:05:41 +02:00

19 lines
394 B
Makefile

CXX ?= g++
CFLAGS ?= -O2 -Wall -Wextra -g
PREFIX ?= /usr/local/bin
LDFLAGS ?= -lSDL2 -lSDL2_image -lSDL2_gfx -lSDL2_ttf -pthread
.PHONY: default
default: tetris
tetris: tetris.o sdlpp.o
$(CXX) $(CFLAGS) -o $@ $^ ${LDFLAGS}
sdlpp.o: ../sdlpp.cpp ../sdlpp.hpp
$(CXX) $(CFLAGS) -c -o $@ $<
tetris.o: tetris.cpp ../sdlpp.hpp config.hpp
$(CXX) $(CFLAGS) -c -o $@ $<
clean:
rm -Rf *.o tetris