diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2015-11-30 18:47:30 +0100 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2015-12-03 11:13:43 +0100 |
commit | 678a5ca91e7e763efc5140102ea9d537b05308e4 (patch) | |
tree | e9ec8a0501a54c29dd48db47a502210d93fa945e /scripts/main.mk | |
parent | e5f136a16a9482d6ae4df65166a353e8ecd2f03f (diff) | |
download | qtlocation-mapboxgl-678a5ca91e7e763efc5140102ea9d537b05308e4.tar.gz |
[build] add ninja + compilation database support
Diffstat (limited to 'scripts/main.mk')
-rw-r--r-- | scripts/main.mk | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/scripts/main.mk b/scripts/main.mk index b4a5f9894e..8df100decc 100644 --- a/scripts/main.mk +++ b/scripts/main.mk @@ -94,6 +94,12 @@ Xcode/__project__: print-env $(SUBMODULES) config/$(HOST_SLUG).gypi $(QUIET)$(ENV) deps/run_gyp gyp/$(HOST).gyp $(GYP_FLAGS) \ -f xcode$(GYP_FLAVOR_SUFFIX) +.PHONY: Ninja/__project__ +Ninja/__project__: print-env $(SUBMODULES) config/$(HOST_SLUG).gypi + @printf "$(TEXT_BOLD)$(COLOR_GREEN)* Recreating project...$(FORMAT_END)\n" + $(QUIET)$(ENV) deps/run_gyp gyp/$(HOST).gyp -Gconfig=$(BUILDTYPE) $(GYP_FLAGS) \ + -f ninja + #### Build individual targets ################################################## NODE_PRE_GYP = $(shell npm bin)/node-pre-gyp @@ -136,6 +142,17 @@ Xcode/%: Xcode/__project__ -jobs $(JOBS) \ $(XCPRETTY) +Ninja/%: Ninja/__project__ + @printf "$(TEXT_BOLD)$(COLOR_GREEN)* Building target $*...$(FORMAT_END)\n" + $(QUIET)$(ENV) deps/ninja/ninja-$(HOST) -C build/$(HOST_SLUG)/$(BUILDTYPE) $* + + +Ninja/compdb: OUTPUT=build/$(HOST_SLUG)/$(BUILDTYPE)/compile_commands.json +Ninja/compdb: Ninja/__project__ + @printf "$(TEXT_BOLD)$(COLOR_GREEN)* Writing to $(OUTPUT)$(FORMAT_END)\n" + $(QUIET)$(ENV) deps/ninja/ninja-$(HOST) -C build/$(HOST_SLUG)/$(BUILDTYPE) \ + -t compdb cc cc_s cxx objc objcxx > $(OUTPUT) + #### Run tests ################################################################# test-%: Makefile/test |