Shooting in the dark indeed!
Yes, MSYS is in C:\msys\1.0\ on my hard drive, so I installed both openxdk and Samples_0.07 directories with it:
$ ls /
Samples_0.07 doc home mingw msys.ico uninstall
bin etc m.ico msys.bat openxdk
As you can see, now everything is directly shown under /. I then edited again my makefile:
# update this variable to wherever you installed the OpenXDK libraries
#PREFIX = /usr/local/openxdk
PREFIX = /openxdk
#CC = i386-pc-xbox-gcc
#CPP = i386-pc-xbox-g++
#CXBE = cxbe
CC = gcc
CPP = g++
CXBE = /openxdk/bin/cxbe
And it's time for a test...
gcc -c comingSoon.c -c -g -std=gnu99 -ffreestanding -nostdlib -fno-builtin -fno-exceptions -mno-cygwin -march=i386 -DENABLE_XBOX -DDISABLE_CDROM -I/openxdk/i386-pc-xbox/include -I/openxdk/include -I/openxdk/include/SDL
gcc -o comingSoon.exe comingSoon.o -L/openxdk/i386-pc-xbox/lib -L/openxdk/lib -lSDL -lopenxdk -lhal -lc -lhal -lusb -lc -lxboxkrnl -nostdlib -Wl,--file-alignment,0x20 -Wl,--section-alignment,0x20 -shared -Wl,--entry,_WinMainCRTStartup -Wl,--strip-all
/openxdk/bin/cxbe -TITLE:'comingSoon.exe' -DUMPINFO:"comingSoon.cxbe" -OUT:"comingSoon.xbe" comingSoon.exe > /dev/null
C:\msys\1.0\mingw\bin\mingw32-make.exe: *** [comingSoon.exe] Error 53
...with an error message popping in my face like: "cxbe.exe: cygwin1.dll not found"
But wait a minute...
WHOA! It actually compiled the 1st file! I have a fresh comingSoon.exe and comingSoon.o in my directory! So it's MSYS's fault after all! I should shoot in the dark more often!!!
With the invalid directory thingy found, I'd bet that /dev/null isn't working either...
$ ls -al /dev
ls: /dev: No such file or directory
...seems to be confirmed: there's not even a /dev directory! So instead I'll completely change my makefile to output in a dummy file: dummy.txt. So I've changed every reference fo /dev/null with dummy.txt in the make file:
(no I won't post the whole thing just for that!)
New test... exact same error message. Maybe it's not /dev/null... let's try something simplier:
$ echo doh
$ echo doh > /dev/null
$ echo doh > dummy.txt
...and dummy.txt created with "doh". Well everything works there, so it's not again a bug in MSYS. Uh-oh... could it be that CXBE is a Linux program? I closed MSYS and directly tried to open CXBE.EXE from Windows:
"cxbe.exe: cygwin1.dll not found"
It indeed is a Linux program! Crap! This is the lamest problem I couldn't ever thought: how to convert an EXE to an XBE in Windows! LAME LAME LAME! (Boy I sound creepy!)
Well unless I ask Caustik to do it I think I think I'll need to find the source of CXBE (I think it's in openxdk's source) and recompile it for Windows... hope it won't be too tedious!
Hey wait a minute... now that I think of it, I thought I've already tried converting EXEs in XBEs directly in Windows and it was working. What's going on? Just to be sure, I just downloaded CXBE directly from the tools section of Xbox-Scene... guess what? This time it shows a help message in a DOS command shell! I go back to the OpenXDK's CXBE... still that missing cygwin1.dll...
So I tried replacing the OpenXDK's CXBE (after renaming it) to Xbox-Scene's CXBE and execute the same makefile again. Guess what: IT WORKED! ALL FILES COMPILED AND ARE CONVERTED!!!
And when I compare file sizes between Cygwin's compilation and MinGW's compilation, they match! Although when I compare both files, they do have some small differences, I don't think it will be a problem (maybe not the same version of GCC?)
Well I'm seriously happy!
Thanks d0wnlab for your "shooting in the dark" suggestion, sometimes even those work! I'll confirm tommorow if indeed the XBE files works on my softmodded Xbox. (Now it's 01:07 AM for me and I'm in serious need of sleep!) I'll write a bug report to MinGW's team about that semi-hidden /c directory, and if my final test on my Xbox works I'll also ask OpenXDK's team to add the Windows version of CXBE in their package and update their notice on their website about MinGW.
Now I own you 2, d0wnlab! First Cygwin and then (unexpectedly) MinGW! Meanwhile, have more pop-corn!