diff --git a/CMakeLists.txt b/CMakeLists.txt index 8ec618d..32c4795 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,6 +13,7 @@ set(MACHDEP "-DGEKKO -mrvl -mcpu=750 -meabi -mhard-float") set(CMAKE_C_FLAGS "${CMAKE_CXX_FLAGS} ${MACHDEP}") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${MACHDEP}") +set(CMAKE_EXECUTABLE_SUFFIX ".elf") add_custom_target(run) diff --git a/build.sh b/build.sh index 152587f..1b037ac 100755 --- a/build.sh +++ b/build.sh @@ -2,5 +2,5 @@ mkdir -p build cd build -cmake -DCMAKE_TOOLCHAIN_FILE=../toolchain-powerpc.cmake .. +cmake -DCMAKE_TOOLCHAIN_FILE=../toolchain-powerpc.cmake -G "Unix Makefiles" .. make diff --git a/toolchain-powerpc.cmake b/toolchain-powerpc.cmake index e7588d8..7cd3747 100644 --- a/toolchain-powerpc.cmake +++ b/toolchain-powerpc.cmake @@ -18,8 +18,14 @@ if(NOT LIBOGCDIR) set(LIBOGCDIR ${DEVKITPRO}/libogc) endif() -set(CMAKE_C_COMPILER ${DEVKITPPC}/bin/powerpc-eabi-gcc) -set(CMAKE_CXX_COMPILER ${DEVKITPPC}/bin/powerpc-eabi-g++) +if(WIN32) + set(CMAKE_C_COMPILER ${DEVKITPPC}/bin/powerpc-eabi-gcc.exe) + set(CMAKE_CXX_COMPILER ${DEVKITPPC}/bin/powerpc-eabi-g++.exe) +else() + set(CMAKE_C_COMPILER ${DEVKITPPC}/bin/powerpc-eabi-gcc) + set(CMAKE_CXX_COMPILER ${DEVKITPPC}/bin/powerpc-eabi-g++) +endif() + set(CMAKE_FIND_ROOT_PATH ${DEVKITPPC}) set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)