1994f052b40e38bbf01f56adcc517c96d87aa498
[p5sagit/p5-mst-13.2.git] / ext / SDBM_File / sdbm / Makefile.PL
1 use ExtUtils::MakeMaker;
2 WriteMakefile(
3     'LINKTYPE'  => 'static',
4     'DEFINE'    => '-DSDBM -DDUFF',
5     'SKIP'      => [qw(static static_lib dynamic dynamic_lib)],
6     'clean'
7         => {'FILES' => 'dbu libsdbm.a dbd dba dbe x-dbu *.dir *.pag'}
8 );
9
10
11 sub MY::top_targets {
12         '
13 LIBOBJS = sdbm.o pair.o hash.o
14 LIBSRCS = sdbm.c pair.c hash.c
15 HDRS = tune.h sdbm.h pair.h
16
17 all :: static
18
19 static ::       libsdbm.a
20
21 libsdbm.a: $(LIBOBJS)
22         ar cr libsdbm.a $(LIBOBJS)
23         $(RANLIB) libsdbm.a
24
25 $(LIBOBJS): $(HDRS) $(PERL_INC)/config.h
26
27 config ::
28
29 lint:
30         lint -abchx $(LIBSRCS)
31 ';
32 }
33
34
35 sub MY::realclean {
36         '
37 realclean :: clean
38         rm -f Makefile
39 ';
40 }
41
42
43 sub MY::postamble {
44         '
45 sdbm.o : sdbm.c $(PERL_INC)/config.h sdbm.h tune.h pair.h 
46 hash.o : hash.c $(PERL_INC)/config.h sdbm.h 
47 pair.o : pair.c $(PERL_INC)/config.h sdbm.h tune.h pair.h 
48 ';
49 }