From da1d812aad22fc3b549517b1ae899dfe983419cf Mon Sep 17 00:00:00 2001 From: "Michael D. Lowis" Date: Thu, 23 Feb 2017 15:44:40 -0500 Subject: [PATCH] Simplified makefile --- Makefile | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index 4f37af6..ba5118f 100644 --- a/Makefile +++ b/Makefile @@ -1,18 +1,15 @@ -CC = c99 -INCS = -Isource/ -DEFS = -SRCS = $(wildcard tests/*.c) -OBJS = $(SRCS:.c=.o) +CC = c99 +CFLAGS = +INCS = -Isource/ +SRCS = $(wildcard tests/*.c) +OBJS = $(SRCS:.c=.o) runtests: $(OBJS) - $(CC) -o $@ $^ + $(CC) $(CFLAGS) -o $@ $^ ./$@ -tests/%.o: tests/%.c source/%.h - $(CC) $(INCS) $(DEFS) -c -o $@ $< - tests/%.o: tests/%.c - $(CC) $(INCS) $(DEFS) -c -o $@ $< + $(CC) $(CFLAGS) $(INCS) -c -o $@ $^ clean: $(RM) runtests $(OBJS) -- 2.52.0