From a52c0f793c47a1919236a35604209a76be27fb82 Mon Sep 17 00:00:00 2001 From: Ivy Foster Date: Tue, 7 Apr 2020 13:21:11 -0500 Subject: [PATCH] tweak Makefile --- Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 0fa337a..786f572 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,6 @@ CC ?= cc PREFIX ?= /usr/local +BINDIR ?= $(PREFIX)/bin DATADIR ?= $(PREFIX)/share DOCDIR ?= $(DATADIR)/doc MANDIR ?= $(DATADIR)/man @@ -57,9 +58,9 @@ CFLAGS += \ LDFLAGS += -Wl,-z,relro,-z,now,--build-id -pie -all: $(TARGS) +all: flags $(TARGS) -ddate: flags $(OBJS) +ddate: $(OBJS) @echo $(CC) -o $@ $^ @$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ @@ -76,7 +77,7 @@ flags: -include $(DEPS) -install: all +install: $(TARGS) install -D ddate $(DESTDIR)$(BINDIR)/ddate install -D -m 644 slogans $(DESTDIR)$(DATADIR)/ddate/slogans install -D -m 644 doc/ddate.1 $(DESTDIR)$(MANDIR)/man1/ddate.1