X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=pppd%2Fplugins%2Fpppoatm%2FMakefile.linux;fp=pppd%2Fplugins%2Fpppoatm%2FMakefile.linux;h=3a751617ad8f96a2cb4723e2d79ddcdd50eb8a30;hb=dd41357657d1436fe20692aa43613ceae8e03fa0;hp=0000000000000000000000000000000000000000;hpb=e663652a562dc73270e70b1fb44431cbc3b48a48;p=ppp.git diff --git a/pppd/plugins/pppoatm/Makefile.linux b/pppd/plugins/pppoatm/Makefile.linux new file mode 100644 index 0000000..3a75161 --- /dev/null +++ b/pppd/plugins/pppoatm/Makefile.linux @@ -0,0 +1,44 @@ +CC = gcc +COPTS = -O2 -g +CFLAGS = $(COPTS) -I../.. -I../../../include -fPIC +LDFLAGS = -shared +INSTALL = install + +#*********************************************************************** + +DESTDIR = @DESTDIR@ +LIBDIR = $(DESTDIR)/lib/pppd/$(VERSION) + +PLUGIN := pppoatm.so +PLUGIN_OBJS := pppoatm.o + +#******* +# Do we have the ATM libraries installed? Set HAVE_LIBATM to use them, +# or leave it unset to build the few routines we actually _use_ into +# the plugin directly. +# +#HAVE_LIBATM=yes + +ifdef HAVE_LIBATM +LIBS := -latm +else +CFLAGS += -I. +PLUGIN_OBJS += text2qos.o text2atm.o misc.o ans.o +LIBS := -lresolv +endif + +#********* +all: $(PLUGIN) + +$(PLUGIN): $(PLUGIN_OBJS) + $(CC) $(CFLAGS) -o $@ -shared $^ $(LIBS) + +install: all + $(INSTALL) -d -m 755 $(LIBDIR) + $(INSTALL) -c -m 4550 $(PLUGIN) $(LIBDIR) + +clean: + rm -f *.o *.so + +%.o: %.c + $(CC) $(CFLAGS) -c -o $@ $<