From a239f9feadd015fa91d391df01365dcade8ce503 Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Wed, 1 Aug 2018 23:12:41 +0200 Subject: Threaded communication (icmpd) --- Makefile | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index b1de31f..eadce97 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,8 @@ CC = gcc -CFLAGS = -Wall -Wextra -O2 -g -std=c11 -fwrapv +CFLAGS = -Wall -Wextra -O2 -g -std=c11 -fwrapv -pthread +LDFLAGS = -pthread -TARGETS = server client +TARGETS = server client serverd clientd SOURCES = $(filter-out $(patsubst %,%.c,$(TARGETS)),$(wildcard *.c)) OBJECTS = $(patsubst %.c,%.o,$(SOURCES)) @@ -14,11 +15,8 @@ clean: rm -f $(TARGETS) *.o -server: server.o $(OBJECTS) - $(CC) $(CFLAGS) $^ -o $@ - -client: client.o $(OBJECTS) - $(CC) $(CFLAGS) $^ -o $@ +$(TARGETS): %: %.o $(OBJECTS) + $(CC) $^ -o $@ $(LDFLAGS) %.o: %.c $(wildcard *.h) $(CC) $(CFLAGS) -c -o $@ $< -- cgit v1.2.3-70-g09d2