summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile20
1 files changed, 17 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 3f8332938e..5b743b6711 100644
--- a/Makefile
+++ b/Makefile
@@ -288,16 +288,30 @@ check: test
scripts/collect-coverage.sh $(LINUX_OUTPUT_PATH)/$(BUILDTYPE)
# Generates a compilation database with ninja for use in clang tooling
-compdb: platform/linux/platform.gyp $(LINUX_OUTPUT_PATH)/config.gypi
+compdb: compdb-$(HOST_PLATFORM)
+
+compdb-linux: platform/linux/platform.gyp $(LINUX_OUTPUT_PATH)/config.gypi
$(GYP) -f ninja -I $(LINUX_OUTPUT_PATH)/config.gypi \
--generator-output=$(LINUX_OUTPUT_PATH) $<
deps/ninja/ninja-linux -C $(LINUX_OUTPUT_PATH)/$(BUILDTYPE) \
-t compdb cc cc_s cxx objc objcxx > $(LINUX_OUTPUT_PATH)/$(BUILDTYPE)/compile_commands.json
-tidy: compdb
- deps/ninja/ninja-linux -C $(LINUX_OUTPUT_PATH)/$(BUILDTYPE) version shaders
+compdb-osx: platform/osx/platform.gyp $(OSX_OUTPUT_PATH)/config.gypi
+ $(GYP) -f ninja -I $(OSX_OUTPUT_PATH)/config.gypi \
+ --generator-output=$(OSX_OUTPUT_PATH) $<
+ deps/ninja/ninja-osx -C $(OSX_OUTPUT_PATH)/$(BUILDTYPE) \
+ -t compdb cc cc_s cxx objc objcxx > $(OSX_OUTPUT_PATH)/$(BUILDTYPE)/compile_commands.json
+
+tidy: compdb tidy-$(HOST_PLATFORM)
+
+tidy-linux:
+ deps/ninja/ninja-linux -C $(LINUX_OUTPUT_PATH)/$(BUILDTYPE) platform-lib test
scripts/clang-tidy.sh $(LINUX_OUTPUT_PATH)/$(BUILDTYPE)
+tidy-osx:
+ deps/ninja/ninja-osx -C $(OSX_OUTPUT_PATH)/$(BUILDTYPE) platform-lib test
+ scripts/clang-tidy.sh $(OSX_OUTPUT_PATH)/$(BUILDTYPE)
+
#### Miscellaneous targets #####################################################
style-code: