~arivigo/schain

ref: 352f80c373774f5028b6ab09f79f58705dc11f48 schain/Makefile -rw-r--r-- 915 bytes
352f80c3Ariadna Vigo Makefile: removing make dist 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
# 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}

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 install uninstall