]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/plugins/rp-pppoe/Makefile.linux
Add pppoe-discovery program, from Marco D'Itri
[ppp.git] / pppd / plugins / rp-pppoe / Makefile.linux
index c20af5774527735b500cb4553a5f513de0b9a61d..5c8ecafc150dcf11bce0a44e589759f902d4ebf0 100644 (file)
 # This program may be distributed according to the terms of the GNU
 # General Public License, version 2 or (at your option) any later version.
 #
-# $Id: Makefile.linux,v 1.4 2004/10/31 22:09:03 paulus Exp $
+# $Id: Makefile.linux,v 1.5 2004/11/13 12:14:59 paulus Exp $
 #***********************************************************************
 
 DESTDIR = @DESTDIR@
+BINDIR = $(DESTDIR)/sbin
 LIBDIR = $(DESTDIR)/lib/pppd/$(VERSION)
 
 INSTALL        = install
@@ -23,7 +24,13 @@ VERSION=3.3
 
 COPTS=-O2 -g
 CFLAGS=$(COPTS) -I../../../include/linux
-all: rp-pppoe.so
+all: rp-pppoe.so pppoe-discovery
+
+pppoe-discovery: libplugin.a pppoe-discovery.o
+       $(CC) -o pppoe-discovery pppoe-discovery.o libplugin.a
+
+pppoe-discovery.o: pppoe-discovery.c
+       $(CC) $(CFLAGS) '-DVERSION="$(VERSION)"' -c -o pppoe-discovery.o pppoe-discovery.c
 
 rp-pppoe.so: libplugin.a plugin.o
        $(CC) -o rp-pppoe.so -shared plugin.o libplugin.a
@@ -31,6 +38,8 @@ rp-pppoe.so: libplugin.a plugin.o
 install: all
        $(INSTALL) -d -m 755 $(LIBDIR)
        $(INSTALL) -s -c -m 4550 rp-pppoe.so $(LIBDIR)
+       $(INSTALL) -d -m 755 $(BINDIR)
+       $(INSTALL) -s -c -m 555 pppoe-discovery $(BINDIR)
 
 clean:
        rm -f *.o *.so