1N/A#
1N/A# CDDL HEADER START
1N/A#
1N/A# The contents of this file are subject to the terms of the
1N/A# Common Development and Distribution License, Version 1.0 only
1N/A# (the "License"). You may not use this file except in compliance
1N/A# with the License.
1N/A#
1N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1N/A# or http://www.opensolaris.org/os/licensing.
1N/A# See the License for the specific language governing permissions
1N/A# and limitations under the License.
1N/A#
1N/A# When distributing Covered Code, include this CDDL HEADER in each
1N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1N/A# If applicable, add the following below this CDDL HEADER, with the
1N/A# fields enclosed by brackets "[]" replaced with your own identifying
1N/A# information: Portions Copyright [yyyy] [name of copyright owner]
1N/A#
1N/A# CDDL HEADER END
1N/A#
1N/Ause ExtUtils::MakeMaker;
1N/A
1N/Amy $define = '-DSDBM -DDUFF';
1N/A$define .= ' -DWIN32 -DPERL_STATIC_SYMS' if ($^O eq 'MSWin32');
1N/A
1N/Aif ($^O eq 'VMS') { # Old VAXC compiler can't handle Duff's device
1N/A require Config;
1N/A $define =~ s/\s+-DDUFF// if $Config::Config{'vms_cc_type'} eq 'vaxc';
1N/A}
1N/A
1N/AWriteMakefile(
1N/A NAME => 'sdbm', # (doesn't matter what the name is here) oh yes it does
1N/A# LINKTYPE => 'static',
1N/A DEFINE => $define,
1N/A INC => '-I$(PERL_INC)', # force PERL_INC dir ahead of system -I's
1N/A SKIP => [qw(dynamic dynamic_lib dlsyms)],
1N/A OBJECT => '$(O_FILES)',
1N/A clean => {'FILES' => 'dbu libsdbm.a dbd dba dbe x-dbu *.dir *.pag'},
1N/A H => [qw(tune.h sdbm.h pair.h $(PERL_INC)/config.h)],
1N/A C => [qw(sdbm.c pair.c hash.c)]
1N/A);
1N/A
1N/Asub MY::constants {
1N/A package MY;
1N/A my $self = shift;
1N/A
1N/A $self->{INST_STATIC} = 'libsdbm$(LIB_EXT)';
1N/A
1N/A return $self->SUPER::constants();
1N/A}
1N/A
1N/Asub MY::top_targets {
1N/A my $r = '
1N/Aall :: static
1N/A $(NOECHO) $(NOOP)
1N/A
1N/Aconfig ::
1N/A $(NOECHO) $(NOOP)
1N/A
1N/Alint:
1N/A lint -abchx $(LIBSRCS)
1N/A
1N/A';
1N/A $r .= '
1N/A# This is a workaround, the problem is that our old GNU make exports
1N/A# variables into the environment so $(MYEXTLIB) is set in here to this
1N/A# value which can not be built.
1N/Asdbm/libsdbm.a:
1N/A $(NOECHO) $(NOOP)
1N/A' unless $^O eq 'VMS';
1N/A
1N/A return $r;
1N/A}