summaryrefslogtreecommitdiff
path: root/Makefile
blob: 051bd744a0da40d0fc075f0b2da79a6e7caf5900 (plain)
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
.POSIX:

include config.mk

SRC = 2ls10.c
OBJ = ${SRC:.c=.o}

all: options 2ls10

options:
	@echo "-+- build options -+-"
	@echo "PREFIX  = ${PREFIX}" 
	@echo "CFLAGS  = ${CFLAGS}"
	@echo "LDFLAGS = ${LDFLAGS}"
	@echo "CC      = ${CC}"
	@echo "-+-+-+-+-+-+-+-+-+-+-" 

2ls10: ${OBJ}

clean:
	@echo cleaning
	@rm -f 2ls10 ${OBJ}

install: all
	@echo installing executable to "${DESTDIR}${BINDIR}"
	@mkdir -p "${DESTDIR}${BINDIR}"
	@cp -f 2ls10 "${DESTDIR}${BINDIR}"
	@chmod 755 "${DESTDIR}${BINDIR}/2ls10"
	@echo installing manpage to "${DESTDIR}${MANDIR}/man6"
	@mkdir -p "${DESTDIR}${MANDIR}/man6"
	@cp -f 2ls10.6 "${DESTDIR}${MANDIR}/man6"
	@chmod 644 "${DESTDIR}${MANDIR}/man6/2ls10.6"

uninstall: 
	@echo removing executable from "${DESTDIR}${BINDIR}"
	@rm -f "${DESTDIR}${BINDIR}/2ls10"
	@echo removing manpage from "${DESTDIR}${MANDIR}/man6"
	@rm -f "${DESTDIR}${MANDIR}/man6/2ls10.6"