2020-12-04 08:06:26 +09:00
|
|
|
CC = gcc
|
|
|
|
CFLAGS = -lm -Wall -O2
|
|
|
|
|
2020-12-04 13:39:58 +09:00
|
|
|
Bin = server client
|
|
|
|
|
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)
|
|
|
|
server:
|
|
|
|
$(CC) -o server server.c socket_wrapper.o $(CFLAGS)
|
|
|
|
|
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)
|