2017-10-02 10:00:39 +02:00
|
|
|
OUTDIR = output
|
|
|
|
|
2017-09-30 21:22:38 +02:00
|
|
|
CXXFLAGS += $(shell sdl2-config --cflags) -std=c++14 -Wall -g
|
2017-09-30 10:26:30 +02:00
|
|
|
CFLAGS += $(shell sdl2-config --cflags)
|
2017-10-31 09:22:38 +01:00
|
|
|
CPPFLAGS += -I. -I$(OUTDIR) \
|
2017-11-21 17:32:52 +01:00
|
|
|
-Iimgui -Iglm -IIconFontCppHeaders -Iebcl/include \
|
2017-09-30 10:26:30 +02:00
|
|
|
-DREAL_BUILD -DGLM_ENABLE_EXPERIMENTAL
|
2017-11-01 23:45:09 +01:00
|
|
|
LIBS += $(shell sdl2-config --libs) -lGL -lGLEW -ldl \
|
|
|
|
$(LIBEBCL) -latomic
|
2017-09-30 10:26:30 +02:00
|
|
|
|
2017-09-30 11:23:14 +02:00
|
|
|
FILEDUMPS =
|
2017-09-30 10:26:30 +02:00
|
|
|
|
2017-10-02 10:00:39 +02:00
|
|
|
IMGUI = imgui.cpp imgui_draw.cpp
|
2017-11-06 10:33:18 +01:00
|
|
|
|
|
|
|
COMMON = \
|
2017-10-02 10:00:39 +02:00
|
|
|
imgui_impl_sdl.cc \
|
2017-10-01 19:40:38 +02:00
|
|
|
\
|
2017-10-02 10:00:39 +02:00
|
|
|
utilities.cc \
|
|
|
|
texture.cc \
|
|
|
|
rendertarget.cc \
|
2017-10-02 10:12:27 +02:00
|
|
|
camera.cc \
|
2017-11-19 21:19:11 +01:00
|
|
|
colorgrading.cc \
|
2017-10-05 18:35:35 +02:00
|
|
|
\
|
|
|
|
filewatcher.cc \
|
|
|
|
window.cc \
|
2017-10-04 11:20:27 +02:00
|
|
|
globals.cc \
|
2017-10-05 18:35:35 +02:00
|
|
|
profiling.cc \
|
|
|
|
shaders.cc \
|
2017-10-06 14:29:01 +02:00
|
|
|
odbg.cc \
|
2017-11-16 12:20:21 +01:00
|
|
|
\
|
2017-10-07 16:56:20 +02:00
|
|
|
sync.cc \
|
2017-11-16 12:20:21 +01:00
|
|
|
syncoverrides.cc \
|
2017-11-15 23:09:52 +01:00
|
|
|
\
|
2017-11-12 17:46:47 +01:00
|
|
|
ops.cc \
|
2017-11-06 10:15:38 +01:00
|
|
|
opast.cc \
|
2017-11-09 18:27:28 +01:00
|
|
|
opparser.cc \
|
2017-11-12 10:50:05 +01:00
|
|
|
opcomp.cc \
|
2017-11-15 23:09:52 +01:00
|
|
|
opmgr.cc \
|
2017-11-06 10:33:18 +01:00
|
|
|
# END COMMON
|
|
|
|
|
|
|
|
DEMO = \
|
2017-10-05 18:35:35 +02:00
|
|
|
demo.cc \
|
2017-11-20 17:01:09 +01:00
|
|
|
main.cc \
|
|
|
|
syncview.cc \
|
2017-11-06 10:33:18 +01:00
|
|
|
# END DEMO
|
|
|
|
|
|
|
|
PARSERCHECK = \
|
|
|
|
parsercheck.cc \
|
|
|
|
# END PARSERCHECK
|
2017-10-02 10:00:39 +02:00
|
|
|
|
2017-09-30 10:26:30 +02:00
|
|
|
|
2017-10-02 10:00:39 +02:00
|
|
|
IMGUI_OBJS = $(addprefix $(OUTDIR)/, $(addsuffix .o, $(basename $(IMGUI))))
|
2017-11-06 10:33:18 +01:00
|
|
|
COMMON_OBJS = $(addprefix $(OUTDIR)/, $(addsuffix .o, $(basename $(COMMON))))
|
2017-10-02 10:00:39 +02:00
|
|
|
DEMO_OBJS = $(addprefix $(OUTDIR)/, $(addsuffix .o, $(basename $(DEMO))))
|
2017-11-06 10:33:18 +01:00
|
|
|
PARSERCHECK_OBJS = $(addprefix $(OUTDIR)/, $(addsuffix .o, $(basename $(PARSERCHECK))))
|
2017-11-04 09:17:31 +01:00
|
|
|
LIBEBCL = $(OUTDIR)/ebcl/libebcorelib.a
|
2017-10-02 10:00:39 +02:00
|
|
|
PCH=externals.hh.gch
|
2017-09-30 10:26:30 +02:00
|
|
|
|
2017-11-06 10:33:18 +01:00
|
|
|
COMMON_DEPS = $(COMMON_OBJS:$(OUTDIR)/%.o=$(OUTDIR)/%.d)
|
2017-10-02 10:00:39 +02:00
|
|
|
DEMO_DEPS = $(DEMO_OBJS:$(OUTDIR)/%.o=$(OUTDIR)/%.d)
|
2017-11-06 10:33:18 +01:00
|
|
|
PARSERCHECK_DEPS = $(PARSERCHECK_OBJS:$(OUTDIR)/%.o=$(OUTDIR)/%.d)
|
2017-09-30 10:26:30 +02:00
|
|
|
|
2017-11-06 10:33:18 +01:00
|
|
|
COMMON_REQ = $(COMMON_OBJS) $(IMGUI_OBJS)
|
|
|
|
|
|
|
|
DEMO_BUILD = $(DEMO_OBJS) $(COMMON_REQ)
|
|
|
|
PARSERCHECK_BUILD = $(PARSERCHECK_OBJS) $(COMMON_REQ)
|
|
|
|
|
|
|
|
ALL_OBJS = $(DEMO_OBJS) $(PARSERCHECK_OBJS) $(COMMON_REQ)
|
|
|
|
ALL_DEPS = $(COMMON_DEPS) $(DEMO_DEPS) $(PARSERCHECK_DEPS)
|
|
|
|
|
|
|
|
|
|
|
|
all: demo parsercheck
|
|
|
|
|
|
|
|
demo: $(LIBEBCL) $(DEMO_BUILD)
|
2017-09-30 10:37:45 +02:00
|
|
|
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -o demo \
|
2017-11-06 10:33:18 +01:00
|
|
|
$(DEMO_BUILD) $(LIBS)
|
|
|
|
|
|
|
|
parsercheck: $(LIBEBCL) $(PARSERCHECK_BUILD)
|
|
|
|
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -o parsercheck \
|
|
|
|
$(PARSERCHECK_BUILD) $(LIBS)
|
2017-09-30 10:26:30 +02:00
|
|
|
|
|
|
|
clean:
|
2017-11-06 10:33:18 +01:00
|
|
|
rm -f $(ALL_OBJS) $(FILEDUMPS) demo parsercheck $(PCH)
|
2017-09-30 10:26:30 +02:00
|
|
|
|
|
|
|
fullclean: clean
|
2017-11-01 23:45:09 +01:00
|
|
|
@+make -C ebcl fullclean CONFIG=../ebcl-config
|
2017-11-06 10:33:18 +01:00
|
|
|
rm -f $(ALL_DEPS)
|
2017-09-30 10:26:30 +02:00
|
|
|
|
2017-11-06 10:33:18 +01:00
|
|
|
.PHONY: all clean fullclean
|
2017-09-30 10:26:30 +02:00
|
|
|
|
|
|
|
|
|
|
|
$(FILEDUMPS): fd-%.h: %
|
|
|
|
xxd -i $< $@
|
|
|
|
|
|
|
|
|
2017-10-02 10:00:39 +02:00
|
|
|
outdir:
|
|
|
|
@if ! [ -d "$(OUTDIR)" ]; then mkdir "$(OUTDIR)"; fi
|
|
|
|
.PHONY: outdir
|
2017-09-30 10:26:30 +02:00
|
|
|
|
2017-11-06 10:33:18 +01:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
2017-10-02 10:00:39 +02:00
|
|
|
$(IMGUI_OBJS): $(OUTDIR)/%.o: imgui/%.cpp | outdir
|
2017-09-30 10:26:30 +02:00
|
|
|
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $<
|
|
|
|
|
2017-11-06 10:33:18 +01:00
|
|
|
#-------------------------------------------------------------------------------
|
2017-09-30 10:26:30 +02:00
|
|
|
|
2017-11-06 10:33:18 +01:00
|
|
|
-include $(DEMO_DEPS)
|
2017-10-02 10:00:39 +02:00
|
|
|
$(DEMO_OBJS): $(OUTDIR)/%.o: %.cc $(PCH) | outdir $(FILEDUMPS)
|
2017-09-30 10:26:30 +02:00
|
|
|
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $<
|
2017-10-02 10:00:39 +02:00
|
|
|
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -M -MF $(@:%.o=%.d) -MT $@ $<
|
2017-09-30 10:26:30 +02:00
|
|
|
|
2017-11-06 10:33:18 +01:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
-include $(COMMON_DEPS)
|
|
|
|
$(COMMON_OBJS): $(OUTDIR)/%.o: %.cc $(PCH) | outdir $(FILEDUMPS)
|
|
|
|
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $<
|
|
|
|
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -M -MF $(@:%.o=%.d) -MT $@ $<
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
-include $(PARSERCHECK_DEPS)
|
|
|
|
$(PARSERCHECK_OBJS): $(OUTDIR)/%.o: %.cc $(PCH) | outdir $(FILEDUMPS)
|
|
|
|
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $<
|
|
|
|
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -M -MF $(@:%.o=%.d) -MT $@ $<
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
2017-11-01 23:34:31 +01:00
|
|
|
$(LIBEBCL): ebcl-config
|
|
|
|
+make -C ebcl CONFIG=../ebcl-config
|
|
|
|
|
2017-10-02 10:00:39 +02:00
|
|
|
$(PCH): externals.hh
|
2017-09-30 10:26:30 +02:00
|
|
|
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $<
|
2017-11-21 17:32:52 +01:00
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
$(OUTDIR)/window.o: window.cc $(OUTDIR)/font-awesome.inl
|
|
|
|
|
|
|
|
$(OUTDIR)/font-awesome.inl: font-awesome/fonts/fontawesome-webfont.ttf $(OUTDIR)/font-to-c
|
|
|
|
$(OUTDIR)/font-to-c -base85 font-awesome/fonts/fontawesome-webfont.ttf \
|
|
|
|
FontAwesome_ >$@
|
|
|
|
|
|
|
|
$(OUTDIR)/font-to-c: imgui/extra_fonts/binary_to_compressed_c.cpp
|
|
|
|
$(CXX) -o $@ $<
|