summaryrefslogtreecommitdiffstats
path: root/system/crikey/crikey-0.8.3-Makefile.diff
blob: 28e70ec9845f17786a7334f24502eac346f0fb57 (about) (plain) (blame)
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
diff -Nur crikey-0.8.3.orig/Makefile crikey-0.8.3/Makefile
--- crikey-0.8.3.orig/Makefile	2009-06-15 18:14:05.000000000 -0500
+++ crikey-0.8.3/Makefile	2009-10-18 00:59:26.654268333 -0500
@@ -1,8 +1,13 @@
 CC = gcc
-CFLAGS = -Wall -Wstrict-prototypes -g -O2
+OPTS = -O2
+CFLAGS = -Wall -Wstrict-prototypes -g $(OPTS)
 SRC = crikey.c
 OBJ = $(SRC:.c=.o)
-LIBS = -L/usr/X11R6/lib -lX11 -lXtst -lXext
+X11LIBS = /usr/X11R6/lib
+LIBS = -L$(X11LIBS) -lX11 -lXtst -lXext
+PREFIX = /usr/local
+BINDIR = $(PREFIX)/bin
+DESTDIR =
 
 all: crikey
 
@@ -10,10 +15,11 @@
 	$(CC) -o crikey $(OBJ) $(LIBS)
 
 install: crikey
-	cp crikey /usr/local/bin
+	mkdir -p $(DESTDIR)/$(BINDIR)
+	cp crikey $(DESTDIR)/$(BINDIR)
 
 uninstall:
-	rm -f /usr/local/bin/crikey
+	rm -f $(DESTDIR)/$(BINDIR)/crikey
 
 clean:
 	rm -f $(OBJ) crikey *~