From aa1526183b2479c1bf3d29ddbd5bafcd13443254 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Mon, 19 Feb 2018 19:03:59 +0100 Subject: Add readme and loc.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- Makefile | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..00e76ec --- /dev/null +++ b/Makefile @@ -0,0 +1,31 @@ +.POSIX: + +CONFIGFILE = config.mk +include $(CONFIGFILE) + +all: loc +loc.o: loc.c arg.h + +loc: loc.o + $(CC) -o $@ loc.o $(LDFLAGS) + +check: + true + +install: loc + mkdir -p -- "$(DESTDIR)$(PREFIX)/bin/" + mkdir -p -- "$(DESTDIR)$(MANPREFIX)/man1/" + cp -- loc "$(DESTDIR)$(PREFIX)/bin/loc" + cp -- loc.1 "$(DESTDIR)$(MANPREFIX)/man1/loc.1" + +uninstall: + -rm -f -- "$(DESTDIR)$(PREFIX)/bin/loc" + -rm -f -- "$(DESTDIR)$(MANPREFIX)/man1/loc.1" + +clean: + -rm -f -- loc.o loc + +.SUFFIXES: +.SUFFIXES: .o .c + +.PHONY: all check install uninstall clean -- cgit v1.2.3-70-g09d2