automake: add basic libtool support
[dahdi/tools.git] / ppp / Makefile.legacy
1 #COPTS  = -O2 -g
2
3 -include ../makeopts
4
5 CFLAGS          += $(COPTS) -fPIC $(DAHDI_INCLUDE)
6 LDFLAGS         += -shared
7
8 INCLUDE_DIR     = $(includedir)/pppd
9
10 LIBDIR          = $(libdir)/pppd/$(PPPD_VERSION)
11
12 PLUGINS := dahdi.so
13
14 all:    $(PLUGINS)
15
16 %.so: %.c
17 ifeq (,$(PPPD_VERSION))
18         @echo "pppd version not found (in patchlevel.h)."
19         @echo "Install ppp source/headers and/or ./configure --with-ppp=PATH."
20         exit 1
21 endif
22         $(CC) -o $@ $(CFLAGS) $^ $(LDFLAGS) 
23
24 install: $(PLUGINS)
25         $(INSTALL) -d $(DESTDIR)$(LIBDIR)
26         $(INSTALL) -m 0644 $? $(DESTDIR)$(LIBDIR)
27
28 clean:
29         rm -f *.o *.so *.a