I noticed the Makefile was deleted. How does one build the following?
Â
VBA-M SDL for UNIX from UNIX
VBA-M SDL for UNIX from UNIX using x86 assembly
VBA-M SDL for Windows from Windows
VBA-M SDL for Windows from UNIX
Â
Thanks.
I noticed the Makefile was deleted. How does one build the following?
Â
VBA-M SDL for UNIX from UNIX
VBA-M SDL for UNIX from UNIX using x86 assembly
VBA-M SDL for Windows from Windows
VBA-M SDL for Windows from UNIX
Â
Thanks.
So, to build VBA-M SDL from Unix :
In the source code tree, run :
cmake .
make
make install
Â
The ASM core can't be built from Unix, because the asm code is not compatible with newer GCCs. However, the ASM scalers will be used if nasm is found.
Â
To build VBA-M SDL from Windows, you have to use a msys environment (with all the dependencies), and install cmake from http://www.cmake.org/
Then it builds exactly the same way as under Unix
Â
You can't build VBA-M SDL with the ASM core from Windows, that's a limitation of the cmake script. I'll try to fix that.
Â
I can restore the old Makefile if you want.
The ASM core can't be built from Unix, because the asm code is not compatible with newer GCCs. However, the ASM scalers will be used if nasm is found.
So if NASM is found, it will link HQXx in assembly, and otherwise C? I can't have fine control of that? (I regularly have systems with NASM installed that aren't x86, or situations where it is x86, but I want to test without it).
Â
To build VBA-M SDL from Windows, you have to use a msys environment (with all the dependencies), and install cmake from http://www.cmake.org/
Then it builds exactly the same way as under Unix
I find that to be ridiculous :ashamed:
Â
You also didn't answer the last question:
Â
VBA-M SDL for Windows from UNIX
<blockquote data-ipsquote="" class="ipsQuote" data-ipsquote-contentapp="forums" data-ipsquote-contenttype="forums" data-ipsquote-contentid="114" data-ipsquote-contentclass="forums_Topic"><div>
The ASM core can't be built from Unix, because the asm code is not compatible with newer GCCs. However, the ASM scalers will be used if nasm is found.
So if NASM is found, it will link HQXx in assembly, and otherwise C? I can't have fine control of that? (I regularly have systems with NASM installed that aren't x86, or situations where it is x86, but I want to test without it).
</div></blockquote>
I'm sorry, I was mistaken, the ASM scalers will only be used if you call cmake with :
cmake USEASM=1 .
Â
<blockquote data-ipsquote="" class="ipsQuote" data-ipsquote-contentapp="forums" data-ipsquote-contenttype="forums" data-ipsquote-contentid="114" data-ipsquote-contentclass="forums_Topic"><div>
To build VBA-M SDL from Windows, you have to use a msys environment (with all the dependencies), and install cmake from http://www.cmake.org/
Then it builds exactly the same way as under Unix
I find that to be ridiculous :ashamed:
</div></blockquote>
I'm sorry if it is the standard way to build Unix programs under Windows. Most programs use the autotools wich require msys. I consider cmake as just another package for mingw.
Â
You also didn't answer the last question:
<blockquote data-ipsquote="" class="ipsQuote" data-ipsquote-contentapp="forums" data-ipsquote-contenttype="forums" data-ipsquote-contentid="114" data-ipsquote-contentclass="forums_Topic"><div>
VBA-M SDL for Windows from UNIX
</div></blockquote>
I'm no specialist of cross compilation. I guess it can be done in a similar way to the old Makefile.
I'm sorry, I was mistaken, the ASM scalers will only be used if you call cmake with :
cmake USEASM=1 .
Okay, thank you.
Â
<blockquote data-ipsquote="" class="ipsQuote" data-ipsquote-contentapp="forums" data-ipsquote-contenttype="forums" data-ipsquote-contentid="114" data-ipsquote-contentclass="forums_Topic"><div>
<blockquote data-ipsquote="" class="ipsQuote" data-ipsquote-contentapp="forums" data-ipsquote-contenttype="forums" data-ipsquote-contentid="114" data-ipsquote-contentclass="forums_Topic"><div>
To build VBA-M SDL from Windows, you have to use a msys environment (with all the dependencies), and install cmake from http://www.cmake.org/
Then it builds exactly the same way as under Unix
I find that to be ridiculous :ashamed:
</div></blockquote>
I'm sorry if it is the standard way to build Unix programs under Windows. Most programs use the autotools wich require msys. I consider cmake as just another package for mingw.
</div></blockquote>
We didn't require autotools or msys to build the SDL port on Windows before. I don't mind requiring cmake, but if we're requiring cmake, and it needs to be used through msys, I think that is getting out of hand.
Â
<blockquote data-ipsquote="" class="ipsQuote" data-ipsquote-contentapp="forums" data-ipsquote-contenttype="forums" data-ipsquote-contentid="114" data-ipsquote-contentclass="forums_Topic"><div>
You also didn't answer the last question:
<blockquote data-ipsquote="" class="ipsQuote" data-ipsquote-contentapp="forums" data-ipsquote-contenttype="forums" data-ipsquote-contentid="114" data-ipsquote-contentclass="forums_Topic"><div>
VBA-M SDL for Windows from UNIX
</div></blockquote>
I'm no specialist of cross compilation. I guess it can be done in a similar way to the old Makefile.
</div></blockquote>
So can we setup cross compilation somehow with cmake? Because I have no idea how to use cmake. It just means we have to change the calls to GCC and NASM, and a couple of flags.
We didn't require autotools or msys to build the SDL port on Windows before. I don't mind requiring cmake, but if we're requiring cmake, and it needs to be used through msys, I think that is getting out of hand.
Oh, I just thought about it: you can generate VS projects using cmake. It has a nice GUI for Windows to do so. I've not tested it though.
Â
So can we setup cross compilation somehow with cmake? Because I have no idea how to use cmake. It just means we have to change the calls to GCC and NASM, and a couple of flags.
I just found that :
http://www.cmake.org/Wiki/CMake_Cross_Compiling
It looks like all you have to do is creating a "toolchain file" corresponding to the target platform.
<blockquote data-ipsquote="" class="ipsQuote" data-ipsquote-contentapp="forums" data-ipsquote-contenttype="forums" data-ipsquote-contentid="114" data-ipsquote-contentclass="forums_Topic"><div>
We didn't require autotools or msys to build the SDL port on Windows before. I don't mind requiring cmake, but if we're requiring cmake, and it needs to be used through msys, I think that is getting out of hand.
Oh, I just thought about it: you can generate VS projects using cmake. It has a nice GUI for Windows to do so. I've not tested it though.
</div></blockquote>
Last thing I want is a VS project. I'd like a Makefile for MinGW, and a Makefile for cl.exe
Â
<blockquote data-ipsquote="" class="ipsQuote" data-ipsquote-contentapp="forums" data-ipsquote-contenttype="forums" data-ipsquote-contentid="114" data-ipsquote-contentclass="forums_Topic"><div>
So can we setup cross compilation somehow with cmake? Because I have no idea how to use cmake. It just means we have to change the calls to GCC and NASM, and a couple of flags.
I just found that :
http://www.cmake.org/Wiki/CMake_Cross_Compiling
It looks like all you have to do is creating a "toolchain file" corresponding to the target platform.
</div></blockquote>
Can you give me a hand in making such a thing?
Well, I went to install cmake, 20MB, why so huge?
Â
Well, I just tried to edit this, I made these changes:
Â
Code: Select all
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt (revision 557)
+++ CMakeLists.txt (working copy)
@@ -3,6 +3,12 @@
INCLUDE(CMakeScripts/CMakeDetermineASMCompiler.cmake)
INCLUDE(CMakeScripts/CMakeASMInformation.cmake)
+IF ( WINCROSS )
+ SET( CMAKE_C_COMPILER i586-mingw32-gcc )
+ SET( CMAKE_CXX_COMPILER i586-mingw32-g++ )
+ SET( WIN32 1 )
+ENDIF ( WINCROSS )
+
PROJECT(VBA-M ASM C CXX)
FIND_PACKAGE ( ZLIB REQUIRED )
@@ -44,7 +50,11 @@
ADD_DEFINITIONS (-DVERSION='"${VERSION}"' -DPKGDATADIR='"${PKGDATADIR}"' -DPACKAGE='')
-SET( CMAKE_ASM_FLAGS "-Isrc/hq/asm/ -O1 -DELF")
+IF ( WIN32 )
+ SET( CMAKE_ASM_FLAGS "-Isrc/hq/asm/ -O1")
+ELSE ( WIN32 )
+ SET( CMAKE_ASM_FLAGS "-Isrc/hq/asm/ -O1 -DELF")
+ENDIF ( WIN32 )
SET( CMAKE_C_FLAGS "-O3 -Wall")
SET( CMAKE_CXX_FLAGS "-O3 -Wall")
And ran with "cmake WINCROSS=1 .", and it still builds the exact same file. It's not using the compilers I told it to.
Â
Furthermore, is there anyway I can see what it's actually doing? This percentage thing instead of build commands is EXTREMELY annoying.
To display all the commands :
make VERBOSE=1
(set CMAKE_VERBOSE_MAKEFILE to 1 to enable it by default)
Â
To pass an argument :
cmake -DWINCROSS=1 .
Â
To generate a MinGW Makefile :
cmake -G "MinGW Makefiles" .
Â
To generate a NMake Makefile :
cmake -G "NMake Makefile" .