Added makefile for ease of compilation

This commit is contained in:
Anna Rose 2011-06-21 16:24:48 -04:00
parent ebe97a9264
commit 2ce5e62829
3 changed files with 19 additions and 3 deletions

11
Makefile Normal file
View File

@ -0,0 +1,11 @@
# winegcc is required to compile this program correctly, because
# we need access to some Linux API
ALL: steamstub.exe
steamstub.exe: steamstub.c
winegcc -m32 -o $@ steamstub.c
mv steamstub.exe.so steamstub.exe
clean:
rm -f steamstub.exe steamstub.exe.so

View File

@ -1,17 +1,22 @@
/* steamstub.c - A Windows program for Linux
Useful as a wrapper to execute a Linux binary from Windows, and block on its
return (i.e. getting the Linux system() functionality for Linux binaries from
inside Windows binaries, such as Steam)
compile it with:
mingw32-gcc -o steamstub.exe steamstub.c
make
nb: on fedora, the mingw32 C compiler is called i686-pc-mingw32-gcc
*/
#include <windows.h>
#include <stdlib.h>
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
MessageBox (NULL, "The Steam Stub is now running. Go play your Linux game, and come back and click the 'OK' button on this dialog box once you are done playing it." , "Steam Stub", 0);
system("gedit");
return 0;
}

Binary file not shown.