Binary object storage, misc changes
This commit is contained in:
15
Makefile
15
Makefile
@@ -1,20 +1,29 @@
|
||||
CXX=g++
|
||||
CXXOPTS=-Og -ggdb -Wall -Wextra -pedantic -Wno-unused-function -Wno-unused-parameter -Wno-sign-compare -std=c++11
|
||||
LDOPTS=-flto
|
||||
LIBS=-lglbinding -lSDL2 -lSDL2_image -lobj
|
||||
CXXSRCS=main.cc objectParser.cc
|
||||
LIBS=-lglbinding -lSDL2 -lSDL2_image -lobj -lprotobuf
|
||||
CXXSRCS=main.cc objectParser.cc object.pb.cc
|
||||
BINIFY_SRCS=binifyObj.cc objectParser.cc object.pb.cc
|
||||
OBJS=$(addprefix objs/,$(CXXSRCS:.cc=.o))
|
||||
BINIFY_OBJS=$(addprefix objs/,$(BINIFY_SRCS:.cc=.o))
|
||||
|
||||
objs/%.o: %.cc
|
||||
$(CXX) $(CXXOPTS) -c -MMD -MP -o $@ $<
|
||||
@cp objs/$*.d objs/$*.P; rm -f objs/$*.d
|
||||
|
||||
%.pb.cc %.pb.h: %.proto
|
||||
protoc --cpp_out=. $<
|
||||
|
||||
oglpg: $(OBJS)
|
||||
$(CXX) $(CXXOPTS) $(LDOPTS) -o $@ $(OBJS) $(LIBS)
|
||||
|
||||
binifyObj: $(BINIFY_OBJS)
|
||||
$(CXX) $(CXXOPTS) $(LDOPTS) -o $@ $(BINIFY_OBJS) $(LIBS)
|
||||
|
||||
clean:
|
||||
rm -f oglpg $(OBJS) $(addprefix objs/,$(CXXSRCS:.cc=.P))
|
||||
rm -f oglpg $(OBJS) $(BINIFY_OBJS) $(addprefix objs/,$(CXXSRCS:.cc=.P)) $(addprefix objs/,$(BINIFY_SRCS:.cc=.P))
|
||||
|
||||
.PHONY: clean
|
||||
|
||||
-include $(addprefix objs/,$(CXXSRCS:.cc=.P))
|
||||
-include $(addprefix objs/,$(BINIFY_SRCS:.cc=.P))
|
||||
|
||||
Reference in New Issue
Block a user