blob: 3c73ff51c7e2a990f8b3e97f63aa13486d2ac741 (
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
|
--- Makefile 2013-01-12 09:35:12.000000000 -0600
+++ Makefile.fixed 2014-07-12 22:27:44.617601703 -0500
@@ -1,9 +1,10 @@
#Makefile for gridloc
+DESTDIR ?= /usr
SHELL = /bin/sh
PROJECT = gridloc
-BINDIR = /usr/local/bin
-DOCDIR = /usr/local/share/doc/
+BINDIR = /usr/bin/
+DOCDIR = /usr/doc/$(PROJECT)-0.7/
CC = gcc -Wall -O2 -march=native -D_FORTIFY_SOURCE=2
objects = calculate.o gridloc.o shared.o screen.o
@@ -14,14 +15,16 @@
$(objects) : $(PROJECT).h
install : $(PROJECT)
- install -m 755 --strip $(PROJECT) $(BINDIR)
- install -m 644 doc/$(PROJECT).html $(DOCDIR)
- install -m 644 default/.$(PROJECT)rc $(HOME)
+ install -d -v $(DESTDIR)$(BINDIR)
+ install -d -v $(DESTDIR)$(DOCDIR)
+ install -m 755 --strip $(PROJECT) $(DESTDIR)$(BINDIR)
+ install -m 644 doc/$(PROJECT).html $(DESTDIR)$(DOCDIR)
+ install -m 644 default/.$(PROJECT)rc $(DESTDIR)$(DOCDIR)
uninstall :
- rm $(BINDIR)/$(PROJECT)
- rm $(DOCDIR)/$(PROJECT).html
- rm $(HOME)/.$(PROJECT)rc
+ rm $(DESTDIR)$(BINDIR)$(PROJECT)
+ rm $(DESTDIR)$(DOCDIR)/$(PROJECT).html
+ rm $(DESTDIR)$(DOCDIR)/.$(PROJECT)rc
clean :
rm -f *.o *~
|