📄 makefile
字号:
###################################################################################### NOTES:###### 1. values for some macros:###### PLATFORMOS: "LINUX", "HPUX" , "FREEBSD" , "SOLARIS", "COMPAQ";###### 2. usages:### ### clean all:make clean### make all: make all### make sendmsg: make sendmsg### make recvmsg: make recvmsg### make sendbatch: make sendbatch### make activetest: make activetest####################################################################################----------------------------------- Main -------------------------------------#### the following should be changed according to different platform osPLATFORMOS = LINUX#PLATFORMOS = HPUX#PLATFORMOS = FREEBSD#PLATFORMOS = SOLARIS#PLATFORMOS = COMPAQGATEWAYHOME = /home/lrh/ProxyGateWay/SMGateway#-------------------------------- Directory -----------------------------------#MYSQL_INCDIR = /usr/include/mysqlMYSQL_LIBDIR = /usr/lib/mysqlSRCSDIR = $(GATEWAYHOME)/src/INCDIR = $(GATEWAYHOME)/includeLIBDIR = $(GATEWAYHOME)/libINCS = -I. -I$(INCDIR) -I$(MYSQL_INCDIR)#------------------------------------- Libs -----------------------------------#LIBS = -L. -L$(LIBDIR) -L$(MYSQL_LIBDIR)LIBFILE = #COMMLIB = $(LIBDIR)smgwapi.a $(SYBASELIBDIR)libsybdb.a -lmysqlclient -lpthread -lstdc++COMMLIB = -lpthread -lstdc++ -lmysqlclient -lz -lcrypt#-------------------------------- Flags & LINKER & LINT & RM----------------------------#LINUXCC = g++#HPUXCC = cc#FREEBSDCC = cc#SOLARISCC = gcc#COMPAQCC = cc#CFLAGS = -Misalign -Wall -g -I$(INCDIR) -I$(SYBASEINCDIR)#CFLAGS = -Wno-deprecated -Wall -D __DEBUG -gCFLAGS = -Wno-deprecated -Wall -gCC = $($(PLATFORMOS)CC)COMPILER = $(CC)LINKER = ar rvLINT = lint -cRM = /bin/rm -f #-------------------------------- Sources & Objects -------------------------------------#SRCS = \ $(SRCSDIR)socket.cpp \ $(SRCSDIR)sharefunc.cpp \ $(SRCSDIR)ConnectionPool.cpp \ $(SRCSDIR)IntStructMap.cpp \ $(SRCSDIR)IntPointMap.cpp \ $(SRCSDIR)GWmain.cpp \ $(SRCSDIR)SystemExit.cpp \ $(SRCSDIR)GateWayInit.cpp \ $(SRCSDIR)GWconsole.cpp \ $(SRCSDIR)UpNodeInit.cpp \ $(SRCSDIR)UpNodeCom.cpp \ $(SRCSDIR)UpNodeLogin.cpp \ $(SRCSDIR)UpReceiver.cpp \ $(SRCSDIR)UpSender.cpp \ $(SRCSDIR)UpMakeRspPack.cpp \ $(SRCSDIR)UpPoller.cpp \ $(SRCSDIR)UpSentQCheck.cpp \ $(SRCSDIR)UpPutPack.cpp \ $(SRCSDIR)DnNodeInit.cpp \ $(SRCSDIR)DnListener.cpp \ $(SRCSDIR)DnNodeLogin.cpp \ $(SRCSDIR)DnReceiver.cpp \ $(SRCSDIR)DnSender.cpp \ $(SRCSDIR)DnMakeRspPack.cpp \ $(SRCSDIR)DnPoller.cpp \ $(SRCSDIR)DnSentQCheck.cpp \ $(SRCSDIR)DnPutPack.cpp \ $(SRCSDIR)UpPackDeal.cpp \ $(SRCSDIR)MoForward.cpp \ $(SRCSDIR)DnCMPPDeal.cpp \ $(SRCSDIR)MtForward.cpp \ $(SRCSDIR)RWLock.cpp \ $(SRCSDIR)FileOpr.cpp \ $(SRCSDIR)DB_MySQL.cpp \ $(SRCSDIR)md5.cppOBJS = \ $(SRCSDIR)socket.o \ $(SRCSDIR)sharefunc.o \ $(SRCSDIR)ConnectionPool.o \ $(SRCSDIR)IntStructMap.o \ $(SRCSDIR)IntPointMap.o \ $(SRCSDIR)GWmain.o \ $(SRCSDIR)SystemExit.o \ $(SRCSDIR)GateWayInit.o \ $(SRCSDIR)GWconsole.o \ $(SRCSDIR)UpNodeInit.o \ $(SRCSDIR)UpNodeCom.o \ $(SRCSDIR)UpNodeLogin.o \ $(SRCSDIR)UpReceiver.o \ $(SRCSDIR)UpSender.o \ $(SRCSDIR)UpMakeRspPack.o \ $(SRCSDIR)UpPoller.o \ $(SRCSDIR)UpSentQCheck.o \ $(SRCSDIR)UpPutPack.o \ $(SRCSDIR)DnNodeInit.o \ $(SRCSDIR)DnListener.o \ $(SRCSDIR)DnNodeLogin.o \ $(SRCSDIR)DnReceiver.o \ $(SRCSDIR)DnSender.o \ $(SRCSDIR)DnMakeRspPack.o \ $(SRCSDIR)DnPoller.o \ $(SRCSDIR)DnSentQCheck.o \ $(SRCSDIR)DnPutPack.o \ $(SRCSDIR)UpPackDeal.o \ $(SRCSDIR)MoForward.o \ $(SRCSDIR)DnCMPPDeal.o \ $(SRCSDIR)MtForward.o \ $(SRCSDIR)RWLock.o \ $(SRCSDIR)FileOpr.o \ $(SRCSDIR)DB_MySQL.o \ $(SRCSDIR)md5.o#------------------------------- Targets --------------------------------------#.SUFFIXES: .exe .o .cpp .pc.cpp.o: $(CC) -c $(CFLAGS) $(INCS) $<TARGET = $(SRCSDIR)gateway #gateway: $(OBJS) # $(COMPILER) $(OBJS) $(COMMLIB) -o $(SRCSDIR)gateway; gateway: $(SRCS) $(OBJS) $(COMPILER) $(OBJS) $(LIBS) $(COMMLIB) -o $(SRCSDIR)gateway;all:gateway#$(TARGET): $(SRCS) $(OBJS)# $(COMPILER) $(OBJS) $(COMMLIB) -o $(TARGET);#------------------------------- Clean --------------------------------------#clean:; @$(RM) $(OBJS) *.pcc *.lis *.i *.cc @$(RM) $(TARGET)check: $(LINT) $(CFLAGS) $(SRCS) 1>check.rstdepend: makedepend $(CFLAGS) $(SRCS) # DO NOT DELETE THIS LINE -- make depend depends on it.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -