Skip to content

Commit

Permalink
Updated exports
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Feb 1, 2006
1 parent 63c620c commit 6b5989a
Show file tree
Hide file tree
Showing 11 changed files with 51 additions and 26 deletions.
5 changes: 3 additions & 2 deletions src/main/beos/exports/Makefile
Expand Up @@ -11,11 +11,11 @@ HEADERS = \
../../../../include/SDL_endian.h \
../../../../include/SDL_error.h \
../../../../include/SDL_events.h \
../../../../include/SDL_getenv.h \
../../../../include/SDL_joystick.h \
../../../../include/SDL_keyboard.h \
../../../../include/SDL_keysym.h \
../../../../include/SDL_loadso.h \
../../../../include/SDL_main.h \
../../../../include/SDL_mouse.h \
../../../../include/SDL_mutex.h \
../../../../include/SDL_quit.h \
Expand All @@ -27,9 +27,10 @@ HEADERS = \
../../../../include/SDL_version.h \
../../../../include/SDL_video.h


all: $(EXPORTS)

$(EXPORTS): $(HEADERS)
$(EXPORTS): Makefile genexp.pl $(HEADERS)
perl genexp.pl $(HEADERS) >$@ || rm $@

clean:
Expand Down
3 changes: 0 additions & 3 deletions src/main/beos/exports/SDL.exp
Expand Up @@ -86,9 +86,6 @@ _SDL_GetKeyName
_SDL_LoadObject
_SDL_LoadFunction
_SDL_UnloadObject
_SDL_SetModuleHandle
_SDL_RegisterApp
_SDL_InitQuickDraw
_SDL_GetMouseState
_SDL_GetRelativeMouseState
_SDL_WarpMouse
Expand Down
12 changes: 10 additions & 2 deletions src/main/beos/exports/genexp.pl
Expand Up @@ -2,6 +2,11 @@
#
# Program to take a set of header files and generate MWCC 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";
Expand All @@ -10,9 +15,12 @@
$file =~ s,.*/,,;
while (<FILE>) {
if ( / DECLSPEC.* SDLCALL ([^\s\(]+)/ ) {
print "_$1\n";
if ( not $exclude{$1} ) {
print "_$1\n";
}
}
}
close(FILE);
}
# Special exports not public in the header files

# Special exports to include for this platform
2 changes: 1 addition & 1 deletion src/main/macos/exports/Makefile
Expand Up @@ -30,7 +30,7 @@ HEADERS = \

all: $(EXPORTS)

$(EXPORTS): $(HEADERS)
$(EXPORTS): Makefile gendef.pl $(HEADERS)
perl gendef.pl $(HEADERS) >$@ || rm $@

clean:
Expand Down
10 changes: 8 additions & 2 deletions src/main/macos/exports/gendef.pl
Expand Up @@ -2,6 +2,9 @@
#
# Program to take a set of header files and generate DLL export definitions

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

while ( ($file = shift(@ARGV)) ) {
if ( ! defined(open(FILE, $file)) ) {
warn "Couldn't open $file: $!\n";
Expand All @@ -11,10 +14,13 @@
$file =~ s,.*/,,;
while (<FILE>) {
if ( / DECLSPEC.* SDLCALL ([^\s\(]+)/ ) {
print "\t$1\n";
if ( not $exclude{$1} ) {
print "\t$1\n";
}
}
}
close(FILE);
}
# Special exports not in the header files

# Special exports to include for this platform
print "\tSDL_InitQuickDraw\n";
3 changes: 2 additions & 1 deletion src/main/macosx/exports/Makefile
Expand Up @@ -11,6 +11,7 @@ HEADERS = \
../../../../include/SDL_endian.h \
../../../../include/SDL_error.h \
../../../../include/SDL_events.h \
../../../../include/SDL_getenv.h \
../../../../include/SDL_joystick.h \
../../../../include/SDL_keyboard.h \
../../../../include/SDL_keysym.h \
Expand All @@ -29,7 +30,7 @@ HEADERS = \

all: $(EXPORTS)

$(EXPORTS): $(HEADERS)
$(EXPORTS): Makefile gendef.pl $(HEADERS)
perl gendef.pl $(HEADERS) >$@ || rm $@

clean:
Expand Down
4 changes: 2 additions & 2 deletions src/main/macosx/exports/SDL.x
@@ -1,5 +1,3 @@
.objc_class_name_SDL_QuartzWindow
.objc_class_name_SDL_QuartzWindowDelegate
_SDL_Init
_SDL_InitSubSystem
_SDL_QuitSubSystem
Expand Down Expand Up @@ -188,3 +186,5 @@
_SDL_WM_ToggleFullScreen
_SDL_WM_GrabInput
_SDL_SoftStretch
.objc_class_name_SDL_QuartzWindow
.objc_class_name_SDL_QuartzWindowDelegate
16 changes: 11 additions & 5 deletions src/main/macosx/exports/gendef.pl
Expand Up @@ -2,21 +2,27 @@
#
# Program to take a set of header files and generate DLL export definitions

# print objective-c exports
print "\t.objc_class_name_SDL_QuartzWindow\n";
print "\t.objc_class_name_SDL_QuartzWindowDelegate\n";
# 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;
}
$printed_header = 0;
$file =~ s,.*/,,;
while (<FILE>) {
if ( / DECLSPEC.* SDLCALL ([^\s\(]+)/ ) {
print "\t_$1\n";
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";
4 changes: 2 additions & 2 deletions src/main/win32/exports/Makefile
Expand Up @@ -11,11 +11,11 @@ HEADERS = \
../../../../include/SDL_endian.h \
../../../../include/SDL_error.h \
../../../../include/SDL_events.h \
../../../../include/SDL_getenv.h \
../../../../include/SDL_joystick.h \
../../../../include/SDL_keyboard.h \
../../../../include/SDL_keysym.h \
../../../../include/SDL_loadso.h \
../../../../include/SDL_main.h \
../../../../include/SDL_mouse.h \
../../../../include/SDL_mutex.h \
../../../../include/SDL_quit.h \
Expand All @@ -30,7 +30,7 @@ HEADERS = \

all: $(EXPORTS)

$(EXPORTS): $(HEADERS)
$(EXPORTS): Makefile gendef.pl $(HEADERS)
perl gendef.pl $(HEADERS) >$@ || rm $@

clean:
Expand Down
6 changes: 3 additions & 3 deletions src/main/win32/exports/SDL.def
Expand Up @@ -61,6 +61,8 @@
SDL_SetEventFilter
SDL_GetEventFilter
SDL_EventState
SDL_putenv
SDL_getenv
SDL_NumJoysticks
SDL_JoystickName
SDL_JoystickOpen
Expand All @@ -86,9 +88,6 @@
SDL_LoadObject
SDL_LoadFunction
SDL_UnloadObject
SDL_SetModuleHandle
SDL_RegisterApp
SDL_InitQuickDraw
SDL_GetMouseState
SDL_GetRelativeMouseState
SDL_WarpMouse
Expand Down Expand Up @@ -191,3 +190,4 @@
SDL_SoftStretch
SDL_RegisterApp
SDL_SetModuleHandle
SDL_UnregisterApp
12 changes: 9 additions & 3 deletions src/main/win32/exports/gendef.pl
Expand Up @@ -2,20 +2,26 @@
#
# Program to take a set of header files and generate DLL export definitions

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

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

# Special exports to include for this platform
print "\tSDL_RegisterApp\n";
print "\tSDL_SetModuleHandle\n";
print "\tSDL_UnregisterApp\n";

0 comments on commit 6b5989a

Please sign in to comment.