]> git.ozlabs.org Git - ppp.git/blob - pppd/plugins/pppoe/Makefile.linux
Correct utmp handling - Robert Davidson <puttputt@iaccess.ws>
[ppp.git] / pppd / plugins / pppoe / Makefile.linux
1 CC      = gcc
2 CFLAGS  = -g  -I.. -I../.. -I../../../include -D_linux_=1 -fPIC
3 LDFLAGS = -shared
4 INSTALL = install -o root
5
6 all: pppoe.so pppoed
7
8 PLUGINDIR = $(LIBDIR)/plugins
9 PLUGINSRCS= pppoe.c libpppoe.c utils.c pppoehash.c pppoe_client.c \
10                 pppoe_relay.c pppoe_server.c pppd_utils.c
11
12 # include dependencies if present
13 ifeq (.depend,$(wildcard .depend))
14 include .depend
15 endif
16
17
18 pppoefwd: pppoefwd.o libpppoe.a 
19         $(CC) -o $@ $^
20
21 pppoed: pppoed.o pppd_utils.o libpppoe.a 
22         $(CC) -o $@ $^
23
24 libpppoe.a: pppoehash.o pppoe_client.o pppoe_relay.o pppoe_server.o \
25         utils.o libpppoe.o 
26         ar -rc $@ $^
27
28 pppoe.so: pppoe.o libpppoe.a
29         $(CC) -o $@ $(LDFLAGS) $^
30
31 %.so: %.c
32         $(CC) -o $@ $(LDFLAGS) $(CFLAGS) $^
33
34 clean: 
35         rm -f *.o *.so *.a pppoefwd pppoed
36
37 install: all
38         $(INSTALL) -d -m 755 $(LIBDIR)
39         $(INSTALL) -s -c -m 4550 pppoe.so $(LIBDIR)
40
41 depend:
42         $(CPP) -M $(CFLAGS) $(PLUGINSRCS) >.depend