diff --git a/.gitignore b/.gitignore index 65d6b54..2c4f84b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,67 +1,13 @@ -# ---> C -# Prerequisites -*.d +# Build files +/build-fx +/build-cg +/*.g1a +/*.g3a -# Object files -*.o -*.ko -*.obj -*.elf - -# Linker output -*.ilk -*.map -*.exp - -# Precompiled Headers -*.gch -*.pch - -# Libraries -*.lib -*.a -*.la -*.lo - -# Shared objects (inc. Windows DLLs) -*.dll -*.so -*.so.* -*.dylib - -# Executables -*.exe -*.out -*.app -*.i*86 -*.x86_64 -*.hex - -# Debug files -*.dSYM/ -*.su -*.idb -*.pdb - -# Kernel Module Compile Results -*.mod* -*.cmd -.tmp_versions/ -modules.order -Module.symvers -Mkfile.old -dkms.conf - -# ---> CMake -CMakeLists.txt.user -CMakeCache.txt -CMakeFiles -CMakeScripts -Testing -Makefile -cmake_install.cmake -install_manifest.txt -compile_commands.json -CTestTestfile.cmake -_deps +# Python bytecode + __pycache__/ +# Common IDE files +*.sublime-project +*.sublime-workspace +.vscode diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..bfb4c12 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,38 @@ +# Configure with [fxsdk build-fx] or [fxsdk build-cg], which provide the +# toolchain file and module path of the fxSDK +cmake_minimum_required(VERSION 3.15) +project(MyAddin) +include(GenerateG1A) +include(GenerateG3A) +include(Fxconv) +find_package(Gint 2.1 REQUIRED) +set(SOURCES + src/main.c + src/gui.c + # ... +) +# Shared assets, fx-9860G-only assets and fx-CG-50-only assets +set(ASSETS + # ... +) +set(ASSETS_fx + assets-fx/example.png + # ... +) +set(ASSETS_cg + assets-cg/example.png +assets-cg/logo.png +assets-cg/widgets.png + # ... +) +fxconv_declare_assets(${ASSETS} ${ASSETS_fx} ${ASSETS_cg} WITH_METADATA) +add_executable(myaddin ${SOURCES} ${ASSETS} ${ASSETS_${FXSDK_PLATFORM}}) +target_compile_options(myaddin PRIVATE -Wall -Wextra -Os) +target_link_libraries(myaddin Gint::Gint) +if("${FXSDK_PLATFORM_LONG}" STREQUAL fx9860G) + generate_g1a(TARGET myaddin OUTPUT "CasioCraft.g1a" + NAME "CasioCraft" ICON assets-fx/icon.png) +elseif("${FXSDK_PLATFORM_LONG}" STREQUAL fxCG50) + generate_g3a(TARGET myaddin OUTPUT "CasioCraft.g3a" + NAME "CasioCraft" ICONS assets-cg/icon-uns.png assets-cg/icon-sel.png) +endif() \ No newline at end of file diff --git a/CasioCraft.g3a b/CasioCraft.g3a new file mode 100644 index 0000000..d5f28a3 Binary files /dev/null and b/CasioCraft.g3a differ