]> git.mdlowis.com Git - projs/alib.git/commitdiff
Simplified makefile
authorMichael D. Lowis <mike@mdlowis.com>
Thu, 23 Feb 2017 20:44:40 +0000 (15:44 -0500)
committerMichael D. Lowis <mike@mdlowis.com>
Thu, 23 Feb 2017 20:44:40 +0000 (15:44 -0500)
Makefile

index 4f37af656e9657a850b929751b2feb1bc3e65f0e..ba5118fa3b27b911a8cd1fcd50a25243feb14dc7 100644 (file)
--- 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)