makefile

来自「spserver 是一个实现了半同步/半异步(Half-Sync/Half-As」· 代码 · 共 76 行

TXT
76
字号
#--------------------------------------------------------------------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 + =
减小字号Ctrl + -
显示快捷键?