game/tests/Makefile

19 lines
807 B
Makefile
Raw Permalink Normal View History

PREFIX ?= /usr/local/bin
CXXFLAGS = -std=c++14 -Wall -Wextra -pedantic
OBJEXT=o
LDFLAGS ?= -lSDL2 -lSDL2_image -lSDL2_gfx -lSDL2_ttf -pthread
.PHONY: default
default: test
OBJECTFILES = sdlpp_circlecolider.${OBJEXT} sdlpp_circlerenderer.${OBJEXT} sdlpp_collision.${OBJEXT} sdlpp_common.${OBJEXT} sdlpp_font.${OBJEXT} sdlpp_linerenderer.${OBJEXT} sdlpp_rectcolider.${OBJEXT} sdlpp_rectrenderer.${OBJEXT} sdlpp_renderer.${OBJEXT} sdlpp_renderobject.${OBJEXT} sdlpp_scene.${OBJEXT} sdlpp_textrenderer.${OBJEXT} sdlpp_texture.${OBJEXT} sdlpp_window.${OBJEXT} sdlpp_vector.${OBJEXT} sdlpp_line.${OBJEXT} sdlpp_geometry.${OBJEXT}
%.${OBJEXT}: ../sdlpp/%.cpp
${CXX} ${CXXFLAGS} ${LIBRARYFLAGS} -c $< -o $@
test: test.cpp ${OBJECTFILES}
$(CXX) $(CXXFLAGS) -o $@ $^ ${LDFLAGS}
clean:
rm -Rf *.${OBJEXT} test