summaryrefslogtreecommitdiff
path: root/misc/gkrellshoot/files/patch-Makefile
blob: cb2f9e62691c6e15c612215233ad936ae5c35aae (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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
--- Makefile.orig	Mon Oct 21 17:31:33 2002
+++ Makefile	Mon Oct 21 17:37:34 2002
@@ -1,20 +1,20 @@
-GTK_INCLUDE = `gtk-config --cflags`
-GTK_LIB = `gtk-config --libs`
+GTK_INCLUDE = `$(GTK_CONFIG) --cflags`
+GTK_LIB = `$(GTK_CONFIG) --libs`
 
-IMLIB_INCLUDE = `imlib-config --cflags-gdk`
-IMLIB_LIB = `imlib-config --libs-gdk`
+IMLIB_INCLUDE = `${IMLIB_CONFIG} --cflags-gdk`
+IMLIB_LIB = `${IMLIB_CONFIG} --libs-gdk`
 
 
-FLAGS = -O2 -Wall -fPIC $(GTK_INCLUDE) $(IMLIB_INCLUDE)
+CFLAGS+= -Wall -fPIC $(GTK_INCLUDE) $(IMLIB_INCLUDE)
 LIBS = $(GTK_LIB) $(IMLIB_LIB)
 LFLAGS = -shared
 
-CC = gcc $(CFLAGS) $(FLAGS)
+CC ?= gcc $(CFLAGS)
 
 OBJS = gkrellshoot.o
 
 gkrellshoot.so: $(OBJS)
-	$(CC) $(OBJS) -o gkrellshoot.so $(LFLAGS) $(LIBS)  -lpthread
+	$(CC) $(OBJS) -o gkrellshoot.so $(LFLAGS) $(LIBS)
 
 clean:
 	rm -f *.o core *.so* *.bak *~
@@ -22,17 +22,7 @@
 gkrellshoot.o: gkrellshoot.c
 
 install:
-	if [ -d /usr/lib/gkrellm/plugins/ ] ; then \
-		install -c -s -m 644 gkrellshoot.so /usr/lib/gkrellm/plugins/ ; \
-	elif [ -d /usr/share/gkrellm/plugins/ ] ; then \
-		install -c -s -m 644 gkrellshoot.so /usr/share/gkrellm/plugins/ ; \
-	elif [ -d /usr/local/lib/gkrellm/plugins/ ] ; then \
-		install -c -s -m 644 gkrellshoot.so /usr/local/lib/gkrellm/plugins/ ; \
-	elif [ -d /usr/lib/gkrellm/plugins/ ] ; then \
-        	install -c -s -m 644 gkrellshoot.so /usr/lib/gkrellm/plugins/ ; \
-	else \
-		install -D -c -s -m 644 gkrellshoot.so /usr/lib/gkrellm/plugins/gkrellshoot.so ; \
-	fi
+	install -c -s gkrellshoot.so ${PREFIX}/libexec/gkrellm/plugins
 userinstall:
 	if [ -d $(HOME)/.gkrellm/plugins/ ] ; then \
 		install -C -s -m 644 gkrellshoot.so $(HOME)/.gkrellm/plugins/ ; \
@@ -41,9 +31,6 @@
 	fi
 
 uninstall:
-	rm -f /usr/lib/gkrellm/plugins/gkrellshoot.so
-	rm -f /usr/share/gkrellm/plugins/gkrellshoot.so
-	rm -f /usr/local/lib/gkrellm/plugins/gkrellshoot.so
-	rm -f /usr/lib/gkrellm/plugins/gkrellshoot.so
-	rm -f $(HOME)/.gkrellm/plugins/gkrellshoot.so
+	rm -f $(PLUGIN_DIR)/gkrellshoot.so
 
+all:   gkrellshoot.so