]> git.ozlabs.org Git - ppp.git/blob - pppd/plugins/pppoe/Makefile.linux
pppd.8: Document netmask option
[ppp.git] / pppd / plugins / pppoe / Makefile.linux
1 #***********************************************************************
2 #
3 # Makefile
4 #
5 # Makefile for Roaring Penguin's Linux PPPoE plugin.
6 # Modified for integration with pppd sources by Paul Mackerras.
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 #***********************************************************************
14
15 CROSS_COMPILE=@CROSS_COMPILE@
16 CC=$(CROSS_COMPILE)@CC@
17 COPTS=@CFLAGS@
18
19 DESTDIR = $(INSTROOT)@DESTDIR@
20 BINDIR = $(DESTDIR)/sbin
21 MANDIR = $(DESTDIR)/share/man/man8
22 LIBDIR = $(DESTDIR)/lib/pppd/$(PPPDVERSION)
23
24 PPPDVERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../../patchlevel.h)
25
26 INSTALL = install
27 LN_S    = ln -sf
28
29 CFLAGS=$(COPTS) -I../../../include
30 all: pppoe.so pppoe-discovery
31
32 pppoe-discovery: pppoe-discovery.o debug.o
33         $(CC) $(LDFLAGS) -o pppoe-discovery pppoe-discovery.o debug.o
34
35 pppoe-discovery.o: pppoe-discovery.c
36         $(CC) $(CFLAGS) -I../../.. -c -o pppoe-discovery.o pppoe-discovery.c
37
38 debug.o: debug.c
39         $(CC) $(CFLAGS) -I../../.. -c -o debug.o debug.c
40
41 pppoe.so: plugin.o discovery.o if.o common.o
42         $(CC) $(LDFLAGS) -o pppoe.so -shared plugin.o discovery.o if.o common.o
43
44 install: all
45         $(INSTALL) -d -m 755 $(LIBDIR)
46         $(INSTALL) -c -m 755 pppoe.so $(LIBDIR)
47         # Symlink for backward compatibility
48         $(LN_S) pppoe.so $(LIBDIR)/rp-pppoe.so
49         $(INSTALL) -d -m 755 $(BINDIR)
50         $(INSTALL) -c -m 755 pppoe-discovery $(BINDIR)
51         $(INSTALL) -c -m 644 pppoe-discovery.8 $(MANDIR)
52
53 clean:
54         rm -f *.o *.so pppoe-discovery
55
56 plugin.o: plugin.c
57         $(CC) $(CFLAGS) -I../../.. -c -o plugin.o -fPIC plugin.c
58
59 discovery.o: discovery.c
60         $(CC) $(CFLAGS) -I../../.. -c -o discovery.o -fPIC discovery.c
61
62 if.o: if.c
63         $(CC) $(CFLAGS) -I../../.. -c -o if.o -fPIC if.c
64
65 common.o: common.c
66         $(CC) $(CFLAGS) -I../../.. -c -o common.o -fPIC common.c
67