automake: full ppp/ support

* Remove ppp/Makefile.legacy
* The ppp/Makefile.am includes complete functionality

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
This commit is contained in:
Oron Peled 2014-12-21 09:11:11 -05:00 committed by Tzafrir Cohen
parent 6df9a492a0
commit 5ac7fef4b2
4 changed files with 12 additions and 41 deletions

View File

@ -7,6 +7,10 @@ LEGACY_MAKE = \
SUBDIRS = xpp SUBDIRS = xpp
if PPPD
SUBDIRS += ppp
endif
all-local: all-local:
$(LEGACY_MAKE) all $(LEGACY_MAKE) all

View File

@ -209,6 +209,9 @@ case "$with_ppp" in
;; ;;
esac esac
AC_SUBST(PPPD_VERSION)
AM_CONDITIONAL([PPPD], [test "$PPPD_VERSION" != ''])
if test "x${PBX_DAHDI}" != "x1"; then if test "x${PBX_DAHDI}" != "x1"; then
AC_MSG_NOTICE([***]) AC_MSG_NOTICE([***])
AC_MSG_NOTICE([*** Building this package requires DAHDI support. *** ]) AC_MSG_NOTICE([*** Building this package requires DAHDI support. *** ])

View File

@ -1,14 +1,7 @@
LEGACY_MAKE = \ plugindir = $(libdir)/pppd/$(PPPD_VERSION)
$(MAKE) -f $(srcdir)/Makefile.legacy \ plugin_LTLIBRARIES = dahdi.la
top_srcdir=$(top_srcdir) \
srcdir=$(srcdir)
all-local: dahdi_la_CFLAGS = $(DAHDI_INCLUDE)
$(LEGACY_MAKE) all dahdi_la_LDFLAGS = -module -avoid-version
clean-local: CLEANFILES = dahdi.so
$(LEGACY_MAKE) clean
# Cannot allow this yet
distclean:
maintainer-clean:

View File

@ -1,29 +0,0 @@
#COPTS = -O2 -g
-include ../makeopts
CFLAGS += $(COPTS) -fPIC $(DAHDI_INCLUDE)
LDFLAGS += -shared
INCLUDE_DIR = $(includedir)/pppd
LIBDIR = $(libdir)/pppd/$(PPPD_VERSION)
PLUGINS := dahdi.so
all: $(PLUGINS)
%.so: %.c
ifeq (,$(PPPD_VERSION))
@echo "pppd version not found (in patchlevel.h)."
@echo "Install ppp source/headers and/or ./configure --with-ppp=PATH."
exit 1
endif
$(CC) -o $@ $(CFLAGS) $^ $(LDFLAGS)
install: $(PLUGINS)
$(INSTALL) -d $(DESTDIR)$(LIBDIR)
$(INSTALL) -m 0644 $? $(DESTDIR)$(LIBDIR)
clean:
rm -f *.o *.so *.a