1 use ExtUtils::MakeMaker;
3 my $define = '-DSDBM -DDUFF';
4 $define .= ' -DWIN32 -DPERL_STATIC_SYMS' if ($^O eq 'MSWin32');
6 if ($^O eq 'VMS') { # Old VAXC compiler can't handle Duff's device
8 $define =~ s/\s+-DDUFF// if $Config::Config{'vms_cc_type'} eq 'vaxc';
12 NAME => 'sdbm', # (doesn't matter what the name is here) oh yes it does
13 # LINKTYPE => 'static',
15 INC => '-I$(PERL_INC)', # force PERL_INC dir ahead of system -I's
17 SKIP => [qw(dynamic dynamic_lib dlsyms)],
18 OBJECT => '$(O_FILES)',
19 clean => {'FILES' => 'dbu libsdbm.a dbd dba dbe x-dbu *.dir *.pag'},
20 H => [qw(tune.h sdbm.h pair.h $(PERL_INC)/config.h)],
21 C => [qw(sdbm.c pair.c hash.c)]
26 my $r = shift->SUPER::constants();
28 $r =~ s/^INST_STATIC =.*$/INST_STATIC = libsdbm\$(LIB_EXT)/m
33 sub MY::post_constants {
36 shift->SUPER::post_constants();
39 INST_STATIC = libsdbm$(LIB_EXT)
45 my $noecho = shift->{NOECHO};
49 ' . $noecho . '$(NOOP)
52 ' . $noecho . '$(NOOP)
55 lint -abchx $(LIBSRCS)
59 # This is a workaround, the problem is that our old GNU make exports
60 # variables into the environment so $(MYEXTLIB) is set in here to this
61 # value which can not be built.
63 ' . $noecho . '$(NOOP)
64 ' unless $^O eq 'VMS';