CXXFLAGS += $(shell sdl2-config --cflags) -std=c++14 -Wall CFLAGS += $(shell sdl2-config --cflags) CPPFLAGS += -I. -Iimgui -Iimguifs -Iglm -Ipicojson \ -DREAL_BUILD -DGLM_ENABLE_EXPERIMENTAL LIBS += $(shell sdl2-config --libs) -lGL -lGLEW -ldl FILEDUMPS = \ fd-raymarcher.glsl.h IMGUI = imgui.o imgui_demo.o imgui_draw.o imguifs.o EDITOR = \ editor.o \ imgui_impl_sdl.o \ utilities.o \ project.o \ \ mg-none.o \ mg-fragment.o \ \ gfx-raymarcher.o EDITOR_DEPS = $(EDITOR:%.o=.%.d) editor: $(EDITOR) $(IMGUI) $(CXX) $(CXXFLAGS) $(CPPFLAGS) -o editor \ $(EDITOR) $(IMGUI) $(LIBS) clean: rm -f $(IMGUI) $(EDITOR) $(FILEDUMPS) editor externals.hh.gch fullclean: clean rm -f $(EDITOR_DEPS) .PHONY: clean fullclean $(FILEDUMPS): fd-%.h: % xxd -i $< $@ imgui.o: imgui/imgui.cpp $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $< imgui_demo.o: imgui/imgui_demo.cpp $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $< imgui_draw.o: imgui/imgui_draw.cpp $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $< imguifs.o: imguifs/imguifilesystem.cpp imguifs/dirent_portable.h imguifs/imguifilesystem.h $(CXX) $(CXXFLAGS) $(CPPFLAGS) -include /usr/include/stdlib.h -c -o $@ $< -include $(EDITOR_DEPS) $(EDITOR): %.o: %.cc externals.hh.gch | $(FILEDUMPS) $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $< $(CXX) $(CXXFLAGS) $(CPPFLAGS) -M -MF $(@:%.o=.%.d) -MT $@ $< externals.hh.gch: externals.hh $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $<