ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/PDL-Audio/Makefile.PL
Revision: 1.3
Committed: Wed Apr 18 08:28:18 2012 UTC (12 years, 1 month ago) by root
Content type: text/plain
Branch: MAIN
CVS Tags: rel-1_2, HEAD
Changes since 1.2: +13 -11 lines
Log Message:
1.2

File Contents

# User Rev Content
1 root 1.1 require 5.006; # lower versions of perl not supported
2    
3     use Config;
4     use ExtUtils::MakeMaker;
5     use PDL::Core::Dev;
6    
7     {
8     local $ENV{CC} = "$Config{cc} $Config{cppflags} $Config{ccflags} $Config{cccdlflags}";
9     print "$ENV{CC}\n";
10     system "cd sndlib && ./configure";
11     }
12    
13     @pack = ["audio.pd",Audio,PDL::Audio];
14     %hash = pdlpp_stdargs(@pack);
15    
16     $hash{depend}{'Audio.o'} = 'xlib.h remez.h';
17     $hash{depend}{'xlib.o'} = 'xlib.h remez.h';
18     $hash{OBJECT} = "Audio.o xlib.o remez.o";
19    
20     do "./config.pl";
21    
22     $hash{PM}{'Scales.pm'} = '$(INST_LIBDIR)/Audio/Scales.pm';
23     $hash{PM}{'Pitches.pm'} = '$(INST_LIBDIR)/Audio/Pitches.pm';
24    
25     push @{$hash{DIR}}, "sndlib";
26    
27     WriteMakefile(%hash,
28 root 1.3 'dist' => {
29     PREOP => 'pod2text Audio.pm | tee README >$(DISTVNAME)/README; chmod -R u=rwX,go=rX . ;',
30     COMPRESS => 'gzip -9v',
31     SUFFIX => '.gz',
32     },
33     MYEXTLIB => "sndlib/sndlib.a",
34     VERSION_FROM => 'audio.pd',
35     DIR => [],
36     EXE_FILES => ["bin/pdlaudio-demo", "bin/pdlaudio-birds"],
37     XS => { "Audio.xs" => "Audio.c" },
38 root 1.1 );
39    
40     sub MY::postamble {
41     my $self=shift;
42     pdlpp_postamble(@pack)."
43    
44     .EXPORT_ALL_VARIABLES:
45    
46     force:
47    
48     \$(MYEXTLIB): force
49     cd sndlib && \$(MAKE)
50    
51 root 1.3 clean::
52     cd sndlib && \$(MAKE) clean
53    
54 root 1.1 ";
55     }