modules_k/perl/Makefile
ac9ce6fb
 # $Id$
 #
 # perl module makefile
 #
 # 
 # WARNING: do not run this directly, it should be run by the master Makefile
 
 include ../../Makefile.defs
bd3e0283
 auto_gen=openserxs.c
ac9ce6fb
 NAME=perl.so
820f28ae
 LIBS=
f881cc19
 
 ifeq ($(PERLLDOPTS),)
 	LIBS+=`perl -MExtUtils::Embed -e ldopts`
 else
 	LIBS+=$(PERLLDOPTS)
 endif
 
 ifeq ($(PERLCCOPTS),)
d5ea9c62
 	PERLCCOPTS=$(shell perl -MExtUtils::Embed -e ccopts)
f881cc19
 endif
d5ea9c62
 DEFS+=$(PERLCCOPTS)
f881cc19
 
 
486e14ad
 DEFS+=-DOPENSER_MOD_INTERFACE
 
9bd0acde
 SERLIBPATH=../../lib
 SER_LIBS+=$(SERLIBPATH)/kmi/kmi
ac9ce6fb
 
 PODFILES=openserxs.xs `find lib/perl -name *.pm`
 
f881cc19
 ifeq ($(TYPEMAP),)
 	ifeq ($(PERLLIBPATH),)
 		PERLLIBPATH=`perl -MConfig -e 'print $$Config{installprivlib}'`
 	endif
 	TYPEMAP=$(PERLLIBPATH)/ExtUtils/typemap
 endif
ac9ce6fb
 
bd3e0283
 include ../../Makefile.modules
 
ac9ce6fb
 perl.d: openserxs.o
 perl.o: perl.c openserxs.o
 
bd3e0283
 openserxs.o: CFLAGS+=-Wno-unused
ac9ce6fb
 
 openserxs.c: openserxs.xs typemap
 	xsubpp -typemap $(TYPEMAP) -typemap typemap openserxs.xs > openserxs.c
 
 .PHONY: perlpod
 perlpod: doc/perl_pod.sgml
 
 doc/perl_pod.sgml: openserxs.xs
 	cat $(PODFILES) | pod2docbook --doctype=chapter --title='OpenSER Perl API' --no-header - doc/perl_pod.sgml
7fa5092b
 
 install_module_custom:
 	echo "installing Perl OpenSER packages ..."
 	mkdir -p $(modules-prefix)/$(lib-dir)/perl
89c008f8
 	$(INSTALL_CFG) lib/perl/*.pm $(modules-prefix)/$(lib-dir)/perl
7fa5092b
 	mkdir -p $(modules-prefix)/$(lib-dir)/perl/OpenSER
89c008f8
 	$(INSTALL_CFG) lib/perl/OpenSER/*.pm \
7fa5092b
 		$(modules-prefix)/$(lib-dir)/perl/OpenSER
 	mkdir -p $(modules-prefix)/$(lib-dir)/perl/OpenSER/LDAPUtils
89c008f8
 	$(INSTALL_CFG) lib/perl/OpenSER/LDAPUtils/*.pm \
7fa5092b
 		$(modules-prefix)/$(lib-dir)/perl/OpenSER/LDAPUtils
 	mkdir -p $(modules-prefix)/$(lib-dir)/perl/OpenSER/Utils
89c008f8
 	$(INSTALL_CFG) lib/perl/OpenSER/Utils/*.pm \
7fa5092b
 		$(modules-prefix)/$(lib-dir)/perl/OpenSER/Utils
9125d64c
 	mkdir -p $(modules-prefix)/$(lib-dir)/perl/OpenSER/VDB
 	$(INSTALL_CFG) lib/perl/OpenSER/VDB/*.pm \
 		$(modules-prefix)/$(lib-dir)/perl/OpenSER/VDB
 	mkdir -p $(modules-prefix)/$(lib-dir)/perl/OpenSER/VDB/Adapter
 	$(INSTALL_CFG) lib/perl/OpenSER/VDB/Adapter/*.pm \
 		$(modules-prefix)/$(lib-dir)/perl/OpenSER/VDB/Adapter
7fa5092b