求教一个makefile
CFLAGS := -Wall -O2
PROGS =\
mutilprocessserver \
client \
all: $(PROGS)
mutilprocessserver: mutilprocessserver.c sendReceive.o
client: client.c sendReceive.o
sendReceive.o: sendReceive.c
.PHONY : clean dist
dist : clean
tar czf 02152c.tar.gz *.
这是我原本的makefile 现在要链接一个静态库,也就是lpthread.a 怎样在这基础上修改啊 makefile LINUX
[解决办法]
CFLAGS := -Wall -O2
LDFLAGS = -lptrhead.a
...
[解决办法]
//如果是线程库的话
mutilprocessserver: mutilprocessserver.c sendReceive.o -lpthread
//如果是自己生成的话
mutilprocessserver: mutilprocessserver.c sendReceive.o -L ./xx/xx libpthread.a