aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2018-02-19 19:03:59 +0100
committerMattias Andrée <maandree@kth.se>2018-02-19 19:03:59 +0100
commitaa1526183b2479c1bf3d29ddbd5bafcd13443254 (patch)
treebeced5f56678e628b74b7ca727b45e5692b26f26 /Makefile
parentFirst commit (diff)
downloadloc-aa1526183b2479c1bf3d29ddbd5bafcd13443254.tar.gz
loc-aa1526183b2479c1bf3d29ddbd5bafcd13443254.tar.bz2
loc-aa1526183b2479c1bf3d29ddbd5bafcd13443254.tar.xz
Add readme and loc.1
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-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