FLAGS = -std=c11 -Wall SERVER_LINKER = -lpthread CLIENT_LINKER = -lpthread all: server client run_all: all ./server ./client 127.0.0.1 server: ServerMain.c Server.c Server.h Stream.c Stream.h SocketUtils.c SocketUtils.h gcc $(FLAGS) -o $@ ServerMain.c Server.c Stream.c SocketUtils.c $(SERVER_LINKER) run_server: server ./server client: ClientMain.c Client.c Client.h Stream.c Stream.h SocketUtils.c SocketUtils.h String.c String.h gcc $(FLAGS) -o $@ ClientMain.c Client.c Stream.c SocketUtils.c String.c $(CLIENT_LINKER) run_client: client ./client 127.0.0.1 clean: rm -f client server