From 3ec53f0b676e4193e5a26287e6adddb81f803a71 Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Thu, 20 Mar 2014 10:38:47 -0400 Subject: [PATCH] ESL-86: esl automake of at least the core parts --- configure.ac | 2 +- libs/esl/.gitignore | 3 +- libs/esl/Makefile | 108 ------------------------------------------- libs/esl/Makefile.am | 100 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 103 insertions(+), 110 deletions(-) delete mode 100644 libs/esl/Makefile create mode 100644 libs/esl/Makefile.am diff --git a/configure.ac b/configure.ac index f37d7897a6..524955f8b1 100644 --- a/configure.ac +++ b/configure.ac @@ -1430,7 +1430,7 @@ AC_CONFIG_FILES([Makefile build/getg729.sh build/freeswitch.pc build/modmake.rules - libs/esl/eslmake.rules + libs/esl/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/.gitignore b/libs/esl/.gitignore index 8c6f167b4c..535763765e 100644 --- a/libs/esl/.gitignore +++ b/libs/esl/.gitignore @@ -1,3 +1,4 @@ eslmake.rules testserver_fork - +Makefile +Makefile.in diff --git a/libs/esl/Makefile b/libs/esl/Makefile deleted file mode 100644 index b993a1ac78..0000000000 --- a/libs/esl/Makefile +++ /dev/null @@ -1,108 +0,0 @@ -include eslmake.rules -PWD=$(shell pwd) -INCS=-I$(PWD)/src/include -LIBEDIT_DIR=../../libs/libedit -DEBUG=-g -ggdb -BASE_FLAGS=$(INCS) -DHAVE_EDITLINE $(DEBUG) -I$(LIBEDIT_DIR)/src/ -fPIC -PICKY=-O2 -CFLAGS=$(BASE_FLAGS) $(PICKY) $(SYSTEM_CFLAGS) -CXXFLAGS=$(BASE_FLAGS) -MYLIB=libesl.a -LIBS=-lncurses -lesl -lpthread -lm $(TINFO_LIBS) -LDFLAGS=-L. $(SYSTEM_LDFLAGS) -OBJS=src/esl.o src/esl_event.o src/esl_threadmutex.o src/esl_config.o src/esl_json.o src/esl_buffer.o -SRC =src/esl.c src/esl_event.c src/esl_threadmutex.c src/esl_config.c src/esl_json.c src/esl_buffer.c src/esl_oop.cpp -HEADERS=src/include/esl_config.h src/include/esl_event.h src/include/esl.h src/include/esl_threadmutex.h src/include/esl_oop.h src/include/esl_json.h src/include/esl_buffer.h -SOLINK=-shared -Xlinker -x -# comment the next line to disable c++ (no swig mods for you then) -OBJS += src/esl_oop.o - -all: $(MYLIB) fs_cli testclient testserver testserver_fork ivrd - -$(MYLIB): $(OBJS) $(HEADERS) $(SRC) - ar rcs $(MYLIB) $(OBJS) - ranlib $(MYLIB) - -testserver: $(MYLIB) testserver.c - $(CC) $(CC_CFLAGS) $(CFLAGS) testserver.c -o testserver $(LDFLAGS) $(LIBS) - -testserver_fork: $(MYLIB) testserver_fork.c - $(CC) $(CC_CFLAGS) $(CFLAGS) testserver_fork.c -o testserver_fork $(LDFLAGS) $(LIBS) - -ivrd: $(MYLIB) ivrd.c - $(CC) $(CC_CFLAGS) $(CFLAGS) ivrd.c -o ivrd $(LDFLAGS) $(LIBS) - -testclient: $(MYLIB) testclient.c - $(CC) $(CC_CFLAGS) $(CFLAGS) testclient.c -o testclient $(LDFLAGS) $(LIBS) - -fs_cli: $(MYLIB) fs_cli.c - $(CC) $(CC_CFLAGS) $(CFLAGS) fs_cli.c -o fs_cli $(LDFLAGS) -L$(LIBEDIT_DIR)/src/.libs -ledit $(LIBS) - -%.o: %.c $(HEADERS) - $(CC) $(CC_CFLAGS) $(CFLAGS) -c $< -o $@ - -%.o: %.cpp $(HEADERS) - $(CXX) $(CXX_CFLAGS) $(CXXFLAGS) -c $< -o $@ - -clean: - rm -f *.o src/*.o testclient testserver testserver_fork ivrd fs_cli libesl.a *~ src/*~ src/include/*~ - $(MAKE) -C perl clean - $(MAKE) -C php clean - $(MAKE) -C lua clean - $(MAKE) -C python clean - $(MAKE) -C ruby clean - $(MAKE) -C java clean - $(MAKE) -C managed clean - -reswig: swigclean - $(MAKE) -C perl reswig - $(MAKE) -C php reswig - $(MAKE) -C lua reswig - $(MAKE) -C python reswig - $(MAKE) -C ruby reswig - $(MAKE) -C java reswig - $(MAKE) -C managed reswig - -swigclean: clean - $(MAKE) -C perl swigclean - $(MAKE) -C php swigclean - $(MAKE) -C lua swigclean - $(MAKE) -C python swigclean - $(MAKE) -C ruby swigclean - $(MAKE) -C java swigclean - $(MAKE) -C managed swigclean - -perlmod: $(MYLIB) - $(MAKE) MYLIB="../$(MYLIB)" SOLINK="$(SOLINK)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" CXX_CFLAGS="$(CXX_CFLAGS)" -C perl - -phpmod: $(MYLIB) - $(MAKE) MYLIB="../$(MYLIB)" SOLINK="$(SOLINK)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" CXX_CFLAGS="$(CXX_CFLAGS)" -C php - -luamod: $(MYLIB) - $(MAKE) MYLIB="../$(MYLIB)" SOLINK="$(SOLINK)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" CXX_CFLAGS="$(CXX_CFLAGS)" -C lua - -pymod: $(MYLIB) - $(MAKE) MYLIB="../$(MYLIB)" SOLINK="$(SOLINK)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" CXX_CFLAGS="$(CXX_CFLAGS)" -C python - -tclmod: $(MYLIB) - $(MAKE) MYLIB="../$(MYLIB)" SOLINK="$(SOLINK)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" CXX_CFLAGS="$(CXX_CFLAGS)" -C tcl - -rubymod: $(MYLIB) - $(MAKE) MYLIB="../$(MYLIB)" SOLINK="$(SOLINK)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" CXX_CFLAGS="$(CXX_CFLAGS)" -C ruby - -javamod: $(MYLIB) - $(MAKE) MYLIB="../$(MYLIB)" SOLINK="$(SOLINK)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" CXX_CFLAGS="$(CXX_CFLAGS)" -C java - -managedmod: $(MYLIB) - $(MAKE) MYLIB="../$(MYLIB)" SOLINK="$(SOLINK)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" CXX_CFLAGS="$(CXX_CFLAGS)" -C managed - -perlmod-install: perlmod - $(MAKE) -C perl install - -phpmod-install: phpmod - $(MAKE) -C php install - -pymod-install: pymod - $(MAKE) -C python install - -everymod: perlmod phpmod luamod pymod rubymod javamod managedmod diff --git a/libs/esl/Makefile.am b/libs/esl/Makefile.am new file mode 100644 index 0000000000..1b2b4a6014 --- /dev/null +++ b/libs/esl/Makefile.am @@ -0,0 +1,100 @@ +AUTOMAKE_OPTIONS = foreign subdir-objects +MYLIB=./.libs/libesl.a +LIBS=-lncurses -lpthread -lm +LDFLAGS=-L. $(SYSTEM_LDFLAGS) +SOLINK=-shared -Xlinker -x + +lib_LTLIBRARIES = libesl.la +libesl_la_CFLAGS = $(AM_CFLAGS) $(PICKY) $(SYSTEM_CFLAGS) +libesl_la_CXXFLAGS = $(AM_CXXFLAGS) +libesl_la_CPPFLAGS = -I$(switch_srcdir)/libs/esl/src/include +libesl_la_LDFLAGS = -version-info 1:0:0 $(AM_LDFLAGS) -static -no-undefined -L. $(SYSTEM_LDFLAGS) +libesl_la_SOURCES = src/esl.c src/esl_event.c src/esl_threadmutex.c src/esl_config.c src/esl_json.c src/esl_buffer.c +if ENABLE_CPP +libesl_la_SOURCES += src/esl_oop.cpp +endif + +bin_PROGRAMS = fs_cli testclient testserver testserver_fork ivrd + +fs_cli_SOURCES = fs_cli.c +fs_cli_CFLAGS = $(AM_CFLAGS) -I$(switch_srcdir)/libs/esl/src/include +fs_cli_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS) $(LIBS) +fs_cli_LDADD = libesl.la + +if HAVE_LIBEDIT +fs_cli_CFLAGS += -DHAVE_EDITLINE -I$(switch_srcdir)/libs/libedit/src +fs_cli_LDADD += ../libedit/src/.libs/libedit.a $(TINFO_LIBS) +endif + +testclient_SOURCES = testclient.c +testclient_CFLAGS = $(AM_CFLAGS) -I$(switch_srcdir)/libs/esl/src/include +testclient_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS) $(LIBS) +testclient_LDADD = libesl.la + +testserver_SOURCES = testserver.c +testserver_CFLAGS = $(AM_CFLAGS) -I$(switch_srcdir)/libs/esl/src/include +testserver_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS) $(LIBS) +testserver_LDADD = libesl.la + +testserver_fork_SOURCES = testserver_fork.c +testserver_fork_CFLAGS = $(AM_CFLAGS) -I$(switch_srcdir)/libs/esl/src/include +testserver_fork_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS) $(LIBS) +testserver_fork_LDADD = libesl.la + +ivrd_SOURCES = ivrd.c +ivrd_CFLAGS = $(AM_CFLAGS) -I$(switch_srcdir)/libs/esl/src/include +ivrd_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS) $(LIBS) +ivrd_LDADD = libesl.la + +reswig: swigclean + $(MAKE) -C perl reswig + $(MAKE) -C php reswig + $(MAKE) -C lua reswig + $(MAKE) -C python reswig + $(MAKE) -C ruby reswig + $(MAKE) -C java reswig + $(MAKE) -C managed reswig + +swigclean: clean + $(MAKE) -C perl swigclean + $(MAKE) -C php swigclean + $(MAKE) -C lua swigclean + $(MAKE) -C python swigclean + $(MAKE) -C ruby swigclean + $(MAKE) -C java swigclean + $(MAKE) -C managed swigclean + +perlmod: $(MYLIB) + $(MAKE) MYLIB="../$(MYLIB)" SOLINK="$(SOLINK)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" CXX_CFLAGS="$(CXX_CFLAGS)" -C perl + +phpmod: $(MYLIB) + $(MAKE) MYLIB="../$(MYLIB)" SOLINK="$(SOLINK)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" CXX_CFLAGS="$(CXX_CFLAGS)" -C php + +luamod: $(MYLIB) + $(MAKE) MYLIB="../$(MYLIB)" SOLINK="$(SOLINK)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" CXX_CFLAGS="$(CXX_CFLAGS)" -C lua + +pymod: $(MYLIB) + $(MAKE) MYLIB="../$(MYLIB)" SOLINK="$(SOLINK)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" CXX_CFLAGS="$(CXX_CFLAGS)" -C python + +tclmod: $(MYLIB) + $(MAKE) MYLIB="../$(MYLIB)" SOLINK="$(SOLINK)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" CXX_CFLAGS="$(CXX_CFLAGS)" -C tcl + +rubymod: $(MYLIB) + $(MAKE) MYLIB="../$(MYLIB)" SOLINK="$(SOLINK)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" CXX_CFLAGS="$(CXX_CFLAGS)" -C ruby + +javamod: $(MYLIB) + $(MAKE) MYLIB="../$(MYLIB)" SOLINK="$(SOLINK)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" CXX_CFLAGS="$(CXX_CFLAGS)" -C java + +managedmod: $(MYLIB) + $(MAKE) MYLIB="../$(MYLIB)" SOLINK="$(SOLINK)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" CXX_CFLAGS="$(CXX_CFLAGS)" -C managed + +perlmod-install: perlmod + $(MAKE) -C perl install + +phpmod-install: phpmod + $(MAKE) -C php install + +pymod-install: pymod + $(MAKE) -C python install + +everymod: perlmod phpmod luamod pymod rubymod javamod managedmod