~dax/dw

dw/Makefile -rw-r--r-- 1018 bytes
f7ba3c90dax bump 1.1.0 1 year, 6 months ago
                                                                                
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# dw - diceware passphrase generator

include config.mk

NAME = dw
SRC = dw.c 
OBJ = ${SRC:.c=.o}

all: options dw

options:
	@echo ${NAME} build options:
	@echo "CFLAGS   = ${CFLAGS}"
	@echo "CC       = ${CC}"

.c.o:
	${CC} -c ${CFLAGS} $<

${OBJ}: config.mk

dw: ${OBJ}
	${CC} -o $@ ${OBJ}

clean:
	rm -f dw ${OBJ} ${NAME}-${VERSION}.tar.gz

install: all
	mkdir -p ${DESTDIR}${BINDIR}
	cp -f dw ${DESTDIR}${BINDIR}
	chmod 755 ${DESTDIR}${BINDIR}/dw
	sed "s|DICTDIR|${DESTDIR}${DICTDIR}|g" < dwgen > ${DESTDIR}${BINDIR}/dwgen
	chmod 755 ${DESTDIR}${BINDIR}/dwgen
	mkdir -p  ${DESTDIR}${DATAROOTDIR}/dict/
	cp -f eff_wordlist_long ${DESTDIR}${DICTDIR}
	chmod 664 ${DESTDIR}${DICTDIR}/eff_wordlist_long
	mkdir -p ${DESTDIR}${MANDIR}/man1
	cp -f dw.1 ${DESTDIR}${MANDIR}/man1
	chmod 644 ${DESTDIR}${MANDIR}/man1/dw.1

uninstall:
	rm -f ${DESTDIR}${BINDIR}/dw
	rm -f ${DESTDIR}${BINDIR}/dwgen
	rm -f ${DESTDIR}${DICTDIR}/eff_wordlist_long
	rm -f ${DESTDIR}${MANDIR}/man1/dw.1

.PHONY: all options clean install uninstall