Give up and use implicit template instantiation

This commit is contained in:
Keith Winstein
2011-12-14 01:04:05 -05:00
parent 364cb6d722
commit 048485f363
6 changed files with 18 additions and 62 deletions
+11 -15
View File
@@ -1,11 +1,10 @@
proto = userinput.proto transportinstruction.proto
source = parse.cpp parserstate.cpp parser.cpp templates.cpp terminal.cpp termemu.cpp parseraction.cpp terminalfunctions.cpp swrite.cpp terminalframebuffer.cpp terminaldispatcher.cpp terminaluserinput.cpp terminaldisplay.cpp network.cpp ntester.cpp ocb.cpp base64.cpp encrypt.cpp decrypt.cpp crypto.cpp networktransport.cpp transportfragment.cpp user.cpp userinput.pb.cc completeterminal.cpp stm-server.cpp stm.cpp transportinstruction.pb.cc transportsender.cpp stmclient.cpp terminaloverlay.cpp
objects = parserstate.o parser.o templates.o terminal.o parseraction.o terminalfunctions.o swrite.o terminalframebuffer.o terminaldispatcher.o terminaluserinput.o terminaldisplay.o network.o ocb.o base64.o crypto.o networktransport.o transportfragment.o user.o userinput.pb.o completeterminal.o transportinstruction.pb.o transportsender.o stmclient.o terminaloverlay.o
repos = templates.rpo
source = parse.cpp parserstate.cpp parser.cpp terminal.cpp termemu.cpp parseraction.cpp terminalfunctions.cpp swrite.cpp terminalframebuffer.cpp terminaldispatcher.cpp terminaluserinput.cpp terminaldisplay.cpp network.cpp ntester.cpp ocb.cpp base64.cpp encrypt.cpp decrypt.cpp crypto.cpp networktransport.cpp transportfragment.cpp user.cpp userinput.pb.cc completeterminal.cpp stm-server.cpp stm.cpp transportinstruction.pb.cc transportsender.cpp stmclient.cpp terminaloverlay.cpp
objects = parserstate.o parser.o terminal.o parseraction.o terminalfunctions.o swrite.o terminalframebuffer.o terminaldispatcher.o terminaluserinput.o terminaldisplay.o network.o ocb.o base64.o crypto.o networktransport.o transportfragment.o user.o userinput.pb.o completeterminal.o transportinstruction.pb.o transportsender.o stmclient.o terminaloverlay.o
executables = parse termemu ntester encrypt decrypt stm-server stm
CXX = g++
CXXFLAGS = -g -O2 --std=c++0x -pedantic -Werror -Wall -Wextra -Weffc++ -fno-implicit-templates -fno-default-inline -pipe -D_FILE_OFFSET_BITS=64 -D_XOPEN_SOURCE=500 -D_GNU_SOURCE -D_BSD_SOURCE
CXXFLAGS = -g -O2 --std=c++0x -pedantic -Werror -Wall -Wextra -Weffc++ -fno-default-inline -pipe -D_FILE_OFFSET_BITS=64 -D_XOPEN_SOURCE=500 -D_GNU_SOURCE -D_BSD_SOURCE
LIBS = -lutil -lcrypto -lrt -lm -lprotobuf-lite
PROTOC = protoc
@@ -14,27 +13,24 @@ all: $(executables)
parse: parse.o $(objects)
$(CXX) $(CXXFLAGS) -o $@ $+ $(LIBS)
termemu: termemu.o $(objects) parse # serialize link steps because of -frepo
termemu: termemu.o $(objects)
$(CXX) $(CXXFLAGS) -o $@ termemu.o $(objects) $(LIBS)
ntester: ntester.o $(objects) termemu # serialize link steps because of -frepo
ntester: ntester.o $(objects)
$(CXX) $(CXXFLAGS) -o $@ ntester.o $(objects) $(LIBS)
encrypt: encrypt.o $(objects) ntester # serialize link steps because of -frepo
encrypt: encrypt.o $(objects)
$(CXX) $(CXXFLAGS) -o $@ encrypt.o $(objects) $(LIBS)
decrypt: decrypt.o $(objects) encrypt # serialize link steps because of -frepo
decrypt: decrypt.o $(objects)
$(CXX) $(CXXFLAGS) -o $@ decrypt.o $(objects) $(LIBS)
stm-server: stm-server.o $(objects) decrypt # serialize link steps because of -frepo
stm-server: stm-server.o $(objects)
$(CXX) $(CXXFLAGS) -o $@ stm-server.o $(objects) $(LIBS)
stm: stm.o $(objects) stm-server # serialize link steps because of -frepo
stm: stm.o $(objects)
$(CXX) $(CXXFLAGS) -o $@ stm.o $(objects) $(LIBS)
templates.o: templates.cpp
$(CXX) $(CXXFLAGS) -frepo -c -o $@ $<
%.o: %.cpp
$(CXX) $(CXXFLAGS) -c -o $@ $<
@@ -42,7 +38,7 @@ templates.o: templates.cpp
$(PROTOC) --cpp_out=. $<
%.pb.o: %.pb.cc
$(CXX) $(CXXFLAGS) -frepo -Wno-effc++ -c -o $@ $<
$(CXX) $(CXXFLAGS) -Wno-effc++ -c -o $@ $<
-include depend
@@ -51,4 +47,4 @@ depend: $(source)
.PHONY: clean
clean:
-rm -f $(executables) depend *.o *.rpo *.pb.cc *.pb.h
-rm -f $(executables) depend *.o *.pb.cc *.pb.h