1/2 of automake for esl perl, at least we have configure detecting things now

This commit is contained in:
Brian West
2014-03-21 14:59:01 -05:00
parent 94051688c2
commit 5014b80d53
4 changed files with 50 additions and 39 deletions

View File

@@ -1,38 +0,0 @@
PERL=$(shell which perl)
PERL_SITEDIR=$(shell perl -MConfig -e 'print $$Config{sitelibexp}')
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}')
GCC_WARNING_JUNK=-w
PERL_INC=$(shell $(PERL) -MExtUtils::Embed -e perl_inc)
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) $(GCC_WARNING_JUNK) $(PERL_INC) -c esl_wrap.cpp -o esl_wrap.o
ESL.so: esl_wrap.o perlxsi.o
$(CXX) $(SOLINK) esl_wrap.o perlxsi.o $(MYLIB) $(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
install: ESL.so
install -m 755 ESL.so $(PERL_SITEDIR)
install -m 755 ESL.pm $(PERL_SITEDIR)
install -d -m 755 ESL $(PERL_SITEDIR)/ESL
install -m 755 ESL/* $(PERL_SITEDIR)/ESL

30
libs/esl/perl/Makefile.am Normal file
View File

@@ -0,0 +1,30 @@
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) -I$(switch_srcdir)/libs/esl/src/include $(SWITCH_AM_CFLAGS) $(PERL_CFLAGS) -c perlxsi.c -o perlxsi.o
esl_wrap.o: esl_wrap.cpp
$(CXX) -I$(switch_srcdir)/libs/esl/src/include $(SWITCH_AM_CXXFLAGS) $(CXXFLAGS) -w $(PERL_INC) -c esl_wrap.cpp -o esl_wrap.o
ESL.so: esl_wrap.o perlxsi.o
$(CXX) $(SOLINK) esl_wrap.o perlxsi.o ../.libs/libesl.a $(PERL__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
install: ESL.so
install -m 755 ESL.so $(PERL_SITEDIR)
install -m 755 ESL.pm $(PERL_SITEDIR)
install -d -m 755 ESL $(PERL_SITEDIR)/ESL
install -m 755 ESL/* $(PERL_SITEDIR)/ESL