SDL-mirror/src/main/macosx/exports/gendef.pl
Sam Lantinga 61549bf6a5 Updated MacOS Classic build
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401520
2006-03-13 05:36:42 +00:00

28 lines
658 B
Perl

#!/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;
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 "\tSDL_iconv_string\n";
print "\t.objc_class_name_SDL_QuartzWindow\n";
print "\t.objc_class_name_SDL_QuartzWindowDelegate\n";