diff options
author | Thomas Voss <mail@thomasvoss.com> | 2022-10-13 01:59:00 +0200 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2022-11-13 09:22:28 +0100 |
commit | fb614814a6218a7edefdb8b637a8c35aade092e1 (patch) | |
tree | 6af445b964e855611c7eb8f0d06ae52c2b7bad43 /Makefile | |
parent | 7f3c35a90e9bd7e0c8e34efc1d8ca992350919ce (diff) |
Respect DESTDIR
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -1,9 +1,11 @@ .POSIX: +CFLAGS = -std=c11 -O3 -pipe -Wall -Wextra -Werror -pedantic LDFLAGS = -llux -CFLAGS = -std=c11 -O3 -pipe -Wall -Wextra -Werror -pedantic -PREFIX = /usr -MANDIR = ${PREFIX}/share/man + +PREFIX = /usr +DPREFIX = ${DESTDIR}${PREFIX} +MANDIR = ${DPREFIX}/share/man target = lux @@ -12,8 +14,8 @@ ${target}: main.c ${CC} ${CFLAGS} ${LDFLAGS} -o $@ $< install: - mkdir -p ${PREFIX}/bin ${MANDIR}/man1 - cp ${target} ${PREFIX}/bin + mkdir -p ${DPREFIX}/bin ${MANDIR}/man1 + cp ${target} ${DPREFIX}/bin cp *.1 ${MANDIR}/man1 clean: |