X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=pppd%2Fplugins%2Frp-pppoe%2FMakefile.linux;h=9803aeb4ebbae07bb7d8a527f942b753eb5b404e;hb=a96702158e72c0d527a146940b983a366dbce464;hp=bbb8ba9a7a4998ce4405dac9ffa07776aec757dd;hpb=b289ec4c473338c67bce0cb5712616da2d2493e8;p=ppp.git diff --git a/pppd/plugins/rp-pppoe/Makefile.linux b/pppd/plugins/rp-pppoe/Makefile.linux index bbb8ba9..9803aeb 100644 --- a/pppd/plugins/rp-pppoe/Makefile.linux +++ b/pppd/plugins/rp-pppoe/Makefile.linux @@ -4,47 +4,61 @@ # Makefile # # Makefile for Roaring Penguin's Linux PPPoE plugin. +# Modified for integration with pppd sources by Paul Mackerras. # # Copyright (C) 2001 Roaring Penguin Software Inc. # # 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.2 2004/01/13 03:57:55 paulus Exp $ +# $Id: Makefile.linux,v 1.8 2008/06/09 08:34:23 paulus Exp $ #*********************************************************************** +DESTDIR = $(INSTROOT)@DESTDIR@ +BINDIR = $(DESTDIR)/sbin +LIBDIR = $(DESTDIR)/lib/pppd/$(PPPDVERSION) + +PPPDVERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../../patchlevel.h) + +INSTALL = install + # Version is set ONLY IN THE MAKEFILE! Don't delete this! -VERSION=3.3 +RP_VERSION=3.8p COPTS=-O2 -g -CFLAGS=$(COPTS) -I../../../include/linux -all: rp-pppoe.so +CFLAGS=$(COPTS) -I../../../include '-DRP_VERSION="$(RP_VERSION)"' +all: rp-pppoe.so pppoe-discovery + +pppoe-discovery: pppoe-discovery.o debug.o + $(CC) $(LDFLAGS) -o pppoe-discovery pppoe-discovery.o debug.o + +pppoe-discovery.o: pppoe-discovery.c + $(CC) $(CFLAGS) -c -o pppoe-discovery.o pppoe-discovery.c -rp-pppoe.so: libplugin.a plugin.o - gcc -o rp-pppoe.so -shared plugin.o libplugin.a +debug.o: debug.c + $(CC) $(CFLAGS) -c -o debug.o debug.c + +rp-pppoe.so: plugin.o discovery.o if.o common.o + $(CC) $(LDFLAGS) -o rp-pppoe.so -shared plugin.o discovery.o if.o common.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 + rm -f *.o *.so pppoe-discovery plugin.o: plugin.c - gcc '-DRP_VERSION="$(VERSION)"' $(CFLAGS) -I../../.. -c -o plugin.o -fPIC plugin.c - -libplugin.a: discovery.o if.o common.o debug.o - ar -rc $@ $^ + $(CC) $(CFLAGS) -I../../.. -c -o plugin.o -fPIC plugin.c discovery.o: discovery.c - gcc $(CFLAGS) '-DVERSION="$(VERSION)"' -c -o discovery.o -fPIC discovery.c + $(CC) $(CFLAGS) -I../../.. -c -o discovery.o -fPIC discovery.c if.o: if.c - gcc $(CFLAGS) '-DVERSION="$(VERSION)"' -c -o if.o -fPIC if.c - -debug.o: debug.c - gcc $(CFLAGS) '-DVERSION="$(VERSION)"' -c -o debug.o -fPIC debug.c + $(CC) $(CFLAGS) -I../../.. -c -o if.o -fPIC if.c common.o: common.c - gcc $(CFLAGS) '-DVERSION="$(VERSION)"' -c -o common.o -fPIC common.c + $(CC) $(CFLAGS) -I../../.. -c -o common.o -fPIC common.c