Stephane-D / SGDK

SGDK - A free and open development kit for the Sega Mega Drive
https://www.patreon.com/SGDK
MIT License
1.74k stars 187 forks source link

Added CMakeLists.txt to create SGDK libs and host based utilities. #314

Closed iratahack closed 7 months ago

iratahack commented 7 months ago

I messed up the previous pullrequest. This is a clean one with only the cmake updated.

To build the libraries, follow the instructions below...

Ensure the PREFIX and GDK env vars are set.

export PREFIX=m68k-elf- export GDK=~/SGDK

cmake -S $GDK -B $GDK/build_release -DCMAKE_BUILD_TYPE=Release cmake --build $GDK/build_release cmake -S $GDK -B $GDK/build_debug -DCMAKE_BUILD_TYPE=Debug cmake --build $GDK/build_debug

This build file also includes building of the following native utilities.

bintos xgmtool sjasm

iratahack commented 7 months ago

I see you're enumerating each SGDK source file here, mean that it need to be updated on each SGDK update. Is there any way to use wildcard to always select all files ?

Yeah, I was thinking the same thing. I beleive there is a way. I'll push an update.

iratahack commented 7 months ago

@Stephane-D , these changes should do it. Compiling is much faster under msys when using the Ninja generator.

Stephane-D commented 7 months ago

Thanks for taking the time to fix it !