diff options
author | OmarSquircleArt <omar.squircleart@gmail.com> | 2019-08-10 16:18:12 +0300 |
---|---|---|
committer | OmarSquircleArt <omar.squircleart@gmail.com> | 2019-08-10 16:18:12 +0300 |
commit | 67474a7e622957044bc708119a7cfa49a82790fd (patch) | |
tree | 1689263da79f08b1c3c9725ac56c3da8b5d91fbb /GNUmakefile | |
parent | b091542fe91353c15dd7240ba7ce8ecf72d4011b (diff) | |
parent | 553b581f25c1782c4231816965cd3f6ce58a449a (diff) |
Merge master to soc-2019-cycles-procedural.soc-2019-cycles-procedural
Diffstat (limited to 'GNUmakefile')
-rw-r--r-- | GNUmakefile | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/GNUmakefile b/GNUmakefile index 69a2689cea1..1ad7cc4fc27 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -37,7 +37,9 @@ Convenience Targets * bpy: Build as a python module which can be loaded from python directly. * deps: Build library dependencies (intended only for platform maintainers). + * developer: Enable faster builds, error checking and tests, recommended for developers. * config: Run cmake configuration tool to set build options. + * ninja: Use ninja build tool for faster builds. Note: passing the argument 'BUILD_DIR=path' when calling make will override the default build dir. Note: passing the argument 'BUILD_CMAKE_ARGS=args' lets you add cmake arguments. @@ -221,6 +223,19 @@ ifneq "$(findstring bpy, $(MAKECMDGOALS))" "" BUILD_CMAKE_ARGS:=$(BUILD_CMAKE_ARGS) -C"$(BLENDER_DIR)/build_files/cmake/config/bpy_module.cmake" endif +ifneq "$(findstring developer, $(MAKECMDGOALS))" "" + BUILD_CMAKE_ARGS:=$(BUILD_CMAKE_ARGS) -C"$(BLENDER_DIR)/build_files/cmake/config/blender_developer.cmake" +endif + +# ----------------------------------------------------------------------------- +# build tool + +ifneq "$(findstring ninja, $(MAKECMDGOALS))" "" + BUILD_COMMAND:=ninja + BUILD_CMAKE_ARGS:=$(BUILD_CMAKE_ARGS) -G Ninja +else + BUILD_COMMAND:=make -s +endif # ----------------------------------------------------------------------------- # Blender binary path @@ -282,7 +297,7 @@ all: .FORCE @echo @echo Building Blender ... - $(MAKE) -C "$(BUILD_DIR)" -s -j $(NPROCS) install + $(BUILD_COMMAND) -C "$(BUILD_DIR)" -j $(NPROCS) install @echo @echo edit build configuration with: "$(BUILD_DIR)/CMakeCache.txt" run make again to rebuild. @echo Blender successfully built, run from: $(BLENDER_BIN) @@ -294,6 +309,8 @@ lite: all cycles: all headless: all bpy: all +developer: all +ninja: all # ----------------------------------------------------------------------------- # Build dependencies @@ -312,7 +329,7 @@ deps: .FORCE @echo @echo Building dependencies ... - $(MAKE) -C "$(DEPS_BUILD_DIR)" -s -j $(NPROCS) $(DEPS_TARGET) + $(BUILD_COMMAND) -C "$(DEPS_BUILD_DIR)" -j $(NPROCS) $(DEPS_TARGET) @echo @echo Dependencies successfully built and installed to $(DEPS_INSTALL_DIR). @echo @@ -548,7 +565,7 @@ help_features: .FORCE @$(PYTHON) "$(BLENDER_DIR)/build_files/cmake/cmake_print_build_options.py" $(BLENDER_DIR)"/CMakeLists.txt" clean: .FORCE - $(MAKE) -C "$(BUILD_DIR)" clean + $(BUILD_COMMAND) -C "$(BUILD_DIR)" clean .PHONY: all |