📄 makefile
字号:
#--------------------------------------------------------------------CC = gccAR = ar cruCFLAGS = -Wall -D_REENTRANT -D_GNU_SOURCE -g -fPICSOFLAGS = -sharedLDFLAGS = -lstdc++ -lpthread -lresolvLINKER = $(CC)LINT = lint -cRM = /bin/rm -fLIBEVENT_INCL = -I$(HOME)/libevent/LIBEVENT_LIB = -L$(HOME)/libevent -leventCFLAGS += $(LIBEVENT_INCL)LDFLAGS += $(LIBEVENT_LIB)#--------------------------------------------------------------------LIBOBJS = sputils.o spioutils.o spiochannel.o \ spthreadpool.o event_msgqueue.o spbuffer.o sphandler.o \ spmsgblock.o spmsgdecoder.o spresponse.o sprequest.o \ spexecutor.o spsession.o speventcb.o spserver.o \ spdispatcher.o splfserver.o \ sphttpmsg.o sphttp.oTARGET = libspserver.so \ testecho testthreadpool testsmtp testchat teststress testhttp \ testhttpmsg testdispatcher#--------------------------------------------------------------------all: $(TARGET)libspserver.so: $(LIBOBJS) $(LINKER) $(SOFLAGS) $^ -o $@testthreadpool: testthreadpool.o $(LINKER) $(LDFLAGS) $^ -L. -lspserver -o $@testsmtp: testsmtp.o $(LINKER) $(LDFLAGS) $^ -L. -lspserver -o $@testchat: testchat.o $(LINKER) $(LDFLAGS) $^ -L. -lspserver -o $@teststress: teststress.o $(LINKER) $(LDFLAGS) $^ -L. -levent -o $@testecho: testecho.o $(LINKER) $(LDFLAGS) $^ -L. -lspserver -o $@testhttp: testhttp.o $(LINKER) $(LDFLAGS) $^ -L. -lspserver -o $@testhttpmsg: sputils.o sphttpmsg.o testhttpmsg.o $(LINKER) $(LDFLAGS) $^ -o $@testdispatcher: testdispatcher.o $(LINKER) $(LDFLAGS) $^ -L. -lspserver -o $@clean: @( $(RM) *.o vgcore.* core core.* $(TARGET) )#--------------------------------------------------------------------# make rule%.o : %.c $(CC) $(CFLAGS) -c $^ -o $@ %.o : %.cpp $(CC) $(CFLAGS) -c $^ -o $@
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -