]> git.ozlabs.org Git - ppp.git/blob - pppd/plugins/pppoe/Makefile.linux
pppoe-discovery: Remove unused file debug.c
[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 LIBDIR = $(DESTDIR)/lib/pppd/$(PPPDVERSION)
22
23 PPPDVERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../../patchlevel.h)
24
25 INSTALL = install
26 LN_S    = ln -sf
27
28 CFLAGS=$(COPTS) -I../../../include
29 all: pppoe.so pppoe-discovery
30
31 pppoe-discovery: pppoe-discovery.o discovery.o if.o common.o
32         $(CC) $(LDFLAGS) -o pppoe-discovery pppoe-discovery.o discovery.o if.o common.o
33
34 pppoe-discovery.o: pppoe-discovery.c
35         $(CC) $(CFLAGS) -I../../.. -c -o pppoe-discovery.o pppoe-discovery.c
36
37 pppoe.so: plugin.o discovery.o if.o common.o
38         $(CC) $(LDFLAGS) -o pppoe.so -shared plugin.o discovery.o if.o common.o
39
40 install: all
41         $(INSTALL) -d -m 755 $(LIBDIR)
42         $(INSTALL) -c -m 4550 pppoe.so $(LIBDIR)
43         # Symlink for backward compatibility
44         $(LN_S) pppoe.so $(LIBDIR)/rp-pppoe.so
45         $(INSTALL) -d -m 755 $(BINDIR)
46         $(INSTALL) -c -m 555 pppoe-discovery $(BINDIR)
47
48 clean:
49         rm -f *.o *.so pppoe-discovery
50
51 plugin.o: plugin.c
52         $(CC) $(CFLAGS) -I../../.. -c -o plugin.o -fPIC plugin.c
53
54 discovery.o: discovery.c
55         $(CC) $(CFLAGS) -I../../.. -c -o discovery.o -fPIC discovery.c
56
57 if.o: if.c
58         $(CC) $(CFLAGS) -I../../.. -c -o if.o -fPIC if.c
59
60 common.o: common.c
61         $(CC) $(CFLAGS) -I../../.. -c -o common.o -fPIC common.c
62