-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.PL
60 lines (55 loc) · 1.84 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
54
55
56
57
58
59
60
use 5.008000;
use strict;
use warnings;
use ExtUtils::MakeMaker;
use Devel::CheckOS qw(os_is);
my ( $DEFS, $INCS, $LIBS, $DYNS, $LDFROM, $EXES, $OPTS );
$EXES = [];
$DYNS = {};
if ( os_is( 'MSWin32' ) ) {
$LIBS = '-lopengl32 -lgdi32 -lmsimg32';
}
elsif ( os_is( 'Cygwin' ) ) {
$LIBS = '-lGL -lX11';
}
elsif ( os_is( 'MacOSX' ) ) {
$DYNS = { 'OTHERLDFLAGS' => '-framework OpenGL' };
}
else {
$LIBS = '-lGL -lX11';
}
# This is the final build configuration
my $build_config =
{
'NAME' => 'OpenGL::Array',
'VERSION_FROM' => 'lib/OpenGL/Array.pm', # finds $VERSION, requires EU::MM from perl >= 5.5
'ABSTRACT_FROM' => 'lib/OpenGL/Array.pod', # retrieve abstract from module
'PREREQ_PM' => {
'Test::More' => 0
},
'CONFIGURE_REQUIRES' => {
'Devel::CheckOS' => 0,
'ExtUtils::MakeMaker' => 6.52, # for CONFIGURE_REQUIRES
},
'LICENSE' => 'perl',
#'PM' => { },
'AUTHOR' => "Chris Marshall ".'<chm at cpan dot org>',
'OBJECT' => 'opengl_array$(OBJ_EXT) gl_util$(OBJ_EXT) opengl_matrix$(OBJ_EXT)',
'XSPROTOARG' => '-noprototypes',
'DEFINE' => $DEFS,
'INC' => $INCS,
'LIBS' => $LIBS,
'dynamic_lib' => $DYNS,
'LDFROM' => '$(OBJECT) '.(defined($LDFROM)?$LDFROM:''),
'META_MERGE' => {
resources => {
homepage => 'http://sourceforge.net/projects/pogl/',
bugtracker => 'https://github.com/devel-chm/OpenGL-Array/issues',
repository => 'https://github.com/devel-chm/OpenGL-Array.git',
},
},
'EXE_FILES' => $EXES,
'OPTIMIZE' => $OPTS,
#'clean' => { FILES => }
};
WriteMakefile( %$build_config ); # Generate the Makefile