Fixed stupid errors and added regex sub fix for windows path seperator
[sdlgit/SDL_perl.git] / make / lib / SDL / Build.pm
index 37354a7..fc37fe1 100644 (file)
@@ -44,7 +44,7 @@ use Config;
 sub process_xs
 {
        my ($self, $file) = @_;
-
+               
        my $properties                   = $self->{properties};
        my $file_args                    = $self->notes( 'file_flags' )->{$file};
        my @old_values                   = @$properties{ keys %$file_args };
@@ -223,6 +223,8 @@ sub write_sdl_config
        print $file $text;
 }
 
+
+
 # Subclass  Darwin to build Objective-C addons
 
 sub filter_support {
@@ -248,10 +250,30 @@ sub process_support_files {
        }
 }
 
+# get link flags with a given a sdl_dir
+sub alt_link_flags
+{
+       my $self = shift;
+       my $sdl_dir = shift;
+
+       return '-L"'.$sdl_dir.'\lib"';
+}
+
+# get compile flags with a given a sdl_dir
+sub alt_compile_flags
+{
+        my $self = shift;
+        my $sdl_dir = shift;
+
+        return '-I"'.$sdl_dir.'\include\SDL"'; 
+}
+
 # Override to create a MacOS Bundle
-sub build_bundle
+sub ACTION_bundle
 {
-       return;
+       my ($self) = @_;
+       $self->depends_on('build');
+       $self->get_arch($^O)->build_bundle();
 }
 
 # Override Install method for darwin
@@ -259,7 +281,6 @@ sub ACTION_install {
   my ($self) = @_;
   require ExtUtils::Install;
   $self->depends_on('build');
-  $self->get_arch($^O)->build_bundle();
   ExtUtils::Install::install($self->install_map, 1, 0, $self->{args}{uninst}||0);
 }