game/tetris/Makefile
2020-09-11 14:29:06 +02:00

19 lines
383 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
$(CXX) $(CFLAGS) -c -o $@ $<
clean:
rm -Rf *.o tetris