use Carp;
use lib 'make/lib';
+use Data::Dumper;
use SDL::Build;
use YAML;
use YAML::Node;
$sdl_config = {
'OpenGL' => {
'GL' => [
- '/usr/include/GL',
- '/usr/lib'
+ '/System/Library/Frameworks/OpenGL.framework/Headers',
+ '/System/Library/Frameworks/OpenGL.framework/Libraries'
],
'SDL' => [
- '/usr/include/SDL',
- '/usr/lib'
+ '/opt/local/include/SDL',
+ '/opt/local/lib'
],
'GLU' => [
- '/usr/include/GL',
- '/usr/lib'
+ '/System/Library/Frameworks/OpenGL.framework/Headers',
+ '/System/Library/Frameworks/OpenGL.framework/Libraries'
]
},
'SDL' => {
'png' => [
- '/usr/include',
- '/usr/lib'
+ '/opt/local/include',
+ '/opt/local/lib'
],
'SDL' => [
- '/usr/include/SDL',
- '/usr/lib'
+ '/opt/local/include/SDL',
+ '/opt/local/lib'
],
'SDL_ttf' => [
- '/usr/include/SDL',
- '/usr/lib'
+ '/opt/local/include/SDL',
+ '/opt/local/lib'
],
'SDL_net' => [
- '/usr/include/SDL',
- '/usr/lib'
+ '/opt/local/include/SDL',
+ '/opt/local/lib'
],
'SDL_image' => [
- '/usr/include/SDL',
- '/usr/lib'
+ '/opt/local/include/SDL',
+ '/opt/local/lib'
],
'SDL_gfx' => [
- '/usr/include/SDL',
- '/usr/lib'
+ '/opt/local/include/SDL',
+ '/opt/local/lib'
],
'jpeg' => [
- '/usr/include',
- '/usr/lib'
+ '/opt/local/include',
+ '/opt/local/lib'
],
- 'smpeg' => [
- '/usr/include/smpeg',
- '/usr/lib'
- ],
+ 'smpeg' => 0,
'SDL_mixer' => [
- '/usr/include/SDL',
- '/usr/lib'
+ '/opt/local/include/SDL',
+ '/opt/local/lib'
]
},
'SFont' => {
'SDL_image' => [
- '/usr/include/SDL',
- '/usr/lib'
+ '/opt/local/include/SDL',
+ '/opt/local/lib'
],
'SDL' => [
- '/usr/include/SDL',
- '/usr/lib'
+ '/opt/local/include/SDL',
+ '/opt/local/lib'
]
}
};
{
my ($self, $subsystems, $build, $defines, $includes, $links,
$sdl_compile, $sdl_link) = @_;
-
my %file_flags;
-
while (my ($subsystem, $buildable) = each %$build)
{
my $sub_file = $subsystems->{$subsystem}{file}{to};
my $sub_includes = join(' ', @{ $includes->{$subsystem} } );
-
$file_flags{ $sub_file } =
{
extra_compiler_flags =>
[
@{ $includes->{$subsystem} },
- split(' ',$sdl_compile),
+ (split(' ',$sdl_compile)),
@{ $defines->{$subsystem} },
( defined $Config{usethreads} ? ('-DUSE_THREADS', '-fPIC') : ('-fPIC' )),
],
extra_linker_flags =>
[
@{ $links->{$subsystem}{paths} },
- split(' ',$sdl_link),
+ (split(' ',$sdl_link)),
@{ $links->{$subsystem}{libs} },
],
},
'/usr/local/include/gl' => '/usr/local/lib',
'/usr/include/GL' => '/usr/lib',
'/usr/include/gl' => '/usr/lib',
+ '/opt/local/include/SDL' => '/opt/local/lib', # Mac Ports
+ '/opt/local/include' => '/opt/local/lib', # Mac Ports
'/System/Library/Frameworks/SDL_mixer.framework/Headers' => '../../lib',
'/System/Library/Frameworks/SDL_image.framework/Headers' => '../../lib',