diff --git a/.gitignore b/.gitignore index 9cb0fa07d..98b77490f 100755 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,7 @@ # IDE stuff /.idea /.nova +/compile_commands.json # OS-created garbage files from various platforms .DS_Store diff --git a/make-mac.mk b/make-mac.mk index 7c14fa67e..1fd4f6fc7 100644 --- a/make-mac.mk +++ b/make-mac.mk @@ -154,6 +154,10 @@ selftest: $(CORE_OBJS) $(ONE_OBJS) selftest.o zerotier-selftest: selftest +# Make compile_commands.json for clangd editor extensions. Probably works on Linux too. +compile_commands: FORCE + compiledb make ZT_DEBUG=1 + # Requires Packages: http://s.sudre.free.fr/Software/Packages/about.html mac-dist-pkg: FORCE packagesbuild "ext/installfiles/mac/ZeroTier One.pkgproj"