From: Kartik Thakore Date: Wed, 12 Aug 2009 22:43:46 +0000 (-0400) Subject: Cygwin Fix X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b4880321a10f5e4379ca8c4ded9d5e2b8df1d1de;p=sdlgit%2FSDL_perl.git Cygwin Fix --- diff --git a/make/lib/SDL/Build/Cygwin.pm b/make/lib/SDL/Build/Cygwin.pm index 4258925..aee9d13 100644 --- a/make/lib/SDL/Build/Cygwin.pm +++ b/make/lib/SDL/Build/Cygwin.pm @@ -29,7 +29,8 @@ # package SDL::Build::Cygwin; - +use Data::Dumper; +use Carp; use base 'SDL::Build'; sub opengl_headers @@ -58,17 +59,36 @@ sub fetch_includes ); } -sub build_links +#Todo: his needs to be fixed hash references are a mess +#sub build_links +#{ + +# my $self = shift; +# my $links = $self->SUPER::build_links(@_); +# +# for my $subsystem (values %$links) +# { +# push @{ $subsystem{ libs } }, '-lpthreads'; +# } + +# return \%links; +#} + + +sub alt_link_flags { - my $self = shift; - my $links = $self->SUPER::build_links(); + my $self = shift; + my $sdl_dir = shift; - for my $subsystem (values %$links) - { - push @{ $subsystem{ libs } }, '-lpthreads'; - } + return $self->SUPER::alt_link_flags($sdl_dir).' -mwindows -lSDLmain -lSDL.dll'; +} + +sub alt_compile_flags +{ + my $self = shift; + my $sdl_dir = shift; - return $links; + return $self->SUPER::alt_compile_flags($sdl_dir).' -D_GNU_SOURCE=1 -Dmain=SDL_main'; } 1;