TETRIS: use new sdlpp library
This commit is contained in:
+11
-6
@@ -6,14 +6,12 @@ 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}
|
||||
tetris: tetris.o scenes.o config.o functions.o global_vars.o libsdlpp.so
|
||||
$(CXX) $(CFLAGS) -o $@ $^ ${LDFLAGS} -L -llibsdlpp
|
||||
|
||||
sdlpp.o: ../sdlpp.cpp ../sdlpp.hpp
|
||||
tetris.o: tetris.cpp ../sdlpp/sdlpp.hpp config.hpp custom_classes.hpp scenes.hpp global_vars.hpp functions.hpp
|
||||
$(CXX) $(CFLAGS) -c -o $@ $<
|
||||
tetris.o: tetris.cpp ../sdlpp.hpp config.hpp custom_classes.hpp scenes.hpp global_vars.hpp functions.hpp
|
||||
$(CXX) $(CFLAGS) -c -o $@ $<
|
||||
scenes.o: scenes.cpp ../sdlpp.hpp config.hpp scenes.hpp functions.hpp global_vars.hpp
|
||||
scenes.o: scenes.cpp ../sdlpp/sdlpp.hpp config.hpp scenes.hpp functions.hpp global_vars.hpp
|
||||
$(CXX) $(CFLAGS) -c -o $@ $<
|
||||
config.o: config.cpp config.hpp
|
||||
$(CXX) $(CFLAGS) -c -o $@ $<
|
||||
@@ -21,6 +19,13 @@ functions.o: functions.cpp config.hpp functions.hpp global_vars.hpp scenes.hpp
|
||||
$(CXX) $(CFLAGS) -c -o $@ $<
|
||||
global_vars.o: global_vars.cpp config.hpp global_vars.hpp functions.hpp
|
||||
$(CXX) $(CFLAGS) -c -o $@ $<
|
||||
libsdlpp.so: ../sdlpp
|
||||
$(MAKE) -C ../sdlpp
|
||||
cp ../sdlpp/libsdlpp.so .
|
||||
ln -sf libsdlpp.so libsdlpp.so.1
|
||||
|
||||
start:
|
||||
LD_LIBRARY_PATH=$$(pwd) ./tetris
|
||||
|
||||
clean:
|
||||
rm -Rf *.o tetris
|
||||
|
||||
Reference in New Issue
Block a user