Permalink
Browse files

native: Refactor Makefile

  • Loading branch information...
1 parent 2589078 commit cc58489e76afad252f0a62b252073ba4e2cef5ac @illdefined committed Feb 12, 2012
Showing with 12 additions and 3 deletions.
  1. +12 −3 src/Makefile
View
@@ -1,4 +1,13 @@
-recommendify = recommendify.c cosine.c jaccard.c output.c
+CPPFLAGS ?= -pedantic-errors -Wall
+CFLAGS ?= -pipe
-recommendify: $(recommendify)
- $(CC) -std=c99 $(CPPFLAGS) $(CFLAGS) -o $@ $(recommendify) $(LDFLAGS) -lhiredis
+CPPFLAGS += -std=c99
+LDFLAGS += -lhiredis
+
+recommendify: recommendify.c cosine.c jaccard.c output.c
+
+%: %.c
+ $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $^
+
+.c:
+ $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $>

0 comments on commit cc58489

Please sign in to comment.