changeset: 35:e7fba04570c6
tag: tip
parent: 34:b2c551f8e4da
parent: 33:213e4888f56f
user: Dimitrios Papastamos <stateless [at] archlinux.us>
date: Fri Aug 13 18:06:27 2010 +0100
description:
update.
diff -r b2c551f8e4da -r e7fba04570c6 Makefile
--- a/Makefile Fri Aug 13 18:05:18 2010 +0100
+++ b/Makefile Fri Aug 13 18:06:27 2010 +0100
@@ -3,6 +3,12 @@
src = skvm.c
inc = -I/usr/include -I/usr/include/hal
+DESTDIR?=
+ETCDIR?=/etc
+PREFIX?=/usr
+dst = ${DESTDIR}${PREFIX}
+etc = ${DESTDIR}${ETCDIR}
+
CC = gcc
CFLAGS += -Wall -Wextra -std=gnu99 -Wformat-security -Wshadow \
-Wpointer-arith -ggdb \
@@ -26,23 +32,24 @@
@rm -rf skvm-$(ver)
install: all
- @echo installing executable file to /usr/bin
- @cp -f $(bin) /usr/bin
- @chmod 755 /usr/bin/$(bin)
- @echo installing init script to /etc/rc.d
- @cp -f init/$(bin) /etc/rc.d
- @chmod 755 /etc/rc.d/$(bin)
- @echo installing manpage at /usr/local/share/man/man1
- @mkdir -p /usr/local/share/man/man1
- @sed "s/VERSION/$(ver)/g" < skvm.1 > /usr/local/share/man/man1/skvm.1
- @chmod 644 /usr/local/share/man/man1/skvm.1
+ @echo installing executable file to $(dst)/bin
+ @cp -f $(bin) $(dst)/bin
+ @chmod 755 $(dst)/bin/$(bin)
+ @echo installing init script to $(etc)/rc.d
+ @mkdir -p $(etc)/rc.d
+ @cp -f init/$(bin) $(etc)/rc.d
+ @chmod 755 $(etc)/rc.d/$(bin)
+ @echo installing manpage at $(dst)/share/man/man1
+ @mkdir -p $(dst)/share/man/man1
+ @sed "s/VERSION/$(ver)/g" < skvm.1 > $(dst)/share/man/man1/skvm.1
+ @chmod 644 $(dst)/share/man/man1/skvm.1
uninstall:
@echo removing /usr/bin/$(bin)
- @rm -f /usr/bin/$(bin)
- @echo removing /etc/rc.d/$(bin)
- @rm -f /etc/rc.d/$(bin)
- @echo removing /usr/local/share/man/man1/skvm.1
- @rm -f /usr/local/share/man/man1/skvm.1
+ @rm -f $(dst)/bin/$(bin)
+ @echo removing $(etc)/rc.d/$(bin)
+ @rm -f $(etc)/rc.d/$(bin)
+ @echo removing $(dst)/share/man/man1/skvm.1
+ @rm -f $(dst)/share/man/man1/skvm.1
.PHONY: all clean dist install uninstall
Received on Fri Aug 13 2010 - 19:06:30 CEST
This archive was generated by hypermail 2.2.0 : Fri Aug 13 2010 - 19:12:04 CEST