From bb943d51226b1b40a8c669a5ce0ec0146ca3234d Mon Sep 17 00:00:00 2001 From: Christopher Meng Date: Tue, 26 Nov 2013 17:30:59 +0800 Subject: Update Makefile 1. Add -p option to preserve timestamp. 2. Add ldflags place. 3. Add prefix for different distros. --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 3aeb668..0160bed 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ # nthash - Generate NT Hash - +PREFIX := /usr CC := gcc ECHO := echo GREP := grep @@ -13,7 +13,7 @@ CFLAGS += $(shell pkg-config --cflags --libs nettle 2>/dev/null || echo "-lnettl all: nthash nthash: - $(CC) $(CFLAGS) -o nthash nthash.c + $(CC) $(CFLAGS) -o nthash $(LDFLAGS) nthash.c check: $(ECHO) -n "testing123" | ./nthash | \ @@ -22,7 +22,7 @@ check: $(GREP) -q '^Warning: Input contains line break!$$' install: nthash - $(INSTALL) -D -m0755 nthash $(DESTDIR)/usr/bin/nthash + $(INSTALL) -pDm0755 nthash $(DESTDIR)$(PREFIX)/bin/nthash clean: $(RM) -f *.o *~ nthash -- cgit v1.2.3-54-g00ecf