27 lines
786 B
Makefile
27 lines
786 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 scenes.o config.o functions.o global_vars.o
|
|
$(CXX) $(CFLAGS) -o $@ $^ ${LDFLAGS}
|
|
|
|
sdlpp.o: ../sdlpp.cpp ../sdlpp.hpp
|
|
$(CXX) $(CFLAGS) -c -o $@ $<
|
|
tetris.o: tetris.cpp ../sdlpp.hpp config.hpp custom_classes.hpp scenes.hpp
|
|
$(CXX) $(CFLAGS) -c -o $@ $<
|
|
scenes.o: scenes.cpp ../sdlpp.hpp config.hpp scenes.hpp
|
|
$(CXX) $(CFLAGS) -c -o $@ $<
|
|
config.o: config.cpp config.hpp
|
|
$(CXX) $(CFLAGS) -c -o $@ $<
|
|
functions.o: functions.cpp config.hpp functions.hpp
|
|
$(CXX) $(CFLAGS) -c -o $@ $<
|
|
global_vars.o: global_vars.cpp config.hpp global_vars.hpp
|
|
$(CXX) $(CFLAGS) -c -o $@ $<
|
|
|
|
clean:
|
|
rm -Rf *.o tetris
|