diff --git a/cmake/Makefile b/cmake/Makefile new file mode 100644 index 0000000..9e2652b --- /dev/null +++ b/cmake/Makefile @@ -0,0 +1,5 @@ +SUBDIRS:= `ls | egrep -v '^(CVS)$$'` +all: + @for i in $(SUBDIRS); do if test -e $$i/CMakeLists.txt ; then (arm-none-eabi-cmake -B $$i/build -S $$i && cmake --build $$i/build) || { exit 1;} fi; done; +clean: + @for i in $(SUBDIRS); do rm -rf $$i/build; done; diff --git a/cmake/arm9/CMakeLists.txt b/cmake/arm9/CMakeLists.txt new file mode 100644 index 0000000..a287299 --- /dev/null +++ b/cmake/arm9/CMakeLists.txt @@ -0,0 +1,5 @@ +cmake_minimum_required(VERSION 3.7) +project(cmake-example LANGUAGES C) + +add_executable(cmake-example source/main.c) +nds_create_rom(cmake-example) diff --git a/cmake/arm9/source/main.c b/cmake/arm9/source/main.c new file mode 100644 index 0000000..5f443b1 --- /dev/null +++ b/cmake/arm9/source/main.c @@ -0,0 +1,20 @@ +/*--------------------------------------------------------------------------------- + + Basic template code for starting a DS app + +---------------------------------------------------------------------------------*/ +#include +#include +//--------------------------------------------------------------------------------- +int main(void) { +//--------------------------------------------------------------------------------- + consoleDemoInit(); + iprintf("Hello World!"); + while(1) { + swiWaitForVBlank(); + scanKeys(); + int pressed = keysDown(); + if(pressed & KEY_START) break; + } + +}