aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile31
1 files changed, 31 insertions, 0 deletions
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