Build parser check utility
This commit is contained in:
parent
77d46da19a
commit
0ed905bbde
3 changed files with 60 additions and 10 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,4 +1,5 @@
|
|||
demo
|
||||
parsercheck
|
||||
*.o
|
||||
fd-*.h
|
||||
imgui.ini
|
||||
|
|
66
Makefile
66
Makefile
|
@ -11,8 +11,8 @@ LIBS += $(shell sdl2-config --libs) -lGL -lGLEW -ldl \
|
|||
FILEDUMPS =
|
||||
|
||||
IMGUI = imgui.cpp imgui_draw.cpp
|
||||
DEMO = \
|
||||
main.cc \
|
||||
|
||||
COMMON = \
|
||||
imgui_impl_sdl.cc \
|
||||
\
|
||||
utilities.cc \
|
||||
|
@ -30,6 +30,10 @@ DEMO = \
|
|||
sync.cc \
|
||||
control.cc \
|
||||
opast.cc \
|
||||
# END COMMON
|
||||
|
||||
DEMO = \
|
||||
main.cc \
|
||||
\
|
||||
demo.cc \
|
||||
\
|
||||
|
@ -37,29 +41,52 @@ DEMO = \
|
|||
bloom.cc \
|
||||
dof.cc \
|
||||
combine.cc \
|
||||
fxaa.cc
|
||||
fxaa.cc \
|
||||
# END DEMO
|
||||
|
||||
PARSERCHECK = \
|
||||
parsercheck.cc \
|
||||
# END PARSERCHECK
|
||||
|
||||
|
||||
IMGUI_OBJS = $(addprefix $(OUTDIR)/, $(addsuffix .o, $(basename $(IMGUI))))
|
||||
COMMON_OBJS = $(addprefix $(OUTDIR)/, $(addsuffix .o, $(basename $(COMMON))))
|
||||
DEMO_OBJS = $(addprefix $(OUTDIR)/, $(addsuffix .o, $(basename $(DEMO))))
|
||||
OBJS = $(IMGUI_OBJS) $(DEMO_OBJS)
|
||||
PARSERCHECK_OBJS = $(addprefix $(OUTDIR)/, $(addsuffix .o, $(basename $(PARSERCHECK))))
|
||||
LIBEBCL = $(OUTDIR)/ebcl/libebcorelib.a
|
||||
PCH=externals.hh.gch
|
||||
|
||||
COMMON_DEPS = $(COMMON_OBJS:$(OUTDIR)/%.o=$(OUTDIR)/%.d)
|
||||
DEMO_DEPS = $(DEMO_OBJS:$(OUTDIR)/%.o=$(OUTDIR)/%.d)
|
||||
PARSERCHECK_DEPS = $(PARSERCHECK_OBJS:$(OUTDIR)/%.o=$(OUTDIR)/%.d)
|
||||
|
||||
demo: $(LIBEBCL) $(OBJS)
|
||||
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)
|
||||
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -o demo \
|
||||
$(OBJS) $(LIBS)
|
||||
$(DEMO_BUILD) $(LIBS)
|
||||
|
||||
parsercheck: $(LIBEBCL) $(PARSERCHECK_BUILD)
|
||||
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -o parsercheck \
|
||||
$(PARSERCHECK_BUILD) $(LIBS)
|
||||
|
||||
clean:
|
||||
rm -f $(OBJS) $(FILEDUMPS) demo $(PCH)
|
||||
rm -f $(ALL_OBJS) $(FILEDUMPS) demo parsercheck $(PCH)
|
||||
|
||||
fullclean: clean
|
||||
@+make -C ebcl fullclean CONFIG=../ebcl-config
|
||||
rm -f $(DEMO_DEPS)
|
||||
rm -f $(ALL_DEPS)
|
||||
|
||||
.PHONY: clean fullclean
|
||||
.PHONY: all clean fullclean
|
||||
|
||||
|
||||
$(FILEDUMPS): fd-%.h: %
|
||||
|
@ -70,15 +97,34 @@ outdir:
|
|||
@if ! [ -d "$(OUTDIR)" ]; then mkdir "$(OUTDIR)"; fi
|
||||
.PHONY: outdir
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
$(IMGUI_OBJS): $(OUTDIR)/%.o: imgui/%.cpp | outdir
|
||||
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $<
|
||||
|
||||
-include $(DEMO_DEPS)
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
-include $(DEMO_DEPS)
|
||||
$(DEMO_OBJS): $(OUTDIR)/%.o: %.cc $(PCH) | outdir $(FILEDUMPS)
|
||||
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $<
|
||||
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -M -MF $(@:%.o=%.d) -MT $@ $<
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
-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 $@ $<
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
$(LIBEBCL): ebcl-config
|
||||
+make -C ebcl CONFIG=../ebcl-config
|
||||
|
||||
|
|
3
parsercheck.cc
Normal file
3
parsercheck.cc
Normal file
|
@ -0,0 +1,3 @@
|
|||
int main( )
|
||||
{
|
||||
}
|
Loading…
Reference in a new issue