From cd3674726fb823a8426bf07448b24d82509ec891 Mon Sep 17 00:00:00 2001 From: Huck Boles Date: Thu, 5 Jan 2023 17:59:03 -0600 Subject: [PATCH] version 0.2.2 --- Makefile | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 07cc474..6cefb03 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,7 @@ SHELL = /bin/bash -PREFIX = /usr -DESTDIR = $(PREFIX)/bin +DESTDIR = +PREFIX = $(DESTDIR)/usr +BINDIR = $(PREFIX)/bin MANDIR = $(PREFIX)/share/man/man1 PROG = odot @@ -11,7 +12,7 @@ HEADER = $(PROG).h sqlite3.h OBJECTS = $(PROG).o database.o actions.o function.o sqlite3.o LDFLAGS = -L . LDLIBS = -lpthread -CFLAGS = -O2 -v +CFLAGS = -O2 WARNINGS = -Werror -Wall -Wextra -Wpedantic -Wno-unused CPPFLAGS = -I . ALL_CFLAGS = $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(LDLIBS) $(WARNINGS) @@ -33,7 +34,8 @@ build: $(CFILE) $(HEADER) sqlite3.c install: $(CFILE) $(HEADER) sqlite3.c $(CC) $(CFILE) sqlite3.c $(ALL_CFLAGS) -o $(PROG) - install -CDTm 755 $(PROG) $(DESTDIR)/$(PROG) + install -CDTm 755 $(PROG) $(BINDIR)/$(PROG) + gzip -cf $(PROG).1 > $(PROG).1.gz install -CDTm 644 $(PROG).1.gz $(MANDIR)/$(PROG).1 debug: $(CFILE) @@ -41,7 +43,7 @@ debug: $(CFILE) clean: [[ -f $(PROG) ]] && rm $(PROG) - [[ -f $(DESTDIR)/$(PROG) ]] && sudo rm $(DESTDIR)/$(PROG) + [[ -f $(DESTDIR)/$(PROG) ]] && sudo rm $(BINDIR)/$(PROG) dbclean: rm *.db -- 2.45.2