-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
30 lines (22 loc) · 877 Bytes
/
Makefile
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
PWD := $(dir $(realpath $(firstword $(MAKEFILE_LIST))))
DESTDIR := /usr/
LIBDIR := ${DESTDIR}/lib/
BINDIR := ${DESTDIR}/bin/
install:
@make PWD=${PWD} DESTDIR=${DESTDIR} LIBDIR=${LIBDIR} BINDIR=${BINDIR} install-libcrshini
@make PWD=${PWD} DESTDIR=${DESTDIR} LIBDIR=${LIBDIR} BINDIR=${BINDIR} install-crshini
install-libcrshini: creatdir
install -D -m 755 "${PWD}/src/libcrshini" "${LIBDIR}"
install-crshini: creatdir
install -D -m 755 "${PWD}/src/crshini" "${BINDIR}"
creatdir:
@mkdir -p "${LIBDIR}" "${BINDIR}"
uninstall:
@make PWD=${PWD} DESTDIR=${DESTDIR} LIBDIR=${LIBDIR} BINDIR=${BINDIR} uninstall-libcrshini
@make PWD=${PWD} DESTDIR=${DESTDIR} LIBDIR=${LIBDIR} BINDIR=${BINDIR} uninstall-crshini
uninstall-libcrshini:
rm -rf "${LIBDIR}/libcrshini"
uninstall-crshini:
rm -rf "${BINDIR}/crshini"
check:
@shellcheck --shell=bash "${PWD}/src/"*