diff options
author | Tom Smeding <tom.smeding@gmail.com> | 2018-08-01 23:12:41 +0200 |
---|---|---|
committer | Tom Smeding <tom.smeding@gmail.com> | 2018-08-01 23:12:41 +0200 |
commit | a239f9feadd015fa91d391df01365dcade8ce503 (patch) | |
tree | 979554817c2069a525e94e2ad5f6346b53e19eb5 /Makefile | |
parent | 9f2fccfdc2eae83efbde1e3ae94a2cc220537983 (diff) |
Threaded communication (icmpd)
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 12 |
1 files changed, 5 insertions, 7 deletions
@@ -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 $@ $< |