~arivigo/cras

ref: df161ce680eb08d9f6d6df9258410d1d06ac3e17 cras/Makefile -rw-r--r-- 952 bytes
df161ce6Ariadna Vigo cras.c: Feedback to user when editing entries. 3 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
# See LICENSE file for copyright and license details.

.POSIX:

include config.mk

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

all: options cras

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

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

cras.o: config.h date.h strlcpy.h tasklst.h

tasklst.o: date.h strlcpy.h tasklst.h

${OBJ}: config.mk

cras: ${OBJ}
	${CC} -o $@ ${OBJ} ${LDFLAGS} ${LIBS}

clean:
	rm -f cras ${OBJ}

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

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

.PHONY: all options clean install uninstall