diff --git a/.gitignore b/.gitignore index d4fb4cf..323e656 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ # Nix/NixOS things result result-* + +# Clangd cache +.cache/clangd diff --git a/compile_commands.json b/compile_commands.json new file mode 100644 index 0000000..457ae32 --- /dev/null +++ b/compile_commands.json @@ -0,0 +1,27 @@ +[ + { + "arguments": [ + "/nix/store/8nfqxz8d7ramdmc1h7yvnm45cghkknls-devkitARM/devkitARM/bin/arm-none-eabi-gcc", + "-g", + "-Wall", + "-O2", + "-mword-relocations", + "-ffunction-sections", + "-march=armv6k", + "-mtune=mpcore", + "-mfloat-abi=hard", + "-mtp=soft", + "-I/home/toast/Documents/Repos/3ds-helloWorld/include", + "-I/nix/store/8nfqxz8d7ramdmc1h7yvnm45cghkknls-devkitARM/libctru/include", + "-I/home/toast/Documents/Repos/3ds-helloWorld/build", + "-D__3DS__", + "-c", + "-o", + "main.o", + "/home/toast/Documents/Repos/3ds-helloWorld/source/main.c" + ], + "directory": "/home/toast/Documents/Repos/3ds-helloWorld/build", + "file": "/home/toast/Documents/Repos/3ds-helloWorld/source/main.c", + "output": "/home/toast/Documents/Repos/3ds-helloWorld/build/main.o" + } +] diff --git a/flake.nix b/flake.nix index a8057dd..8a7617f 100644 --- a/flake.nix +++ b/flake.nix @@ -16,6 +16,13 @@ name = "3ds-devshell"; packages = with nixpkgs.legacyPackages.${system}; [ gnumake + clang-tools + ( + writeShellScriptBin "generateClangCompileCommands" '' + make clean + ${bear}/bin/bear -- make + '' + ) ]; shellHook = '' export DEVKITPRO=${devkitARM}