Move tetris to its own dir

This commit is contained in:
zvon 2020-09-11 14:29:06 +02:00
parent c7f3e7c741
commit 4a2f879448
5 changed files with 20 additions and 6 deletions

2
.gitignore vendored
View File

@ -3,4 +3,4 @@
*.o
demo
test
tetris
tetris/tetris

View File

@ -8,8 +8,6 @@ default: demo
demo: main.o sdlpp.o
$(CXX) $(CFLAGS) -o $@ $^ ${LDFLAGS}
tetris: tetris.o sdlpp.o
$(CXX) $(CFLAGS) -o $@ $^ ${LDFLAGS}
test: test.o sdlpp.o
$(CXX) $(CFLAGS) -o $@ $^ ${LDFLAGS}
@ -19,8 +17,6 @@ sdlpp.o: sdlpp.cpp sdlpp.hpp
$(CXX) $(CFLAGS) -c -o $@ $<
test.o: tests/test.cpp sdlpp.hpp tests/catch.hpp
$(CXX) $(CFLAGS) -c -o $@ $<
tetris.o: tetris.cpp sdlpp.hpp
$(CXX) $(CFLAGS) -c -o $@ $<
clean:
rm -Rf *.o test demo

18
tetris/Makefile Normal file
View File

@ -0,0 +1,18 @@
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

BIN
tetris/testfont.ttf Normal file

Binary file not shown.

View File

@ -1,4 +1,4 @@
#include "sdlpp.hpp"
#include "../sdlpp.hpp"
#include <thread>
#include <chrono>
#include <mutex>