[commit] r12088 - in freeswitch/trunk/libs/esl: . perl
Author: anthm Date: Tue Feb 17 09:41:34 2009 New Revision: 12088 Log: re-arrange Added: freeswitch/trunk/libs/esl/perl/Makefile Modified: freeswitch/trunk/libs/esl/Makefile Modified: freeswitch/trunk/libs/esl/Makefile ============================================================================== --- freeswitch/trunk/libs/esl/Makefile (original) +++ freeswitch/trunk/libs/esl/Makefile Tue Feb 17 09:41:34 2009 @@ -1,4 +1,5 @@ -INCS=-Isrc/include +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 @@ -12,11 +13,6 @@ SRC=src/esl.c src/esl_event.c src/esl_threadmutex.c src/esl_config.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 SOLINK=-shared -Xlinker -x -PERL = $(shell which perl) -PERL_LIBDIR =-L$(shell perl -MConfig -e 'print $$Config{archlib}')/CORE -PERL_LIBS =$(shell perl -MConfig -e 'print $$Config{libs}') -LOCAL_CFLAGS= -w -DMULTIPLICITY $(shell $(PERL) -MExtUtils::Embed -e ccopts) -DEMBED_PERL -LOCAL_LDFLAGS=$(shell $(PERL) -MExtUtils::Embed -e ldopts) $(shell $(PERL) -MConfig -e 'print $$Config{libs}') # comment the next line to disable c++ (no swig mods for you then) OBJS += src/esl_oop.o @@ -42,29 +38,16 @@ $(CXX) $(CXX_CFLAGS) $(CXXFLAGS) -c $< -o $@ clean: - rm -f *.o src/*.o testclient testserver fs_cli libesl.a *~ src/*~ src/include/*~ perl/*.o perl/*.so + rm -f *.o src/*.o testclient testserver fs_cli libesl.a *~ src/*~ src/include/*~ + make -C perl clean -reswig: swigclean perl/esl_wrap.cpp perl/perlxsi.c +reswig: swigclean + make -C perl reswig swigclean: clean - rm -f perl/esl_wrap.* perl/ESL.so perl/ESL.pm perl/perlxsi.* - -perl/esl_wrap.cpp: - swig -module ESL -shadow -perl5 -c++ -DMULTIPLICITY -Isrc/include -o perl/esl_wrap.cpp ESL.i - -perl/perlxsi.c: - $(PERL) -MExtUtils::Embed -e xsinit -- -o perl/perlxsi.c - -perl/perlxsi.o: perl/perlxsi.c - $(CC) $(CC_CFLAGS) $(CFLAGS) $(LOCAL_CFLAGS) -c perl/perlxsi.c -o perl/perlxsi.o - -perl/esl_wrap.o: perl/esl_wrap.cpp - $(CXX) $(CXX_CFLAGS) $(CXXFLAGS) $(LOCAL_CFLAGS) -c perl/esl_wrap.cpp -o perl/esl_wrap.o - -perl/ESL.so: $(MYLIB) perl/esl_wrap.o perl/perlxsi.o - $(CXX) $(SOLINK) perl/esl_wrap.o perl/perlxsi.o $(LOCAL_LDFLAGS) -o perl/ESL.so -L. $(LIBS) - -perlmod: perl/ESL.so + make -C perl swigclean +perlmod: + make SOLINK="$(SOLINK)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" CXX_CFLAGS="$(CXX_CFLAGS)" -C perl Added: freeswitch/trunk/libs/esl/perl/Makefile ============================================================================== --- (empty file) +++ freeswitch/trunk/libs/esl/perl/Makefile Tue Feb 17 09:41:34 2009 @@ -0,0 +1,31 @@ +PERL = $(shell which perl) +PERL_LIBDIR =-L$(shell perl -MConfig -e 'print $$Config{archlib}')/CORE +PERL_LIBS =$(shell perl -MConfig -e 'print $$Config{libs}') +LOCAL_CFLAGS= -w -DMULTIPLICITY $(shell $(PERL) -MExtUtils::Embed -e ccopts) -DEMBED_PERL +LOCAL_LDFLAGS=$(shell $(PERL) -MExtUtils::Embed -e ldopts) $(shell $(PERL) -MConfig -e 'print $$Config{libs}') + +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 + +perlxsi.o: perlxsi.c + $(CC) $(CC_CFLAGS) $(CFLAGS) $(LOCAL_CFLAGS) -c perlxsi.c -o perlxsi.o + +esl_wrap.o: esl_wrap.cpp + $(CXX) $(CXX_CFLAGS) $(CXXFLAGS) $(LOCAL_CFLAGS) -c esl_wrap.cpp -o esl_wrap.o + +ESL.so: $(MYLIB) esl_wrap.o perlxsi.o + $(CXX) $(SOLINK) esl_wrap.o perlxsi.o $(LOCAL_LDFLAGS) -o ESL.so -L. $(LIBS) + +clean: + rm -f *.o *.so *~ + +swigclean: + rm -f esl_wrap.* ESL.so ESL.pm perlxsi.* + +reswig: swigclean esl_wrap.cpp perlxsi.c +
participants (1)
-
FreeSWITCH SVN