From e6e924374d49aa14e94a28d9b64a9f63bae2426d Mon Sep 17 00:00:00 2001 From: sin Date: Mon, 22 Sep 2014 11:27:30 +0100 Subject: Add support for encrypted save files --- Makefile | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 21a5e40..fc2bf5c 100644 --- a/Makefile +++ b/Makefile @@ -3,40 +3,43 @@ include config.mk .POSIX: .SUFFIXES: .c .o -SRC = ratox.c +HDR = arg.h readpassphrase.h +LIB = \ + readpassphrase.o +SRC = \ + ratox.c -OBJ = $(SRC:.c=.o) +OBJ = $(SRC:.c=.o) $(LIB) BIN = $(SRC:.c=) +MAN = $(SRC:.c=.1) -all: options bin +all: binlib -options: - @echo ratox build options: - @echo "CFLAGS = $(CFLAGS)" - @echo "LDFLAGS = $(LDFLAGS)" - @echo "CC = $(CC)" +binlib: util.a + $(MAKE) bin bin: $(BIN) -$(OBJ): config.h config.mk - -config.h: - @echo creating $@ from config.def.h - @cp config.def.h $@ +$(OBJ): readpassphrase.h config.mk .o: @echo LD $@ - @$(LD) -o $@ $< $(LDFLAGS) + @$(LD) -o $@ $< util.a $(LDFLAGS) .c.o: @echo CC $< @$(CC) -c -o $@ $< $(CFLAGS) +util.a: $(LIB) + @echo AR $@ + @$(AR) -r -c $@ $(LIB) + @ranlib $@ + install: all @echo installing executable to $(DESTDIR)$(PREFIX)/bin @mkdir -p $(DESTDIR)$(PREFIX)/bin @cp -f $(BIN) $(DESTDIR)$(PREFIX)/bin - @chmod 755 $(DESTDIR)$(PREFIX)/bin/$(BIN) + @cd $(DESTDIR)$(PREFIX)/bin && chmod 755 $(BIN) uninstall: @echo removing executable from $(DESTDIR)$(PREFIX)/bin @@ -44,4 +47,4 @@ uninstall: clean: @echo cleaning - @rm -f $(BIN) $(OBJ) + @rm -f $(BIN) $(OBJ) $(LIB) util.a -- cgit v1.2.3