Last active
September 10, 2016 10:48
-
-
Save noidi/ad21ec027d83250ef3a5c2f1c187facf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <SDL2/SDL.h> | |
#include <gtmxc_types.h> | |
void m_SDL_Init(int c, gtm_ulong_t flags, gtm_long_t* result) { | |
printf("Calling SDL_Init with 0x%lx... ", flags); | |
*result = SDL_Init(flags); | |
printf("Done!\n"); | |
fflush(stdout); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$PWD/m_sdl.so | |
init: void m_SDL_Init(I:gtm_ulong_t, O:gtm_long_t*) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
file 'm_sdl.so' => 'm_sdl.c' do | |
sh 'gcc -shared -fpic -o m_sdl.so -Wall -Werror -std=gnu99 m_sdl.c -I/opt/gtm -O3 $(sdl2-config --cflags --libs)' | |
end | |
file 'trumps.o' => 'trumps.m' do | |
sh 'mumps trumps.m' | |
end | |
task :run => ['trumps.o', 'm_sdl.so'] do | |
sh 'env GTMXC_sdl=m_sdl.xc mumps -run trumps' | |
end | |
task :clean do | |
sh 'rm -rf *.o *.so' | |
end | |
task :default => :run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sdl | |
InitVideo() quit 32 | |
init(flags) | |
do &sdl.init(flags,.result) | |
quit result |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
write $$init^sdl($$InitVideo^sdl) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment