HW12/Makefile

23 lines
602 B
Makefile
Raw Normal View History

2020-12-04 08:06:26 +09:00
CC = gcc
CFLAGS = -lm -Wall -O2
2020-12-04 16:48:03 +09:00
Bin = server client p-server p-client
2020-12-04 13:39:58 +09:00
2020-12-04 08:06:26 +09:00
all:
2020-12-04 13:39:58 +09:00
make $(Bin)
2020-12-04 08:06:26 +09:00
socket_wrapper.o: socket_wrapper.c socket_wrapper.h
2020-12-04 13:39:58 +09:00
$(CC) -c socket_wrapper.c -o socket_wrapper.o $(CFLAGS)
2020-12-04 08:06:26 +09:00
client: socket_wrapper.o client.c
$(CC) -o client client.c socket_wrapper.o $(CFLAGS)
2020-12-04 16:48:03 +09:00
server: socket_wrapper.o server.c
2020-12-04 08:06:26 +09:00
$(CC) -o server server.c socket_wrapper.o $(CFLAGS)
2020-12-04 16:48:03 +09:00
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)
2020-12-04 08:06:26 +09:00
2020-12-04 13:39:58 +09:00
.PHONY: clean
2020-12-04 08:06:26 +09:00
clean:
2020-12-04 13:39:58 +09:00
rm *.o $(Bin)