From: Michael D. Lowis Date: Thu, 23 Feb 2017 20:44:40 +0000 (-0500) Subject: Simplified makefile X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=da1d812aad22fc3b549517b1ae899dfe983419cf;p=projs%2Falib.git Simplified makefile --- 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)