HW12/Makefile
2020-12-04 08:33:41 +00:00

23 lines
602 B
Makefile

CC = gcc
CFLAGS = -lm -Wall -O2
Bin = server client p-server p-client
all:
make $(Bin)
socket_wrapper.o: socket_wrapper.c socket_wrapper.h
$(CC) -c socket_wrapper.c -o socket_wrapper.o $(CFLAGS)
client: socket_wrapper.o client.c
$(CC) -o client client.c socket_wrapper.o $(CFLAGS)
server: socket_wrapper.o server.c
$(CC) -o server server.c socket_wrapper.o $(CFLAGS)
p-server: socket_wrapper.o p-server.c
$(CC) -o p-server p-server.c socket_wrapper.o $(CFLAGS)
p-client: socket_wrapper.o p-client.c
$(CC) -o p-client p-client.c socket_wrapper.o $(CFLAGS)
.PHONY: clean
clean:
rm *.o $(Bin)