-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5ad21aa
commit e895f53
Showing
5 changed files
with
110 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/sh | ||
#make flex/flex | ||
#make byacc/yacc | ||
|
||
export OPENJKDF2_RELEASE_COMMIT=$(git log -1 --format="%H") | ||
export OPENJKDF2_RELEASE_COMMIT_SHORT=$(git rev-parse --short=8 HEAD) | ||
|
||
#NDK_TOOLCHAIN_BINS=$(dirname $(find "$ANDROID_NDK_HOME/" -name "aarch64-linux-android31-clang")) | ||
#PATH=$PATH:$NDK_TOOLCHAIN_BINS | ||
|
||
#rm -rf build_win64 | ||
mkdir -p build_nintendo_dsi && cd build_nintendo_dsi | ||
OPENJKDF2_BUILD_DIR=$(pwd) | ||
|
||
# Prevent macOS headers from getting linked in | ||
export -n SDKROOT MACOSX_DEPLOYMENT_TARGET CPLUS_INCLUDE_PATH C_INCLUDE_PATH | ||
|
||
cmake .. --toolchain $(pwd)/../cmake_modules/toolchain_twl.cmake && make -j10 openjkdf2 | ||
cd .. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
macro(plat_initialize) | ||
message( STATUS "Targeting Nintendo DSi" ) | ||
|
||
set(BIN_NAME "openjkdf2") | ||
|
||
#add_definitions(-DARCH_WASM) | ||
|
||
# These are the standard features for full game support | ||
set(TARGET_USE_PHYSFS FALSE) | ||
#set(TARGET_USE_BASICSOCKETS TRUE) | ||
set(TARGET_USE_GAMENETWORKINGSOCKETS FALSE) | ||
set(TARGET_USE_LIBSMACKER TRUE) | ||
set(TARGET_USE_LIBSMUSHER TRUE) | ||
set(TARGET_USE_SDL2 FALSE) | ||
set(TARGET_USE_OPENGL FALSE) | ||
set(TARGET_USE_OPENAL FALSE) | ||
set(TARGET_POSIX TRUE) | ||
set(TARGET_NO_BLOBS TRUE) | ||
set(TARGET_CAN_JKGM FALSE) | ||
set(OPENJKDF2_NO_ASAN TRUE) | ||
set(TARGET_USE_CURL FALSE) | ||
set(TARGET_FIND_OPENAL FALSE) | ||
|
||
if(OPENJKDF2_USE_BLOBS) | ||
set(TARGET_NO_BLOBS FALSE) | ||
endif() | ||
|
||
set(TARGET_BUILD_TESTS FALSE) | ||
set(SDL2_COMMON_LIBS "") | ||
|
||
set(TARGET_TWL TRUE) | ||
|
||
add_link_options(-fno-exceptions) | ||
add_compile_options(-fno-exceptions) | ||
add_compile_options(-O2 -Wuninitialized -fshort-wchar -Wall -Wno-unused-variable -Wno-parentheses -Wno-missing-braces) | ||
endmacro() | ||
|
||
macro(plat_specific_deps) | ||
set(SDL2_COMMON_LIBS "") | ||
endmacro() | ||
|
||
macro(plat_link_and_package) | ||
target_link_libraries(${BIN_NAME} PRIVATE -lm -lSDL2 -lSDL2_mixer -lGL -lGLEW -lopenal) | ||
target_link_libraries(sith_engine PRIVATE nlohmann_json::nlohmann_json) | ||
endmacro() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# CMake toolchain file | ||
set(CMAKE_SYSTEM_NAME Generic) | ||
set(CMAKE_SYSTEM_VERSION "0.0.0") | ||
set(CMAKE_SYSTEM_PROCESSOR arm) | ||
|
||
if(DEFINED ENV{DEVKITPRO}) | ||
set(DEVKITPRO $ENV{DEVKITPRO}) | ||
else() | ||
set(DEVKITPRO /opt/devkitpro) | ||
endif() | ||
|
||
if(DEFINED ENV{DEVKITARM}) | ||
set(DEVKITARM $ENV{DEVKITARM}) | ||
else() | ||
set(DEVKITARM ${DEVKITPRO}/devkitARM) | ||
endif() | ||
|
||
if(DEFINED ENV{NDSTOOL}) | ||
set(NDSTOOL $ENV{NDSTOOL}) | ||
else() | ||
set(NDSTOOL ${DEVKITPRO}/tools/bin/ndstool) | ||
endif() | ||
|
||
set(TOOLCHAIN_PREFIX arm-none-eabi) | ||
set(TOOLCHAIN_PREFIX_PATH ${DEVKITARM}/bin/${TOOLCHAIN_PREFIX}) | ||
|
||
set(CMAKE_C_COMPILER "${TOOLCHAIN_PREFIX_PATH}-gcc" CACHE STRING "C compiler" FORCE) | ||
set(CMAKE_CXX_COMPILER "${TOOLCHAIN_PREFIX_PATH}-g++" CACHE STRING "C++ compiler" FORCE) | ||
|
||
set(CMAKE_C_FLAGS_INIT "") | ||
set(CMAKE_CXX_FLAGS_INIT ${CMAKE_C_FLAGS_INIT}) | ||
|
||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) | ||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) | ||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) | ||
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) | ||
|
||
set(PLAT_TWL TRUE) | ||
|
||
message( STATUS "Nintendo DSi ARM32 toolchain invoked" ) |