Move tetris to its own dir
This commit is contained in:
parent
c7f3e7c741
commit
4a2f879448
2
.gitignore
vendored
2
.gitignore
vendored
@ -3,4 +3,4 @@
|
|||||||
*.o
|
*.o
|
||||||
demo
|
demo
|
||||||
test
|
test
|
||||||
tetris
|
tetris/tetris
|
||||||
|
4
Makefile
4
Makefile
@ -8,8 +8,6 @@ default: demo
|
|||||||
|
|
||||||
demo: main.o sdlpp.o
|
demo: main.o sdlpp.o
|
||||||
$(CXX) $(CFLAGS) -o $@ $^ ${LDFLAGS}
|
$(CXX) $(CFLAGS) -o $@ $^ ${LDFLAGS}
|
||||||
tetris: tetris.o sdlpp.o
|
|
||||||
$(CXX) $(CFLAGS) -o $@ $^ ${LDFLAGS}
|
|
||||||
test: test.o sdlpp.o
|
test: test.o sdlpp.o
|
||||||
$(CXX) $(CFLAGS) -o $@ $^ ${LDFLAGS}
|
$(CXX) $(CFLAGS) -o $@ $^ ${LDFLAGS}
|
||||||
|
|
||||||
@ -19,8 +17,6 @@ sdlpp.o: sdlpp.cpp sdlpp.hpp
|
|||||||
$(CXX) $(CFLAGS) -c -o $@ $<
|
$(CXX) $(CFLAGS) -c -o $@ $<
|
||||||
test.o: tests/test.cpp sdlpp.hpp tests/catch.hpp
|
test.o: tests/test.cpp sdlpp.hpp tests/catch.hpp
|
||||||
$(CXX) $(CFLAGS) -c -o $@ $<
|
$(CXX) $(CFLAGS) -c -o $@ $<
|
||||||
tetris.o: tetris.cpp sdlpp.hpp
|
|
||||||
$(CXX) $(CFLAGS) -c -o $@ $<
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -Rf *.o test demo
|
rm -Rf *.o test demo
|
||||||
|
18
tetris/Makefile
Normal file
18
tetris/Makefile
Normal 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
BIN
tetris/testfont.ttf
Normal file
Binary file not shown.
@ -1,4 +1,4 @@
|
|||||||
#include "sdlpp.hpp"
|
#include "../sdlpp.hpp"
|
||||||
#include <thread>
|
#include <thread>
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <mutex>
|
#include <mutex>
|
Loading…
Reference in New Issue
Block a user