2 CXX = g++ -std=gnu++0x -Wall -Werror -Wshadow -pedantic -g
4 OBJ = log.o document.o view.o screen.o
5 LIB = ../contrib/lib/libSDL2-2.0.so.0 -lGL
6 MAINRPATH = -Wl,-rpath,'$$ORIGIN/../contrib/lib'
7 TESTRPATH = -Wl,-rpath,'$$ORIGIN/../../contrib/lib'
8 OBJPATHS = $(OBJ:%=../obj/%)
9 DEPS := $(OBJPATHS:%.o=%.d)
10 CFLAGS += -I../contrib/include/SDL2 -I`pwd`
20 tests/% : tests/%.cpp ../obj/tests/%.o $(LINKOBJ)
23 runtests : tests/runtests.sh
24 cd tests; ./runtests.sh
27 $(BIN) : $(LINKOBJ) ../obj/$(MAIN)
29 $(CXX) -o $(BIN) $(LINKOBJ) ../obj/$(MAIN) $(LIB) $(MAINRPATH)
33 $(CXX) $(CFLAGS) -c -MMD -o $@ $<
41 $(RM) $(BIN) $(DEPS) $(LINKOBJ) ../obj/$(MAIN)