浏览代码

clangd stuff

Adam Ierymenko 3 年之前
父节点
当前提交
cf03996bf2
共有 2 个文件被更改,包括 5 次插入0 次删除
  1. 1 0
      .gitignore
  2. 4 0
      make-mac.mk

+ 1 - 0
.gitignore

@@ -9,6 +9,7 @@
 # IDE stuff
 # IDE stuff
 /.idea
 /.idea
 /.nova
 /.nova
+/compile_commands.json
 
 
 # OS-created garbage files from various platforms
 # OS-created garbage files from various platforms
 .DS_Store
 .DS_Store

+ 4 - 0
make-mac.mk

@@ -154,6 +154,10 @@ selftest: $(CORE_OBJS) $(ONE_OBJS) selftest.o
 
 
 zerotier-selftest: selftest
 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
 # Requires Packages: http://s.sudre.free.fr/Software/Packages/about.html
 mac-dist-pkg: FORCE
 mac-dist-pkg: FORCE
 	packagesbuild "ext/installfiles/mac/ZeroTier One.pkgproj"
 	packagesbuild "ext/installfiles/mac/ZeroTier One.pkgproj"