2 use ExtUtils::MakeMaker;
3 # See lib/ExtUtils/MakeMaker.pm for details of how to influence
4 # the contents of the Makefile that is written.
6 NAME => 'Blerg::Database',
7 VERSION_FROM => 'lib/Blerg/Database.pm', # finds $VERSION
8 PREREQ_PM => {}, # e.g., Module::Name => 1.1
9 ($] >= 5.005 ? ## Add these new keywords supported since 5.005
10 (ABSTRACT_FROM => 'lib/Blerg/Database.pm', # retrieve abstract from module
11 AUTHOR => 'Chip Black <bytex64@bytex64.net>') : ()),
12 LIBS => [''], # e.g., '-lm'
13 OBJECT => '$(BASEEXT)$(OBJ_EXT) ../../../blerg.a ../../../blerg_auth.a ../../../builddeps/scrypt.a',
14 DEFINE => '', # e.g., '-DHAVE_SOMETHING'
15 INC => '-I../../..', # e.g., '-I. -I/usr/include/other'
16 # Un-comment this if you add C files to link with later:
17 # OBJECT => '$(O_FILES)', # link all the C files too
19 if (eval {require ExtUtils::Constant; 1}) {
20 # If you edit these definitions to change the constants used by this module,
21 # you will need to use the generated const-c.inc and const-xs.inc
22 # files to replace their "fallback" counterparts before distributing your
24 my @names = (qw(RECORDS_PER_SEGMENT MAX_RECORD_SIZE MAX_TAG_LENGTH MAX_TAGS_PER_RECORD),
25 {name => 'BASEURL', type => 'PV'},
26 {name => 'DATA_PATH', type => 'PV'},
27 {name => 'HASH_TAGS_PATH', type => 'PV'},
28 {name => 'REF_TAGS_PATH', type => 'PV'},
30 ExtUtils::Constant::WriteConstants(
31 NAME => 'Blerg::Database',
34 C_FILE => 'const-c.inc',
35 XS_FILE => 'const-xs.inc',
42 foreach my $file ('const-c.inc', 'const-xs.inc') {
43 my $fallback = File::Spec->catfile('fallback', $file);
44 copy ($fallback, $file) or die "Can't copy $fallback to $file: $!";