File: Makefile.PL

package info (click to toggle)
libaudio-flac-decoder-perl 0.3+dfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, sid, stretch
  • size: 356 kB
  • ctags: 47
  • sloc: ansic: 479; perl: 58; sh: 51; makefile: 2
file content (39 lines) | stat: -rw-r--r-- 699 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
use ExtUtils::MakeMaker;
use Config;

$LDDLFLAGS = '';
$LDDLFLAGS = '-all_load' if $^O eq 'darwin';
$LDDLFLAGS = '-L/usr/pkg/lib' if $^O eq 'netbsd';

if ($^O =~ /win32/i) {
        $LIBS = '-lFLAC_static';
} else {
        $LIBS = '-lFLAC';
}

WriteMakefile(
	'NAME'		=> 'Audio::FLAC::Decoder',
	'VERSION_FROM'	=> 'Decoder.pm',
	'LIBS'		=> [$LIBS],
	'DEFINE'	=> '-O',
	'LDDLFLAGS'	=> "$Config{'lddlflags'} $LDDLFLAGS",
	 MYEXTLIB	=> 'libflacsupport$(LIB_EXT)',
);

sub MY::postamble {

	if ($^O =~ /win32/i) {

return '$(MYEXTLIB): $(O_FILES)
	$(AR) -nologo -out:$(MYEXTLIB) $(O_FILES)
	$(RANLIB) $@';

	} else {

return '$(MYEXTLIB): $(MYEXTLIB)($(O_FILES))
	$(AR) cr $@ $?
	$(RANLIB) $@';

	}

}