我正在为大学做一个关于UDP通信的项目;我需要使用-pthread进行编译,因为我需要一个信号量;我试着复制我在这个论坛上找到的东西,但它没有运行..这是我的makefile:
CC=gcc
CFLAGS=-Wall -Wextra -O2
SRC = create_children4.o clientUDP3.o socket_operation.o
OBJ = $(SRC:.c=.o)
all: $(OBJ)
${CC} create_children4.o socket_operation.o -o create_children4
${CC} clientUDP3.o socket_operation.o -o clientUDP3
create_children4.o: socket_operation.h
clientUDP3.o: socket_operation.h
socket_operation.o:
clean:
rm -f *.o core
cleanall:
rm -f *.o core create_children4 clientUDP3