Browse Source

unify the installation path setting

Jindrich Makovicka 21 years ago
parent
commit
ecb05ba548
3 changed files with 8 additions and 5 deletions
  1. 3 4
      Makefile
  2. 4 0
      README
  3. 1 1
      multiping.c

+ 3 - 4
Makefile

@@ -1,8 +1,6 @@
 INSTALLDIR = /usr/local/lib/gkrellm2/plugins
-VERSION = 2.0.9
+VERSION = 2.0.10
 PKGNAME = gkrellm-multiping
-#OPT = -march=athlon -O2
-#CC = gcc-3.0
 CC = gcc
 
 all: pinger multiping.so
@@ -11,7 +9,8 @@ pinger: pinger.c
 	$(CC) `pkg-config glib-2.0 --cflags` $(OPT) -lpthread `pkg-config glib-2.0 --libs` -Wall -o pinger pinger.c
 
 multiping.o: multiping.c decal_multiping_status.xpm
-	$(CC) -Wall -fPIC -Wall `pkg-config gtk+-2.0 --cflags` $(OPT) -DVERSION=\"$(VERSION)\" -c multiping.c
+	$(CC) -Wall -fPIC -Wall `pkg-config gtk+-2.0 --cflags` $(OPT) \
+	-DINSTALLDIR=\"$(INSTALLDIR)\" -DVERSION=\"$(VERSION)\" -c multiping.c
 
 multiping.so: multiping.o
 	$(CC) -shared -Wl -ggdb `pkg-config gtk+-2.0 --libs`-o multiping.so multiping.o

+ 4 - 0
README

@@ -12,6 +12,10 @@ Installation:
     make
     make install (as root)
 
+By default, the plugin is installed into
+/usr/local/lib/gkrellm2/plugins . if you want to change it, modify the
+INSTALLDIR variable in the Makefile.
+
 --- SECURITY WARNING ---
 
 Multiping needs to open a raw socket for sending and receiving of the

+ 1 - 1
multiping.c

@@ -30,7 +30,7 @@ ____________________________________________________________________________*/
 #define	CONFIG_NAME	"Multiping"
 #define	STYLE_NAME	"multiping"
 
-#define COMMAND "/usr/local/lib/gkrellm2/plugins/pinger"
+#define COMMAND INSTALLDIR"/pinger"
 
 static GkrellmMonitor *monitor;
 static GkrellmPanel *panel;