Created
November 16, 2022 13:19
-
-
Save TypedLambda/0374841f065ac222ff3bdac50b5c81b1 to your computer and use it in GitHub Desktop.
compile_commands.json generation for eclipse cdt / mcuxpresso build
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
# use 'compiledb' to create a 'compile_commands.json' | |
ifneq (,$(shell which compiledb 2>&1)) | |
compile_commands.json: | ${C_SRCS} | |
${MAKE} -Bnwk build-only | sed -e 's#\\#\\\\\\\\#g' -e "s#'\"\\([^']*\\)\"'#\"\\\\\"\1\\\\\"\"#g" | compiledb -o $@ | |
# hook into post build | |
post-build: | compile_commands.json | |
endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment