mirror of https://github.com/arp242/find-cursor
Makefile: Fix installation and stripping
- Separate stripping into another step of the package - Conditionalize stripping the binary, distros don't like when packages do it because they want the debug symbols included and do their own stripping after extracting them - use -Dm755 to create the directory (-D) and set the correct executable mode - respect PREFIX which can be set to /usr /usr/local and even / - respect DESTDIR which is set by distros when they are packagingpull/8/head
parent
aaefd2efe7
commit
3d5735acee
@ -1,8 +1,11 @@
|
|||||||
CC?=cc
|
CC?=cc
|
||||||
CFLAGS?=-std=c99 -pedantic -Wall -Os
|
CFLAGS?=-std=c99 -pedantic -Wall -Os
|
||||||
|
STRIP?=strip
|
||||||
|
PREFIX?=/usr
|
||||||
|
|
||||||
all:
|
all:
|
||||||
${CC} ${CFLAGS} -o find-cursor find-cursor.c -lX11 -lXext -lXfixes
|
${CC} ${CFLAGS} -o find-cursor find-cursor.c -lX11 -lXext -lXfixes
|
||||||
|
|
||||||
install:
|
install:
|
||||||
install --strip -o root -g root find-cursor /bin/
|
$(STRIP) find-cursor
|
||||||
|
install -Dm755 find-cursor $(DESTDIR)$(PREFIX)/bin/find-cursor
|
||||||
|
Loading…
Reference in New Issue