2
0

Makefile 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. PERL=$(shell which perl)
  2. PERL_SITEDIR=$(shell perl -MConfig -e 'print $$Config{sitelibexp}')
  3. PERL_LIBDIR=-L$(shell perl -MConfig -e 'print $$Config{archlib}')/CORE
  4. PERL_LIBS=$(shell perl -MConfig -e 'print $$Config{libs}')
  5. LOCAL_CFLAGS=-w -DMULTIPLICITY $(shell $(PERL) -MExtUtils::Embed -e ccopts) -DEMBED_PERL
  6. LOCAL_LDFLAGS=$(shell $(PERL) -MExtUtils::Embed -e ldopts) $(shell $(PERL) -MConfig -e 'print $$Config{libs}')
  7. GCC_WARNING_JUNK=-w
  8. PERL_INC=$(shell $(PERL) -MExtUtils::Embed -e perl_inc)
  9. all: FSSCGI.so
  10. scgi_wrap.cpp:
  11. swig -module FSSCGI -shadow -perl5 -c++ -DMULTIPLICITY -I../src/include -o scgi_wrap.cpp ../FSSCGI.i
  12. perlxsi.c:
  13. $(PERL) -MExtUtils::Embed -e xsinit -- -o perlxsi.c
  14. perlxsi.o: perlxsi.c
  15. $(CC) $(CC_CFLAGS) $(CFLAGS) $(LOCAL_CFLAGS) -c perlxsi.c -o perlxsi.o
  16. scgi_wrap.o: scgi_wrap.cpp
  17. $(CXX) $(CXX_CFLAGS) $(CXXFLAGS) $(GCC_WARNING_JUNK) $(PERL_INC) -c scgi_wrap.cpp -o scgi_wrap.o
  18. FSSCGI.so: scgi_wrap.o perlxsi.o
  19. $(CXX) $(SOLINK) scgi_wrap.o perlxsi.o $(MYLIB) $(LOCAL_LDFLAGS) -o FSSCGI.so -L. $(LIBS)
  20. clean:
  21. rm -f *.o *.so *~
  22. swigclean:
  23. rm -f scgi_wrap.* FSSCGI.so FSSCGI.pm perlxsi.*
  24. reswig: swigclean scgi_wrap.cpp perlxsi.c
  25. install: FSSCGI.so
  26. install -m 755 FSSCGI.so $(PERL_SITEDIR)
  27. install -m 755 FSSCGI.pm $(PERL_SITEDIR)
  28. install -d -m 755 FSSCGI $(PERL_SITEDIR)/FSSCGI
  29. install -m 755 FSSCGI/* $(PERL_SITEDIR)/FSSCGI