1*43003dfeSmillertuse ExtUtils::MakeMaker; 2*43003dfeSmillert 3*43003dfeSmillert# this file was templated from ext/List/Util/Makefile.PL 4*43003dfeSmillert# thanks to Graham Barr who wrote that module. 5*43003dfeSmillert 6*43003dfeSmillertWriteMakefile( 7*43003dfeSmillert VERSION_FROM => "lib/Hash/Util.pm", 8*43003dfeSmillert NAME => "Hash::Util", 9*43003dfeSmillert DEFINE => "-DPERL_EXT", 10*43003dfeSmillert); 11*43003dfeSmillert 12*43003dfeSmillertpackage MY; 13*43003dfeSmillert 14*43003dfeSmillert# We go through the HashUtil.c trickery to foil platforms 15*43003dfeSmillert# that have the feature combination of 16*43003dfeSmillert# (1) static builds 17*43003dfeSmillert# (2) allowing only one object by the same name in the static library 18*43003dfeSmillert# (3) the object name matching being case-blind 19*43003dfeSmillert# This means that we can't have the top-level util.o 20*43003dfeSmillert# and the extension-level Util.o in the same build. 21*43003dfeSmillert# One such platform is the POSIX-BC BS2000 EBCDIC mainframe platform. 22*43003dfeSmillert 23*43003dfeSmillertBEGIN { 24*43003dfeSmillert use Config; 25*43003dfeSmillert unless (defined $Config{usedl}) { 26*43003dfeSmillert eval <<'__EOMM__'; 27*43003dfeSmillertsub xs_c { 28*43003dfeSmillert my($self) = shift; 29*43003dfeSmillert return '' unless $self->needs_linking(); 30*43003dfeSmillert' 31*43003dfeSmillertHashUtil.c: Util.xs 32*43003dfeSmillert $(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) $(XSUBPP) $(XSPROTOARG) $(XSUBPPARGS) Util.xs > HashUtil.xsc && $(MV) HashUtil.xsc HashUtil.c 33*43003dfeSmillert'; 34*43003dfeSmillert} 35*43003dfeSmillert 36*43003dfeSmillertsub xs_o { 37*43003dfeSmillert my($self) = shift; 38*43003dfeSmillert return '' unless $self->needs_linking(); 39*43003dfeSmillert' 40*43003dfeSmillert 41*43003dfeSmillertUtil$(OBJ_EXT): HashUtil.c 42*43003dfeSmillert $(CCCMD) $(CCCDLFLAGS) -I$(PERL_INC) $(DEFINE) HashUtil.c 43*43003dfeSmillert $(MV) HashUtil$(OBJ_EXT) Util$(OBJ_EXT) 44*43003dfeSmillert'; 45*43003dfeSmillert} 46*43003dfeSmillert 47*43003dfeSmillert__EOMM__ 48*43003dfeSmillert } 49*43003dfeSmillert} 50