]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/plugins/pppoe/Makefile.linux
pppoe plugin stuff - Michal Ostrowski's version, lightly hacked
[ppp.git] / pppd / plugins / pppoe / Makefile.linux
diff --git a/pppd/plugins/pppoe/Makefile.linux b/pppd/plugins/pppoe/Makefile.linux
new file mode 100644 (file)
index 0000000..7fc97eb
--- /dev/null
@@ -0,0 +1,42 @@
+CC     = gcc
+CFLAGS = -g  -I.. -I../.. -I../../../include -D_linux_=1 -fPIC
+LDFLAGS        = -shared
+INSTALL        = install -o root
+
+all: pppoe.so pppoed
+
+PLUGINDIR = $(LIBDIR)/plugins
+PLUGINSRCS= pppoe.c libpppoe.c utils.c pppoehash.c pppoe_client.c \
+               pppoe_relay.c pppoe_server.c pppd_utils.c
+
+# include dependencies if present
+ifeq (.depend,$(wildcard .depend))
+include .depend
+endif
+
+
+pppoefwd: pppoefwd.o libpppoe.a 
+       $(CC) -o $@ $^
+
+pppoed: pppoed.o pppd_utils.o libpppoe.a 
+       $(CC) -o $@ $^
+
+libpppoe.a: pppoehash.o pppoe_client.o pppoe_relay.o pppoe_server.o \
+       utils.o libpppoe.o 
+       ar -rc $@ $^
+
+pppoe.so: pppoe.o libpppoe.a
+       $(CC) -o $@ $(LDFLAGS) $^
+
+%.so: %.c
+       $(CC) -o $@ $(LDFLAGS) $(CFLAGS) $^
+
+clean: 
+       rm -f *.o *.so *.a pppoefwd pppoed
+
+install: all
+       $(INSTALL) -d -m 755 $(LIBDIR)
+       $(INSTALL) -s -c -m 4550 pppoe.so $(LIBDIR)
+
+depend:
+       $(CPP) -M $(CFLAGS) $(PLUGINSRCS) >.depend