Give up and use implicit template instantiation
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
|
||||
#include "networktransport.hpp"
|
||||
|
||||
#include "transportsender.cpp"
|
||||
|
||||
using namespace Network;
|
||||
using namespace std;
|
||||
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
#include <poll.h>
|
||||
|
||||
#include "user.hpp"
|
||||
#include "networktransport.hpp"
|
||||
#include "networktransport.cpp"
|
||||
|
||||
using namespace Network;
|
||||
|
||||
|
||||
+2
-1
@@ -14,11 +14,12 @@
|
||||
#include <signal.h>
|
||||
#include <sys/signalfd.h>
|
||||
|
||||
#include "networktransport.hpp"
|
||||
#include "completeterminal.hpp"
|
||||
#include "swrite.hpp"
|
||||
#include "user.hpp"
|
||||
|
||||
#include "networktransport.cpp"
|
||||
|
||||
void serve( int host_fd );
|
||||
|
||||
using namespace std;
|
||||
|
||||
+2
-2
@@ -15,10 +15,10 @@
|
||||
|
||||
#include "stmclient.hpp"
|
||||
#include "swrite.hpp"
|
||||
#include "networktransport.hpp"
|
||||
#include "completeterminal.hpp"
|
||||
#include "user.hpp"
|
||||
#include "network.hpp"
|
||||
|
||||
#include "networktransport.cpp"
|
||||
|
||||
void STMClient::init( void )
|
||||
{
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
#include <list>
|
||||
#include <vector>
|
||||
#include <deque>
|
||||
#include <wchar.h>
|
||||
#include <string>
|
||||
|
||||
#include "terminal.hpp"
|
||||
#include "completeterminal.hpp"
|
||||
#include "terminaloverlay.hpp"
|
||||
|
||||
#include "user.hpp"
|
||||
#include "networktransport.cpp"
|
||||
#include "transportsender.cpp"
|
||||
#include "userinput.pb.h"
|
||||
|
||||
namespace Parser {
|
||||
class Action;
|
||||
}
|
||||
|
||||
using namespace std;
|
||||
using namespace Terminal;
|
||||
using namespace Network;
|
||||
using namespace Overlay;
|
||||
|
||||
template class list<Parser::Action *>;
|
||||
template class vector<Cell>;
|
||||
template class deque<Row>;
|
||||
template class vector<Cell *>;
|
||||
template class vector<wchar_t>;
|
||||
template class vector<int>;
|
||||
template class map<string, Function>;
|
||||
template class vector<bool>;
|
||||
|
||||
template class vector<Fragment>;
|
||||
template class Transport<UserStream, UserStream>;
|
||||
template class Transport<Complete, UserStream>;
|
||||
template class Transport<UserStream, Complete>;
|
||||
|
||||
template class TransportSender<UserStream>;
|
||||
template class TransportSender<Complete>;
|
||||
|
||||
template class deque<UserEvent>;
|
||||
template class list<OverlayElement *>;
|
||||
Reference in New Issue
Block a user