annotate src/main/win32/exports/gendef.pl @ 1484:b2b476a4a73c

Added documentation on how to build a completely useless SDL library. :)
author Sam Lantinga <slouken@libsdl.org>
date Wed, 08 Mar 2006 08:30:17 +0000
parents 6c7b69218276
children
rev   line source
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1 #!/usr/bin/perl
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
2 #
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
3 # Program to take a set of header files and generate DLL export definitions
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
4
1317
6c7b69218276 Updated exports
Sam Lantinga <slouken@libsdl.org>
parents: 930
diff changeset
5 # Special exports to ignore for this platform
6c7b69218276 Updated exports
Sam Lantinga <slouken@libsdl.org>
parents: 930
diff changeset
6 $exclude{"SDL_CreateThread_Core"} = 1;
6c7b69218276 Updated exports
Sam Lantinga <slouken@libsdl.org>
parents: 930
diff changeset
7
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
8 while ( ($file = shift(@ARGV)) ) {
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
9 if ( ! defined(open(FILE, $file)) ) {
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
10 warn "Couldn't open $file: $!\n";
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
11 next;
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
12 }
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
13 $file =~ s,.*/,,;
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
14 while (<FILE>) {
930
02759105b989 Date: Fri, 20 Aug 2004 08:31:20 +0200
Sam Lantinga <slouken@libsdl.org>
parents: 345
diff changeset
15 if ( / DECLSPEC.* SDLCALL ([^\s\(]+)/ ) {
1317
6c7b69218276 Updated exports
Sam Lantinga <slouken@libsdl.org>
parents: 930
diff changeset
16 if ( not $exclude{$1} ) {
6c7b69218276 Updated exports
Sam Lantinga <slouken@libsdl.org>
parents: 930
diff changeset
17 print "\t$1\n";
6c7b69218276 Updated exports
Sam Lantinga <slouken@libsdl.org>
parents: 930
diff changeset
18 }
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
19 }
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
20 }
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
21 close(FILE);
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
22 }
1317
6c7b69218276 Updated exports
Sam Lantinga <slouken@libsdl.org>
parents: 930
diff changeset
23
6c7b69218276 Updated exports
Sam Lantinga <slouken@libsdl.org>
parents: 930
diff changeset
24 # Special exports to include for this platform
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
25 print "\tSDL_RegisterApp\n";
145
29a638dc26db Applied David MacCormack's patch to fix SDL_WINDOWID on Windows,
Sam Lantinga <slouken@libsdl.org>
parents: 0
diff changeset
26 print "\tSDL_SetModuleHandle\n";
1317
6c7b69218276 Updated exports
Sam Lantinga <slouken@libsdl.org>
parents: 930
diff changeset
27 print "\tSDL_UnregisterApp\n";