drpc/Makefile -rw-r--r-- 713 bytes View raw
                                                                                
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
# drpc - doman reconstruction project calculator

include config.mk

NAME = drpc
DOCS = README.md
SRC = drpc.c 
OBJ = ${SRC:.c=.o}

all: options drpc

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

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

${OBJ}: config.mk

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

clean:
	rm -f drpc ${OBJ}

install: all
	mkdir -p ${DESTDIR}${BINDIR}
	cp -f drpc ${DESTDIR}${BINDIR}
	chmod 755 ${DESTDIR}${BINDIR}/drpc
	mkdir -p ${DESTDIR}${MANDIR}/man1
	cp -f drpc.1 ${DESTDIR}${MANDIR}/man1
	chmod 644 ${DESTDIR}${MANDIR}/man1/drpc.1

uninstall:
	rm -f ${DESTDIR}${BINDIR}/drpc
	rm -f ${DESTDIR}${MANDIR}/man1/drpc.1

.PHONY: all options clean install uninstall