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