]> git.ozlabs.org Git - ppp.git/blob - pppd/plugins/pppoatm/Makefile.linux
3a751617ad8f96a2cb4723e2d79ddcdd50eb8a30
[ppp.git] / pppd / plugins / pppoatm / Makefile.linux
1 CC      = gcc
2 COPTS   = -O2 -g
3 CFLAGS  = $(COPTS) -I../.. -I../../../include -fPIC
4 LDFLAGS = -shared
5 INSTALL = install
6
7 #***********************************************************************
8
9 DESTDIR = @DESTDIR@
10 LIBDIR = $(DESTDIR)/lib/pppd/$(VERSION)
11
12 PLUGIN := pppoatm.so
13 PLUGIN_OBJS := pppoatm.o 
14
15 #*******
16 # Do we have the ATM libraries installed? Set HAVE_LIBATM to use them,
17 # or leave it unset to build the few routines we actually _use_ into
18 # the plugin directly.
19 #
20 #HAVE_LIBATM=yes
21
22 ifdef HAVE_LIBATM
23 LIBS := -latm
24 else
25 CFLAGS += -I.
26 PLUGIN_OBJS += text2qos.o text2atm.o misc.o ans.o
27 LIBS := -lresolv
28 endif
29
30 #*********
31 all: $(PLUGIN)
32
33 $(PLUGIN): $(PLUGIN_OBJS)
34         $(CC) $(CFLAGS) -o $@ -shared $^ $(LIBS)
35
36 install: all
37         $(INSTALL) -d -m 755 $(LIBDIR)
38         $(INSTALL) -c -m 4550 $(PLUGIN) $(LIBDIR)
39
40 clean:
41         rm -f *.o *.so
42
43 %.o: %.c
44         $(CC) $(CFLAGS) -c -o $@ $<