summaryrefslogtreecommitdiffstats
path: root/sysutils/gkfreq/files/patch-Makefile
blob: 99cde105910af09c619a379af89c7aa5c948b4b6 (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
39
40
41
42
Index: Makefile
diff -u Makefile.orig Makefile
--- Makefile.orig	2013-02-28 06:52:26.000000000 +0900
+++ Makefile	2013-08-16 01:03:07.493888354 +0900
@@ -1,30 +1,25 @@
-all: gkrellm-gkfreq.so
+PREFIX?=	/usr/local
+PLUGIN_DIR?=	${PREFIX}/libexec/gkrellm2/plugins
+
+CFLAGS+=	-fPIC -Wall `pkg-config gtk+-2.0 gkrellm --cflags`
 
-gkrellm-gkfreq.o: gkrellm-gkfreq.c
-	gcc -fPIC -O2 -Wall `pkg-config gtk+-2.0 --cflags` -c gkrellm-gkfreq.c
+all: gkrellm-gkfreq.so
 
 gkrellm-gkfreq.so: gkrellm-gkfreq.o
-	gcc -shared -Wall -o gkrellm-gkfreq.so gkrellm-gkfreq.o
+	${CC} -shared -Wall -o gkrellm-gkfreq.so gkrellm-gkfreq.o
 	@echo " "
 	@echo "    Compilation done!"
 	@echo " "
 	@echo "    If you want to try the plugin before installing you can run"
 	@echo "        gkrellm -p gkrellm-gkfreq.so"
 	@echo " "
-	@echo "    Install in either /usr/lib/gkrellm2/plugins/ by running"
-	@echo "        sudo make install"
-	@echo "    or in /usr/local/lib/gkrellm2/plugins/ by running"
-	@echo "        sudo make install-local"
-	@echo "    or in ~/.gkrellm2/plugins by running"
-	@echo "        make install-home"
-	@echo " "
 
 
 clean:
 	rm -rf *.o *.so *~
 
 install:
-	cp gkrellm-gkfreq.so /usr/lib/gkrellm2/plugins/
+	${INSTALL} -s gkrellm-gkfreq.so ${PLUGIN_DIR}
 
 install-local:
 	cp gkrellm-gkfreq.so /usr/local/lib/gkrellm2/plugins/
OpenPOWER on IntegriCloud