Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old June 24, 2013, 19:55   #1
TricksterWolf
Scout
 
Join Date: Sep 2012
Posts: 43
TricksterWolf is on a distinguished road
Cross-compiling for Windows.

I'm starting a separate thread since I've hit a soft wall and I now know what the problem is.

I have angband compiling and running, but it currently runs through Cygwin. Looking at Makefile.win, it should have been created as a native Windows executable, and this is what I want (I don't need Posix emulation, etc.).

What do I need to modify in Makefile.win for this to compile as a Windows executable? Currently I'm calling Makefile.win with MINGW=yes as an option, but the cross-compiler isn't producing a Windows executable--it's producing a Cygwin executable.

I'm a bit lost at this point because the makefile is a bit complicated so I'd rather not use trial-and-error if there's a simple solution.

Thanks as always. I'll get this thing to work even if it kills me.
TricksterWolf is offline   Reply With Quote
Old June 24, 2013, 20:11   #2
TricksterWolf
Scout
 
Join Date: Sep 2012
Posts: 43
TricksterWolf is on a distinguished road
Success!!!

The problem was discussed here:
http://angband.oook.cz/forum/showthread.php?t=4888

Apparently adding CROSS=i686-pc-mingw32- will fix the issue for Cygwin cross-compile. In the thread above, it failed to work, but this was a fault of an older Makefile.win.

I also had to undo the changes to z-file.c, not surprisingly. I had thought that was the issue there!

In summary, if you want to compile a Windows executable, the proper commands for clean and build are:

${MAKE} MINGW=yes -f Makefile.win clean

${MAKE} MINGW=yes CROSS=i686-pc-mingw32- -f Makefile.win

Good Luna this has been a misadventure. Happily able to start work on my variant, however, so no complaints here.
TricksterWolf is offline   Reply With Quote
Reply

Tags
cross-compile, cygwin, makefile, mingw, windows


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
T2 Linux -> Windows cross-compile with CMake? Therem Harth ToME 0 December 16, 2012 18:00
Compiling V for Windows Therem Harth Vanilla 8 September 5, 2011 00:36
Compiling Z+Angband under Windows Altefcat Variants 8 December 11, 2008 10:44
(cross)Compiling for Nokia 770 / N800 Tablets pupnik Vanilla 13 March 25, 2008 00:19
Windows Compiling and Makefiles APWhite Vanilla 11 August 22, 2007 22:22


All times are GMT +1. The time now is 13:44.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.