From 4e734db296ac5ce93b418ff51380eceb27a6b028 Mon Sep 17 00:00:00 2001 From: Brian West Date: Fri, 21 Mar 2014 15:45:35 -0500 Subject: [PATCH] we need to do these in subdirectories because a number of the modules build a different ESL.so --- configure.ac | 1 + libs/esl/Makefile.am | 26 +++++++------------------- libs/esl/perl/Makefile | 16 ---------------- libs/esl/perl/Makefile.am | 33 +++++++++++++++++++++++++++++++++ 4 files changed, 41 insertions(+), 35 deletions(-) delete mode 100644 libs/esl/perl/Makefile create mode 100644 libs/esl/perl/Makefile.am diff --git a/configure.ac b/configure.ac index 3a6574a49c..f0b13ac778 100644 --- a/configure.ac +++ b/configure.ac @@ -1424,6 +1424,7 @@ AC_CONFIG_FILES([Makefile build/freeswitch.pc build/modmake.rules libs/esl/Makefile + libs/esl/perl/Makefile libs/xmlrpc-c/include/xmlrpc-c/config.h libs/xmlrpc-c/xmlrpc_config.h libs/xmlrpc-c/config.mk diff --git a/libs/esl/Makefile.am b/libs/esl/Makefile.am index 09e82f74bb..318ea9ee97 100644 --- a/libs/esl/Makefile.am +++ b/libs/esl/Makefile.am @@ -1,4 +1,5 @@ AUTOMAKE_OPTIONS = foreign subdir-objects +SUBDIRS = . perl MYLIB=./.libs/libesl.a LIBS=-lncurses -lpthread -lm LDFLAGS=-L. $(SYSTEM_LDFLAGS) @@ -49,25 +50,6 @@ ivrd_CFLAGS = $(AM_CFLAGS) -I$(switch_srcdir)/libs/esl/src/include ivrd_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS) $(LIBS) ivrd_LDADD = libesl.la -if HAVE_PERL -perldir = $(PERL_SITEDIR) -perl_LTLIBRARIES = ESL.la -ESL_la_SOURCES = perl/esl_wrap.cpp perl/perlxsi.c -ESL_la_CFLAGS = $(CC_CFLAGS) $(CFLAGS) -I$(switch_srcdir)/libs/esl/src/include $(SWITCH_AM_CFLAGS) $(PERL_CFLAGS) -ESL_la_CXXFLAGS = -I$(switch_srcdir)/libs/esl/src/include $(SWITCH_AM_CXXFLAGS) $(CXXFLAGS) -w $(PERL_INC) -ESL_la_LDFLAGS = -avoid-version -module -no-undefined -shared $(PERL_LDFLAGS) -ESL_la_LIBADD = libesl.la - -perlmod: ESL.la - -install-data-local: perlmod-install - -perlmod-install: install-perlLTLIBRARIES - install -m 755 perl/ESL.pm $(PERL_SITEDIR) - install -d -m 755 ESL $(PERL_SITEDIR)/ESL - install -m 755 perl/ESL/* $(PERL_SITEDIR)/ESL -endif - reswig: swigclean $(MAKE) -C perl reswig $(MAKE) -C php reswig @@ -86,6 +68,9 @@ swigclean: clean $(MAKE) -C java swigclean $(MAKE) -C managed swigclean +perlmod: + $(MAKE) -C perl + phpmod: $(MYLIB) $(MAKE) MYLIB="../$(MYLIB)" SOLINK="$(SOLINK)" CFLAGS="-I$(switch_srcdir)/libs/esl/src/include $(SWITCH_AM_CFLAGS)" CXXFLAGS="-I$(switch_srcdir)/libs/esl/src/include $(SWITCH_AM_CXXFLAGS)" CXX_CFLAGS="$(CXX_CFLAGS)" -C php @@ -107,6 +92,9 @@ javamod: $(MYLIB) managedmod: $(MYLIB) $(MAKE) MYLIB="../$(MYLIB)" SOLINK="$(SOLINK)" CFLAGS="-I$(switch_srcdir)/libs/esl/src/include $(SWITCH_AM_CFLAGS)" CXXFLAGS="-I$(switch_srcdir)/libs/esl/src/include $(SWITCH_AM_CXXFLAGS)" CXX_CFLAGS="$(CXX_CFLAGS)" -C managed +perlmod-install: + $(MAKE) -C perl install + phpmod-install: phpmod $(MAKE) -C php install diff --git a/libs/esl/perl/Makefile b/libs/esl/perl/Makefile deleted file mode 100644 index 712efe3920..0000000000 --- a/libs/esl/perl/Makefile +++ /dev/null @@ -1,16 +0,0 @@ -all: ESL.so - -esl_wrap.cpp: - swig -module ESL -shadow -perl5 -c++ -DMULTIPLICITY -I../src/include -o esl_wrap.cpp ../ESL.i - -perlxsi.c: - $(PERL) -MExtUtils::Embed -e xsinit -- -o perlxsi.c - -clean: - rm -f *.o *.so *~ - -swigclean: - rm -f esl_wrap.* ESL.so ESL.pm perlxsi.* - -reswig: swigclean esl_wrap.cpp perlxsi.c - diff --git a/libs/esl/perl/Makefile.am b/libs/esl/perl/Makefile.am new file mode 100644 index 0000000000..3c54583eed --- /dev/null +++ b/libs/esl/perl/Makefile.am @@ -0,0 +1,33 @@ +if HAVE_PERL +perldir = $(PERL_SITEDIR) +perl_LTLIBRARIES = ESL.la +ESL_la_SOURCES = esl_wrap.cpp perlxsi.c +ESL_la_CFLAGS = $(CC_CFLAGS) $(CFLAGS) -I$(switch_srcdir)/libs/esl/src/include $(SWITCH_AM_CFLAGS) $(PERL_CFLAGS) +ESL_la_CXXFLAGS = -I$(switch_srcdir)/libs/esl/src/include $(SWITCH_AM_CXXFLAGS) $(CXXFLAGS) -w $(PERL_INC) +ESL_la_LDFLAGS = -avoid-version -module -no-undefined -shared $(PERL_LDFLAGS) +ESL_la_LIBADD = ../libesl.la + +perlmod: ESL.la + +install-data-local: perlmod-install + +perlmod-install: install-perlLTLIBRARIES + install -m 755 ESL.pm $(PERL_SITEDIR) + install -d -m 755 ESL $(PERL_SITEDIR)/ESL + install -m 755 ESL/* $(PERL_SITEDIR)/ESL +endif + +esl_wrap.cpp: + swig -module ESL -shadow -perl5 -c++ -DMULTIPLICITY -I../src/include -o esl_wrap.cpp ../ESL.i + +perlxsi.c: + $(PERL) -MExtUtils::Embed -e xsinit -- -o perlxsi.c + +clean: + rm -f *.o *.so *~ + +swigclean: + rm -f esl_wrap.* ESL.so ESL.pm perlxsi.* + +reswig: swigclean esl_wrap.cpp perlxsi.c +