aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 00e76ec291f4815db49c9462af961233ebd7b738 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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