1 # Generated automatically from Makefile.in by configure. 2 #*********************************************************************** 3 # 4 # Makefile 5 # 6 # Makefile for Roaring Penguin's Linux PPPoE plugin. 7 # Modified for integration with pppd sources by Paul Mackerras. 8 # 9 # Copyright (C) 2001 Roaring Penguin Software Inc. 10 # 11 # This program may be distributed according to the terms of the GNU 12 # General Public License, version 2 or (at your option) any later version. 13 # 14 # $Id: Makefile.linux,v 1.8 2008/06/09 08:34:23 paulus Exp $ 15 #*********************************************************************** 16 17 DESTDIR = $(INSTROOT)@DESTDIR@ 18 BINDIR = $(DESTDIR)/sbin 19 LIBDIR = $(DESTDIR)/lib/pppd/$(PPPDVERSION) 20 21 PPPDVERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../../patchlevel.h) 22 23 INSTALL = install 24 25 # Version is set ONLY IN THE MAKEFILE! Don't delete this! 26 RP_VERSION=3.8p 27 28 COPTS=-O2 -g 29 CFLAGS=$(COPTS) -I../../../include '-DRP_VERSION="$(RP_VERSION)"' 30 all: rp-pppoe.so pppoe-discovery 31 32 pppoe-discovery: pppoe-discovery.o debug.o 33 $(CC) -o pppoe-discovery pppoe-discovery.o debug.o 34 35 pppoe-discovery.o: pppoe-discovery.c 36 $(CC) $(CFLAGS) -c -o pppoe-discovery.o pppoe-discovery.c 37 38 debug.o: debug.c 39 $(CC) $(CFLAGS) -c -o debug.o debug.c 40 41 rp-pppoe.so: plugin.o discovery.o if.o common.o 42 $(CC) -o rp-pppoe.so -shared plugin.o discovery.o if.o common.o 43 44 install: all 45 $(INSTALL) -d -m 755 $(LIBDIR) 46 $(INSTALL) -s -c -m 4550 rp-pppoe.so $(LIBDIR) 47 $(INSTALL) -d -m 755 $(BINDIR) 48 $(INSTALL) -s -c -m 555 pppoe-discovery $(BINDIR) 49 50 clean: 51 rm -f *.o *.so pppoe-discovery 52 53 plugin.o: plugin.c 54 $(CC) $(CFLAGS) -I../../.. -c -o plugin.o -fPIC plugin.c 55 56 discovery.o: discovery.c 57 $(CC) $(CFLAGS) -I../../.. -c -o discovery.o -fPIC discovery.c 58 59 if.o: if.c 60 $(CC) $(CFLAGS) -I../../.. -c -o if.o -fPIC if.c 61 62 common.o: common.c 63 $(CC) $(CFLAGS) -I../../.. -c -o common.o -fPIC common.c 64 65