]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/plugins/Makefile.linux
Make the example plugins here export the version number that they
[ppp.git] / pppd / plugins / Makefile.linux
index b33ab273c4285dc3ab3df6c956af0f650ae8366e..a64256461ba48a2689b8dcc583f221fe509dec28 100644 (file)
@@ -1,8 +1,19 @@
 CC     = gcc
-CFLAGS = -g -O2 -I.. -I../../include
+CFLAGS = -g -O2 -I.. -I../../include -fPIC
 LDFLAGS        = -shared
+INSTALL        = install
 
-all:   minconn.so
+all:   minconn.so passprompt.so
 
 minconn.so: minconn.c
        $(CC) -o $@ $(LDFLAGS) $(CFLAGS) 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