-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile.PL
53 lines (48 loc) · 1.38 KB
/
Makefile.PL
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
package MY;
use strict;
use ExtUtils::MakeMaker;
use Config;
use Prima::Config;
use OpenGL::Config;
my @libs;
my @obj = ('OpenGL.o');
if (
$^O eq 'MSWin32' or
( $^O eq 'cygwin' and $Prima::Config::Config{platform} eq 'win32')
) {
push @libs, '-L/lib/w32api' if $^O eq 'cygwin';
push @libs, '-lopengl32 -lmsimg32';
push @libs, map { "-l$_" } @{$Prima::Config::Config{ldlibs} };
push @obj, 'win32.o';
} elsif ( $^O eq 'darwin') {
push @libs, map { "-L$_" } @{$Prima::Config::Config{ldpaths} };
push @obj, 'x11.o';
} else {
push @obj, 'x11.o';
}
push @libs, qq{"$Prima::Config::Config{libs}"} if $Prima::Config::Config{libs};
my $oglc_libs = $OpenGL::Config->{LIBS} || '';
my $oglc_inc = $OpenGL::Config->{INC} || '';
WriteMakefile(
NAME => 'Prima::OpenGL',
VERSION_FROM => 'lib/Prima/OpenGL.pm',
MIN_PERL_VERSION => '5.012',
PREREQ_PM => {
'Prima' => 1.74,
'OpenGL' => 0,
},
CONFIGURE_REQUIRES => {
'Prima' => 0,
},
ABSTRACT_FROM => 'lib/Prima/OpenGL.pm',
AUTHOR => 'Dmitry Karasik <[email protected]>',
LIBS => [qq{:nosearch $oglc_libs @libs}],
DEFINE => "$Prima::Config::Config{define}",
INC => "$oglc_inc $Prima::Config::Config{inc} -Iinclude",
OBJECT => "@obj",
META_MERGE => {
resources => {
repository => 'http://github.com/dk/Prima-OpenGL',
},
},
);