~arivigo/schain

ref: a3954f572fb9a2c23081e9874d54b380ba4615ba schain/Makefile -rw-r--r-- 1.2 KiB
a3954f57Ariadna Vigo LICENSE: updated my email address 4 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
47
48
49
50
51
52
53
54
# See LICENSE file for copyright and license details.

.POSIX:

include config.mk

SRC = date.c schain.c strlcpy.c
OBJ = ${SRC:%.c=%.o}

all: options schain

options:
	@echo Build options:
	@echo "CPPFLAGS = ${CPPFLAGS}"
	@echo "CFLAGS   = ${CFLAGS}"
	@echo "LDFLAGS  = ${LDFLAGS}"
	@echo "CC       = ${CC}"
	@echo

config.h:
	cp config.def.h $@

schain.o: config.h date.h strlcpy.h

${OBJ}: config.mk

schain: ${OBJ}
	${CC} -o $@ ${OBJ} ${LDFLAGS}

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

dist: clean
	mkdir -p schain-${VERSION}
	cp -R LICENSE Makefile README.md config.def.h config.mk date.h \
	   schain.1 strlcpy.h ${SRC} schain-${VERSION}
	tar -cf schain-${VERSION}.tar schain-${VERSION}
	gzip schain-${VERSION}.tar
	rm -rf schain-${VERSION}

install: all
	mkdir -p ${DESTDIR}${PREFIX}/bin
	cp -f schain ${DESTDIR}${PREFIX}/bin
	chmod 755 ${DESTDIR}${PREFIX}/bin/schain
	mkdir -p ${DESTDIR}${MANPREFIX}/man1
	sed "s/VERSION/${VERSION}/g" schain.1 \
	    > ${DESTDIR}${MANPREFIX}/man1/schain.1
	chmod 644 ${DESTDIR}${MANPREFIX}/man1/schain.1

uninstall:
	rm -f ${DESTDIR}${PREFIX}/bin/schain \
	   ${DESTDIR}${MANPREFIX}/man1/schain.1

.PHONY: all options clean dist install uninstall