re-arrange
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12088 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
7987fa5cfd
commit
23562fc886
|
@ -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 @@ OBJS=src/esl.o src/esl_event.o src/esl_threadmutex.o src/esl_config.o
|
|||
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 @@ fs_cli: $(MYLIB) fs_cli.c
|
|||
$(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
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
Loading…
Reference in New Issue