[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-smalltalk] Cairo + SDL
From: |
Tony Garnock-Jones |
Subject: |
Re: [Help-smalltalk] Cairo + SDL |
Date: |
Wed, 16 Apr 2008 10:35:53 +0100 |
User-agent: |
Thunderbird 2.0.0.12 (Macintosh/20080213) |
Hi Paolo,
Paolo Bonzini wrote:
Thanks! It does not work on Mac OS, but it's a nice feat.
It does (lots of the dev work was done on OS X leopard) - but not with
the out-of-the-box gst. What's required is a gst binary that #includes
sdlmain.
I've attached the stub main file along with the changes to Makefile.am.
I've no idea how this might be cleanly added to the main tree :-)
Brad Watson assigned his code to the FSF so it's not impossible to
change the license. It makes sense since SDL itself is under the LGPL.
I'll ask him and the FSF people about it.
That would be good. Thank you!
Tony
diff --git a/Makefile.am b/Makefile.am
--- a/Makefile.am
+++ b/Makefile.am
@@ -97,19 +97,28 @@ AM_CPPFLAGS = -I$(top_srcdir)/libgst \
-DKERNEL_PATH=\"$(pkgdatadir)/kernel\" \
-DIMAGE_PATH=\"$(imagedir)\"
-bin_PROGRAMS = gst
+bin_PROGRAMS = gst sdl-gst
gst_SOURCES = main.c
gst_LDADD = libgst/libgst.la @ICON@
gst_DEPENDENCIES = libgst/libgst.la @ICON@
gst_LDFLAGS = -export-dynamic
+sdl_gst_SOURCES = sdlgstmain.c
+sdl_gst_LDADD = libgst/libgst.la @ICON@
+sdl_gst_DEPENDENCIES = libgst/libgst.la @ICON@
+sdl_gst_LDFLAGS = -export-dynamic `sdl-config --libs`
+
if ENABLE_DISASSEMBLER
gst_LDADD += opcode/libdisass.la
gst_DEPENDENCIES += opcode/libdisass.la
+sdl_gst_LDADD += opcode/libdisass.la
+sdl_gst_DEPENDENCIES += opcode/libdisass.la
AM_CPPFLAGS += -I$(top_srcdir)/opcode
endif
+sdl_gst_CPPFLAGS = $(AM_CPPFLAGS) `sdl-config --cflags`
+
# The single gst-tool executable is installed with multiple names, hence
# we use noinst here.
noinst_PROGRAMS = gst-tool
#define main sdlgstmain
#include "main.c"
#undef main
#include <SDL_main.h>
int main(int argc, char *argv[]) {
return sdlgstmain(argc, argv);
}