• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
17DESTDIR = $(INSTROOT)@DESTDIR@
18BINDIR = $(DESTDIR)/sbin
19LIBDIR = $(DESTDIR)/lib/pppd/$(PPPDVERSION)
20
21PPPDVERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../../patchlevel.h)
22
23INSTALL	= install
24
25# Version is set ONLY IN THE MAKEFILE!  Don't delete this!
26RP_VERSION=3.8p
27
28COPTS=-O2 -g
29CFLAGS=$(COPTS) -I../../../include '-DRP_VERSION="$(RP_VERSION)"'
30all: rp-pppoe.so pppoe-discovery
31
32pppoe-discovery: pppoe-discovery.o debug.o
33	$(CC) -o pppoe-discovery pppoe-discovery.o debug.o
34
35pppoe-discovery.o: pppoe-discovery.c
36	$(CC) $(CFLAGS) -c -o pppoe-discovery.o pppoe-discovery.c
37
38debug.o: debug.c
39	$(CC) $(CFLAGS) -c -o debug.o debug.c
40
41rp-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
44install: 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
50clean:
51	rm -f *.o *.so pppoe-discovery
52
53plugin.o: plugin.c
54	$(CC) $(CFLAGS) -I../../.. -c -o plugin.o -fPIC plugin.c
55
56discovery.o: discovery.c
57	$(CC) $(CFLAGS) -I../../.. -c -o discovery.o -fPIC discovery.c
58
59if.o: if.c
60	$(CC) $(CFLAGS) -I../../.. -c -o if.o -fPIC if.c
61
62common.o: common.c
63	$(CC) $(CFLAGS) -I../../.. -c -o common.o -fPIC common.c
64
65