]> git.saurik.com Git - redis.git/blobdiff - deps/linenoise/Makefile
Merge pull request #449 from ErikDubbelboer/unstable
[redis.git] / deps / linenoise / Makefile
index e4a5476d679370bdada0034f0693c19f4b54c4b6..1dd894b49e9b992c8d9b22de75b30d21fcb63e81 100644 (file)
@@ -1,10 +1,21 @@
-linenoise_example: linenoise.h linenoise.c
+STD=
+WARN= -Wall
+OPT= -Os
+
+R_CFLAGS= $(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS)
+R_LDFLAGS= $(LDFLAGS)
+DEBUG= -g
+
+R_CC=$(CC) $(R_CFLAGS)
+R_LD=$(CC) $(R_LDFLAGS)
+
+linenoise.o: linenoise.h linenoise.c
 
 linenoise_example: linenoise.o example.o
-       $(CC) -Wall -W -Os -g -o linenoise_example linenoise.o example.o
+       $(R_LD) -o $@ $^
 
 .c.o:
-       $(CC) -c -Wall -W -Os -g $<
+       $(R_CC) -c $<
 
 clean:
-       rm -f linenoise_example
+       rm -f linenoise_example *.o