2020-09-11 12:29:06 +00:00
|
|
|
CXX ?= g++
|
|
|
|
CFLAGS ?= -O2 -Wall -Wextra -g
|
|
|
|
PREFIX ?= /usr/local/bin
|
|
|
|
LDFLAGS ?= -lSDL2 -lSDL2_image -lSDL2_gfx -lSDL2_ttf -pthread
|
|
|
|
|
|
|
|
.PHONY: default
|
|
|
|
default: tetris
|
|
|
|
|
2020-09-11 19:34:43 +00:00
|
|
|
tetris: tetris.o sdlpp.o scenes.o config.o functions.o global_vars.o
|
2020-09-11 12:29:06 +00:00
|
|
|
$(CXX) $(CFLAGS) -o $@ $^ ${LDFLAGS}
|
|
|
|
|
|
|
|
sdlpp.o: ../sdlpp.cpp ../sdlpp.hpp
|
|
|
|
$(CXX) $(CFLAGS) -c -o $@ $<
|
2020-09-11 19:40:51 +00:00
|
|
|
tetris.o: tetris.cpp ../sdlpp.hpp config.hpp custom_classes.hpp scenes.hpp global_vars.hpp functions.hpp
|
2020-09-11 19:34:43 +00:00
|
|
|
$(CXX) $(CFLAGS) -c -o $@ $<
|
2020-09-11 19:40:51 +00:00
|
|
|
scenes.o: scenes.cpp ../sdlpp.hpp config.hpp scenes.hpp functions.hpp global_vars.hpp
|
2020-09-11 19:34:43 +00:00
|
|
|
$(CXX) $(CFLAGS) -c -o $@ $<
|
|
|
|
config.o: config.cpp config.hpp
|
|
|
|
$(CXX) $(CFLAGS) -c -o $@ $<
|
2020-09-11 19:40:51 +00:00
|
|
|
functions.o: functions.cpp config.hpp functions.hpp global_vars.hpp scenes.hpp
|
2020-09-11 19:34:43 +00:00
|
|
|
$(CXX) $(CFLAGS) -c -o $@ $<
|
2020-09-11 19:40:51 +00:00
|
|
|
global_vars.o: global_vars.cpp config.hpp global_vars.hpp functions.hpp
|
2020-09-11 12:29:06 +00:00
|
|
|
$(CXX) $(CFLAGS) -c -o $@ $<
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -Rf *.o tetris
|