src = $(wildcard src/*.cc) $(wildcard src/opengl/*.cc) $(wildcard src/vulkan/*.cc) obj = $(src:.cc=.o) dep = $(obj:.o=.d) bin = demo dbg = -g opt = -O0 inc = -Isrc -Iexternal/gmath/src -I/usr/include -Iexternal/libimago/src libs = -lGL -lGLEW -lglfw -lvulkan -lassimp -lgmath -limago CXX = g++ CXXFLAGS = -pedantic -Wall -std=c++0x $(dbg) -fPIC -D_GNU_SOURCE $(opt) $(inc) $(def) LDFLAGS = -L$(LD_LIBRARY_PATH) $(libs) $(bin): $(obj) $(CXX) -o $@ $(obj) $(LDFLAGS) -include $(dep) %.d: %.cc @$(CPP) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@ .PHONY: clean clean: rm -f $(obj) $(bin) $(dep)