view src/main/macosx/exports/gendef.pl @ 1445:0133f0ca5de7

Need this or things might misbuild on G3 Mac OS, I think. Potentially fixes Bugzilla #148.
author Ryan C. Gordon <icculus@icculus.org>
date Mon, 27 Feb 2006 01:32:12 +0000
parents 6c7b69218276
children 4d241ea8a1cd
line wrap: on
line source

#!/usr/bin/perl
#
# Program to take a set of header files and generate DLL export definitions

# Special exports to ignore for this platform
$exclude{"SDL_putenv"} = 1;
$exclude{"SDL_getenv"} = 1;
$exclude{"SDL_CreateThread_Core"} = 1;

while ( ($file = shift(@ARGV)) ) {
	if ( ! defined(open(FILE, $file)) ) {
		warn "Couldn't open $file: $!\n";
		next;
	}
	$file =~ s,.*/,,;
	while (<FILE>) {
		if ( / DECLSPEC.* SDLCALL ([^\s\(]+)/ ) {
			if ( not $exclude{$1} ) {
				print "\t_$1\n";
			}
		}
	}
	close(FILE);
}

# Special exports to include for this platform
print "\t.objc_class_name_SDL_QuartzWindow\n";
print "\t.objc_class_name_SDL_QuartzWindowDelegate\n";