[win32] the EXTCONST in sdbm.h breaks SDBM on Borland, since
[p5sagit/p5-mst-13.2.git] / ext / SDBM_File / sdbm / Makefile.PL
1 use ExtUtils::MakeMaker;
2
3 $define = '-DSDBM -DDUFF';
4 $define .= ' -DWIN32' if ($^O eq 'MSWin32');
5
6 if ($^O eq 'VMS') {  # Old VAXC compiler can't handle Duff's device
7     require Config;
8     $define =~ s/\s+-DDUFF// if $Config::Config{'vms_cc_type'} eq 'vaxc';
9 }
10
11 WriteMakefile(
12     NAME      => 'sdbm', # (doesn't matter what the name is here) oh yes it does
13 #    LINKTYPE  => 'static',
14     DEFINE    => $define,
15     INC       => '-I$(PERL_INC)', # force PERL_INC dir ahead of system -I's
16     INST_ARCHLIB => '.',
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)]
22 );
23
24 sub MY::post_constants {
25 '
26 INST_STATIC = libsdbm$(LIB_EXT)
27 '
28 }
29
30 sub MY::top_targets {
31         '
32 all :: static
33         $(NOECHO) $(NOOP)
34
35 config ::
36         $(NOECHO) $(NOOP)
37
38 lint:
39         lint -abchx $(LIBSRCS)
40 ';
41 }