]> git.ozlabs.org Git - ppp.git/commitdiff
Make the example plugins here export the version number that they
authorPaul Mackerras <paulus@samba.org>
Thu, 8 Mar 2001 05:16:38 +0000 (05:16 +0000)
committerPaul Mackerras <paulus@samba.org>
Thu, 8 Mar 2001 05:16:38 +0000 (05:16 +0000)
were compiled against; add an install target to put the plugins in
/usr/lib/pppd/<version>/.

pppd/plugins/Makefile.linux
pppd/plugins/minconn.c
pppd/plugins/passprompt.c

index b7a7db0b355e04c3116c291b1f8978a2ca5cc4bc..a64256461ba48a2689b8dcc583f221fe509dec28 100644 (file)
@@ -1,6 +1,7 @@
 CC     = gcc
 CFLAGS = -g -O2 -I.. -I../../include -fPIC
 LDFLAGS        = -shared
+INSTALL        = install
 
 all:   minconn.so passprompt.so
 
@@ -9,3 +10,10 @@ minconn.so: minconn.c
 
 passprompt.so: passprompt.c
        $(CC) -o $@ $(LDFLAGS) $(CFLAGS) passprompt.c
+
+LIBDIR = /usr/lib/pppd
+
+install: minconn.so passprompt.so
+       version=`awk -F '"' '/VERSION/ { print $$2; }' ../patchlevel.h`; \
+       $(INSTALL) -d $(LIBDIR)/$$version; \
+       $(INSTALL) $? $(LIBDIR)/$$version
\ No newline at end of file
index 8c9354ebd364ea98d2d558cbe3b857e3289b6915..d0514d32047f3d692e7263eb693b41f9d3eb3aeb 100644 (file)
@@ -12,6 +12,8 @@
 #include <time.h>
 #include "pppd.h"
 
+char pppd_version[] = VERSION;
+
 static int minconnect = 0;
 
 static option_t my_options[] = {
index a579b912e70cfec5140b5396192b0e05ae3c4eb2..5e6a7f90bb755026387fed5bab7f7a789fd55f5f 100644 (file)
@@ -14,6 +14,8 @@
 #include <syslog.h>
 #include "pppd.h"
 
+char pppd_version[] = VERSION;
+
 static char promptprog[PATH_MAX+1];
 
 static option_t options[] = {