dedup

deduplicating backup program
git clone git://git.2f30.org/dedup
Log | Files | Refs | README | LICENSE

commit 4347f0a624b172f81e0922f068ba9e86a0ada3a6
parent ca8e253fb3c94ddb242e280266d13a0d7fd79e76
Author: sin <sin@2f30.org>
Date:   Wed, 17 Apr 2019 15:29:33 +0100

Don't use $(BIN) in Makefile, soon we will be generating multiple binaries

Diffstat:
MMakefile | 32++++++++++++++++----------------
1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/Makefile b/Makefile @@ -3,7 +3,7 @@ include config.mk VERSION = 1.0 PREFIX = /usr/local MANPREFIX = $(PREFIX)/man -BIN = dedup +TARGET = dedup HDR = \ arg.h \ blake2-impl.h \ @@ -13,7 +13,6 @@ HDR = \ tree.h \ SRC = \ - $(BIN).c \ $(HDR) \ blake2b-ref.c \ blake2bp-ref.c \ @@ -24,6 +23,7 @@ SRC = \ compress-none.c \ compress-snappy.c \ compress.c \ + dedup.c \ hash-blake2b.c \ hash-blake2bp.c \ hash-blake2s.c \ @@ -36,7 +36,6 @@ SRC = \ utils.c \ OBJ = \ - $(BIN).o \ blake2b-ref.o \ blake2bp-ref.o \ blake2s-ref.o \ @@ -46,6 +45,7 @@ OBJ = \ compress-none.o \ compress-snappy.o \ compress.o \ + dedup.o \ hash-blake2b.o \ hash-blake2bp.o \ hash-blake2s.o \ @@ -59,41 +59,41 @@ OBJ = \ DISTFILES = \ $(SRC) \ - $(BIN).1 \ CHANGELOG \ LICENSE \ Makefile \ README \ config.mk \ + dedup.1 \ CFLAGS = -g -O2 -Wall $(OPENMPCFLAGS) CPPFLAGS = -I/usr/local/include -D_FILE_OFFSET_BITS=64 LDFLAGS = -L/usr/local/lib LDLIBS = -llz4 -lsnappy $(OPENMPLDLIBS) -all: $(BIN) +all: $(TARGET) $(OBJ): $(HDR) clean: - rm -f $(OBJ) $(BIN) $(BIN)-$(VERSION).tar.gz + rm -f $(OBJ) dedup dedup-$(VERSION).tar.gz install: all mkdir -p $(DESTDIR)$(PREFIX)/bin - cp -f $(BIN) $(DESTDIR)$(PREFIX)/bin + cp -f dedup $(DESTDIR)$(PREFIX)/bin mkdir -p $(DESTDIR)$(MANPREFIX)/man1 - cp -f $(BIN).1 $(DESTDIR)$(MANPREFIX)/man1 + cp -f dedup.1 $(DESTDIR)$(MANPREFIX)/man1 uninstall: - rm -f $(DESTDIR)$(PREFIX)/bin/$(BIN) - rm -f $(DESTDIR)$(MANPREFIX)/man1/$(BIN).1 + rm -f $(DESTDIR)$(PREFIX)/bin/dedup + rm -f $(DESTDIR)$(MANPREFIX)/man1/dedup.1 dist: - mkdir -p $(BIN)-$(VERSION) - cp $(DISTFILES) $(BIN)-$(VERSION) - tar -cf $(BIN)-$(VERSION).tar $(BIN)-$(VERSION) - gzip $(BIN)-$(VERSION).tar - rm -rf $(BIN)-$(VERSION) + mkdir -p dedup-$(VERSION) + cp $(DISTFILES) dedup-$(VERSION) + tar -cf dedup-$(VERSION).tar dedup-$(VERSION) + gzip dedup-$(VERSION).tar + rm -rf dedup-$(VERSION) .PHONY: all clean install uninstall dist @@ -102,5 +102,5 @@ dist: .c.o: $(CC) $(CPPFLAGS) $(CFLAGS) -c $< -$(BIN): $(OBJ) +dedup: $(OBJ) $(CC) -o $@ $(OBJ) $(LDFLAGS) $(LDLIBS)