aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
blob: f5ec1761c5d81f88716580f10254c640fe88efa9 (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
.POSIX:

CONFIGFILE = config.mk
include $(CONFIGFILE)


all: file2key

file2key: file2key.o
	$(CC) -o $@ file2key.o $(LDFLAGS)

file2key.o: file2key.c settings.h config.h
	$(CC) -c -o $@ file2key.c $(CFLAGS) $(CPPFLAGS)

install: file2key
	mkdir -p -- "$(DESTDIR)$(PREFIX)/bin"
	mkdir -p -- "$(DESTDIR)$(MANPREFIX)/man1"
	cp -- file2key "$(DESTDIR)$(PREFIX)/bin/"
	cp -- file2key.1 "$(DESTDIR)$(MANPREFIX)/man1/"

uninstall:
	-rm -f -- "$(DESTDIR)$(PREFIX)/bin/file2key"
	-rm -f -- "$(DESTDIR)$(MANPREFIX)/man1/file2key.1"

clean:
	-rm -f -- file2key *.o *.su

.PHONY: all install uninstall clean