commit 53e9db19eac9711cda7a658131d9cb1b42892113 parent 72a5c2c2269c959061bfb34a05f29875653f3e92 Author: sin <sin@2f30.org> Date: Tue, 20 Mar 2018 16:40:33 +0000 Add Makefile Diffstat:
A | Makefile | | | 40 | ++++++++++++++++++++++++++++++++++++++++ |
1 file changed, 40 insertions(+), 0 deletions(-)
diff --git a/Makefile b/Makefile @@ -0,0 +1,40 @@ +VERSION = 0.0 +PREFIX = /usr/local +SRC = dedup.c +OBJ = dedup.o +BIN = dedup +DISTFILES = $(SRC) LICENSE Makefile arg.h + +CPPFLAGS = -I/usr/local/include +LDLIBS = -lcrypto + +all: $(BIN) + +dedup.o: arg.h + +clean: + rm -f $(OBJ) $(BIN) $(BIN)-$(VERSION).tar.gz + +install: all + mkdir -p $(DESTDIR)$(PREFIX)/bin + cp -f $(BIN) $(DESTDIR)$(PREFIX)/bin + +uninstall: + rm -f $(DESTDIR)$(PREFIX)/bin/$(BIN) + +dist: + mkdir -p $(BIN)-$(VERSION) + cp $(DISTFILES) $(BIN)-$(VERSION) + tar -cf $(BIN)-$(VERSION).tar $(BIN)-$(VERSION) + gzip $(BIN)-$(VERSION).tar + rm -rf $(BIN)-$(VERSION) + +.PHONY: all clean install uninstall dist + +.SUFFIXES: .c .o + +.c.o: + $(CC) $(CPPFLAGS) $(CFLAGS) -c $< + +$(BIN): $(OBJ) + $(CC) -o $@ $(OBJ) $(LDFLAGS) $(LDLIBS)