2017-03-11 06:14:39 +00:00
|
|
|
# -*- mode: gnumakefile; tab-width: 4; indent-tabs-mode: t; -*-
|
2011-10-23 19:54:06 +00:00
|
|
|
# vim: tabstop=4
|
2011-02-03 18:57:53 +00:00
|
|
|
#
|
2011-02-03 10:07:15 +00:00
|
|
|
# ##### BEGIN GPL LICENSE BLOCK #####
|
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of the GNU General Public License
|
|
|
|
# as published by the Free Software Foundation; either version 2
|
|
|
|
# of the License, or (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, write to the Free Software Foundation,
|
|
|
|
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
#
|
|
|
|
# ##### END GPL LICENSE BLOCK #####
|
|
|
|
|
2012-08-15 22:59:23 +00:00
|
|
|
# This Makefile does an out-of-source CMake build in ../build_`OS`_`CPU`
|
2011-02-03 10:07:15 +00:00
|
|
|
# eg:
|
2012-08-15 22:59:23 +00:00
|
|
|
# ../build_linux_i386
|
2011-02-03 10:07:15 +00:00
|
|
|
# This is for users who like to configure & build blender with a single command.
|
|
|
|
|
2019-02-27 23:07:50 +00:00
|
|
|
define HELP_TEXT
|
|
|
|
|
|
|
|
Convenience Targets
|
|
|
|
Provided for building Blender, (multiple at once can be used).
|
|
|
|
|
|
|
|
* debug: Build a debug binary.
|
|
|
|
* full: Enable all supported dependencies & options.
|
|
|
|
* lite: Disable non essential features for a smaller binary and faster build.
|
2020-06-11 21:28:01 +00:00
|
|
|
* release Complete build with all options enabled including CUDA and Optix, matching the releases on blender.org
|
2019-02-27 23:07:50 +00:00
|
|
|
* headless: Build without an interface (renderfarm or server automation).
|
|
|
|
* cycles: Build Cycles standalone only, without Blender.
|
|
|
|
* bpy: Build as a python module which can be loaded from python directly.
|
|
|
|
* deps: Build library dependencies (intended only for platform maintainers).
|
|
|
|
|
2019-06-28 11:36:19 +00:00
|
|
|
* developer: Enable faster builds, error checking and tests, recommended for developers.
|
2019-02-27 23:07:50 +00:00
|
|
|
* config: Run cmake configuration tool to set build options.
|
2019-08-05 12:40:26 +00:00
|
|
|
* ninja: Use ninja build tool for faster builds.
|
2019-02-27 23:07:50 +00:00
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
Project Files
|
2019-08-01 03:53:25 +00:00
|
|
|
Generate project files for development environments.
|
2019-02-27 23:07:50 +00:00
|
|
|
|
|
|
|
* project_qtcreator: QtCreator Project Files.
|
|
|
|
* project_netbeans: NetBeans Project Files.
|
|
|
|
* project_eclipse: Eclipse CDT4 Project Files.
|
|
|
|
|
|
|
|
Package Targets
|
|
|
|
|
|
|
|
* package_debian: Build a debian package.
|
|
|
|
* package_pacman: Build an arch linux pacman package.
|
|
|
|
* package_archive: Build an archive package.
|
|
|
|
|
|
|
|
Testing Targets
|
|
|
|
Not associated with building Blender.
|
|
|
|
|
|
|
|
* test:
|
2019-09-12 18:13:47 +00:00
|
|
|
Run automated tests with ctest.
|
2019-02-27 23:07:50 +00:00
|
|
|
* test_cmake:
|
|
|
|
Runs our own cmake file checker
|
|
|
|
which detects errors in the cmake file list definitions
|
|
|
|
* test_pep8:
|
|
|
|
Checks all python script are pep8
|
|
|
|
which are tagged to use the stricter formatting
|
|
|
|
* test_deprecated:
|
|
|
|
Checks for deprecation tags in our code which may need to be removed
|
|
|
|
|
|
|
|
Static Source Code Checking
|
|
|
|
Not associated with building Blender.
|
|
|
|
|
|
|
|
* check_cppcheck: Run blender source through cppcheck (C & C++).
|
|
|
|
* check_clang_array: Run blender source through clang array checking script (C & C++).
|
|
|
|
* check_splint: Run blenders source through splint (C only).
|
|
|
|
* check_sparse: Run blenders source through sparse (C only).
|
|
|
|
* check_smatch: Run blenders source through smatch (C only).
|
|
|
|
* check_spelling_c: Check for spelling errors (C/C++ only).
|
|
|
|
* check_spelling_c_qtc: Same as check_spelling_c but outputs QtCreator tasks format.
|
|
|
|
* check_spelling_osl: Check for spelling errors (OSL only).
|
|
|
|
* check_spelling_py: Check for spelling errors (Python only).
|
|
|
|
* check_descriptions: Check for duplicate/invalid descriptions.
|
|
|
|
|
|
|
|
Utilities
|
|
|
|
Not associated with building Blender.
|
|
|
|
|
|
|
|
* icons:
|
|
|
|
Updates PNG icons from SVG files.
|
2019-02-27 23:34:50 +00:00
|
|
|
|
|
|
|
Optionally pass in variables: 'BLENDER_BIN', 'INKSCAPE_BIN'
|
|
|
|
otherwise default paths are used.
|
|
|
|
|
|
|
|
Example
|
|
|
|
make icons INKSCAPE_BIN=/path/to/inkscape
|
2019-02-27 23:07:50 +00:00
|
|
|
|
|
|
|
* icons_geom:
|
|
|
|
Updates Geometry icons from BLEND file.
|
2019-02-27 23:34:50 +00:00
|
|
|
|
|
|
|
Optionally pass in variable: 'BLENDER_BIN'
|
|
|
|
otherwise default paths are used.
|
|
|
|
|
|
|
|
Example
|
|
|
|
make icons_geom BLENDER_BIN=/path/to/blender
|
2019-02-27 23:07:50 +00:00
|
|
|
|
2019-10-30 13:16:29 +00:00
|
|
|
* source_archive:
|
2019-02-27 23:07:50 +00:00
|
|
|
Create a compressed archive of the source code.
|
|
|
|
|
|
|
|
* update:
|
|
|
|
updates git and all submodules
|
|
|
|
|
2019-04-16 13:42:54 +00:00
|
|
|
* format
|
|
|
|
Format source code using clang (uses PATHS if passed in). For example::
|
|
|
|
|
|
|
|
make format PATHS="source/blender/blenlib source/blender/blenkernel"
|
|
|
|
|
2019-02-27 23:07:50 +00:00
|
|
|
Environment Variables
|
|
|
|
|
|
|
|
* BUILD_CMAKE_ARGS: Arguments passed to CMake.
|
|
|
|
* BUILD_DIR: Override default build path.
|
|
|
|
* PYTHON: Use this for the Python command (used for checking tools).
|
|
|
|
* NPROCS: Number of processes to use building (auto-detect when omitted).
|
|
|
|
|
|
|
|
Documentation Targets
|
|
|
|
Not associated with building Blender.
|
|
|
|
|
|
|
|
* doc_py: Generate sphinx python api docs.
|
|
|
|
* doc_doxy: Generate doxygen C/C++ docs.
|
|
|
|
* doc_dna: Generate blender file format reference.
|
|
|
|
* doc_man: Generate manpage.
|
|
|
|
|
|
|
|
Information
|
|
|
|
|
|
|
|
* help: This help message.
|
|
|
|
* help_features: Show a list of optional features when building.
|
|
|
|
|
|
|
|
endef
|
|
|
|
# HELP_TEXT (end)
|
|
|
|
|
2011-02-03 10:07:15 +00:00
|
|
|
|
|
|
|
# System Vars
|
|
|
|
OS:=$(shell uname -s)
|
2011-02-07 05:05:41 +00:00
|
|
|
OS_NCASE:=$(shell uname -s | tr '[A-Z]' '[a-z]')
|
2019-02-09 05:58:52 +00:00
|
|
|
CPU:=$(shell uname -m)
|
2011-02-03 10:07:15 +00:00
|
|
|
|
|
|
|
|
|
|
|
# Source and Build DIR's
|
2013-11-17 07:54:03 +00:00
|
|
|
BLENDER_DIR:=$(shell pwd -P)
|
2011-08-16 09:36:15 +00:00
|
|
|
BUILD_TYPE:=Release
|
2011-11-13 14:29:17 +00:00
|
|
|
|
2019-11-12 14:52:04 +00:00
|
|
|
# CMake arguments, assigned to local variable to make it mutable.
|
|
|
|
CMAKE_CONFIG_ARGS := $(BUILD_CMAKE_ARGS)
|
2011-02-03 10:07:15 +00:00
|
|
|
|
2011-10-16 13:10:14 +00:00
|
|
|
ifndef BUILD_DIR
|
2013-11-17 07:54:03 +00:00
|
|
|
BUILD_DIR:=$(shell dirname "$(BLENDER_DIR)")/build_$(OS_NCASE)
|
2011-10-16 13:10:14 +00:00
|
|
|
endif
|
|
|
|
|
2017-07-25 14:37:55 +00:00
|
|
|
# Dependencies DIR's
|
|
|
|
DEPS_SOURCE_DIR:=$(BLENDER_DIR)/build_files/build_environment
|
|
|
|
|
2018-09-24 12:50:01 +00:00
|
|
|
ifndef DEPS_BUILD_DIR
|
|
|
|
DEPS_BUILD_DIR:=$(BUILD_DIR)/deps
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifndef DEPS_INSTALL_DIR
|
|
|
|
DEPS_INSTALL_DIR:=$(shell dirname "$(BLENDER_DIR)")/lib/$(OS_NCASE)
|
|
|
|
|
|
|
|
ifneq ($(OS_NCASE),darwin)
|
|
|
|
# Add processor type to directory name
|
2019-02-09 05:58:52 +00:00
|
|
|
DEPS_INSTALL_DIR:=$(DEPS_INSTALL_DIR)_$(CPU)
|
2018-09-24 12:50:01 +00:00
|
|
|
endif
|
2017-07-31 17:04:18 +00:00
|
|
|
endif
|
|
|
|
|
2015-06-10 17:57:21 +00:00
|
|
|
# Allow to use alternative binary (pypy3, etc)
|
|
|
|
ifndef PYTHON
|
|
|
|
PYTHON:=python3
|
|
|
|
endif
|
|
|
|
|
2019-09-30 08:19:55 +00:00
|
|
|
# For macOS python3 is not installed by default, so fallback to python binary
|
|
|
|
# in libraries, or python 2 for running make update to get it.
|
|
|
|
ifeq ($(OS_NCASE),darwin)
|
|
|
|
ifeq (, $(shell command -v $(PYTHON)))
|
|
|
|
PYTHON:=../lib/darwin/python/bin/python3.7m
|
|
|
|
ifeq (, $(shell command -v $(PYTHON)))
|
|
|
|
PYTHON:=python
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
2011-08-16 10:34:52 +00:00
|
|
|
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
# additional targets for the build configuration
|
|
|
|
|
2011-02-19 13:46:08 +00:00
|
|
|
# support 'make debug'
|
|
|
|
ifneq "$(findstring debug, $(MAKECMDGOALS))" ""
|
|
|
|
BUILD_DIR:=$(BUILD_DIR)_debug
|
|
|
|
BUILD_TYPE:=Debug
|
|
|
|
endif
|
2014-11-13 17:06:03 +00:00
|
|
|
ifneq "$(findstring full, $(MAKECMDGOALS))" ""
|
|
|
|
BUILD_DIR:=$(BUILD_DIR)_full
|
2019-11-12 14:52:04 +00:00
|
|
|
CMAKE_CONFIG_ARGS:=-C"$(BLENDER_DIR)/build_files/cmake/config/blender_full.cmake" $(CMAKE_CONFIG_ARGS)
|
2014-11-13 17:06:03 +00:00
|
|
|
endif
|
2011-08-16 09:36:15 +00:00
|
|
|
ifneq "$(findstring lite, $(MAKECMDGOALS))" ""
|
|
|
|
BUILD_DIR:=$(BUILD_DIR)_lite
|
2019-11-12 14:52:04 +00:00
|
|
|
CMAKE_CONFIG_ARGS:=-C"$(BLENDER_DIR)/build_files/cmake/config/blender_lite.cmake" $(CMAKE_CONFIG_ARGS)
|
2011-08-16 09:36:15 +00:00
|
|
|
endif
|
2020-06-11 21:28:01 +00:00
|
|
|
ifneq "$(findstring release, $(MAKECMDGOALS))" ""
|
|
|
|
BUILD_DIR:=$(BUILD_DIR)_release
|
|
|
|
CMAKE_CONFIG_ARGS:=-C"$(BLENDER_DIR)/build_files/cmake/config/blender_release.cmake" $(CMAKE_CONFIG_ARGS)
|
|
|
|
endif
|
2014-01-20 19:41:54 +00:00
|
|
|
ifneq "$(findstring cycles, $(MAKECMDGOALS))" ""
|
|
|
|
BUILD_DIR:=$(BUILD_DIR)_cycles
|
2019-11-12 14:52:04 +00:00
|
|
|
CMAKE_CONFIG_ARGS:=-C"$(BLENDER_DIR)/build_files/cmake/config/cycles_standalone.cmake" $(CMAKE_CONFIG_ARGS)
|
2014-01-20 19:41:54 +00:00
|
|
|
endif
|
2011-08-16 09:36:15 +00:00
|
|
|
ifneq "$(findstring headless, $(MAKECMDGOALS))" ""
|
2015-03-21 05:40:17 +00:00
|
|
|
BUILD_DIR:=$(BUILD_DIR)_headless
|
2019-11-12 14:52:04 +00:00
|
|
|
CMAKE_CONFIG_ARGS:=-C"$(BLENDER_DIR)/build_files/cmake/config/blender_headless.cmake" $(CMAKE_CONFIG_ARGS)
|
2011-08-16 09:36:15 +00:00
|
|
|
endif
|
|
|
|
ifneq "$(findstring bpy, $(MAKECMDGOALS))" ""
|
|
|
|
BUILD_DIR:=$(BUILD_DIR)_bpy
|
2019-11-12 14:52:04 +00:00
|
|
|
CMAKE_CONFIG_ARGS:=-C"$(BLENDER_DIR)/build_files/cmake/config/bpy_module.cmake" $(CMAKE_CONFIG_ARGS)
|
2011-08-16 09:36:15 +00:00
|
|
|
endif
|
2011-02-19 13:46:08 +00:00
|
|
|
|
2019-06-28 11:36:19 +00:00
|
|
|
ifneq "$(findstring developer, $(MAKECMDGOALS))" ""
|
2019-11-12 14:52:04 +00:00
|
|
|
CMAKE_CONFIG_ARGS:=-C"$(BLENDER_DIR)/build_files/cmake/config/blender_developer.cmake" $(CMAKE_CONFIG_ARGS)
|
2019-06-28 11:36:19 +00:00
|
|
|
endif
|
|
|
|
|
2019-08-05 12:40:26 +00:00
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
# build tool
|
|
|
|
|
2019-08-12 15:26:59 +00:00
|
|
|
ifneq "$(findstring ninja, $(MAKECMDGOALS))" ""
|
2019-11-12 14:52:04 +00:00
|
|
|
CMAKE_CONFIG_ARGS:=$(CMAKE_CONFIG_ARGS) -G Ninja
|
2019-08-12 13:20:31 +00:00
|
|
|
BUILD_COMMAND:=ninja
|
2019-08-30 15:47:57 +00:00
|
|
|
DEPS_BUILD_COMMAND:=ninja
|
2019-08-05 12:40:26 +00:00
|
|
|
else
|
2019-08-12 13:20:31 +00:00
|
|
|
ifneq ("$(wildcard $(BUILD_DIR)/build.ninja)","")
|
|
|
|
BUILD_COMMAND:=ninja
|
|
|
|
else
|
|
|
|
BUILD_COMMAND:=make -s
|
|
|
|
endif
|
2019-08-30 15:47:57 +00:00
|
|
|
|
|
|
|
ifneq ("$(wildcard $(DEPS_BUILD_DIR)/build.ninja)","")
|
|
|
|
DEPS_BUILD_COMMAND:=ninja
|
|
|
|
else
|
|
|
|
DEPS_BUILD_COMMAND:=make -s
|
|
|
|
endif
|
2019-08-05 12:40:26 +00:00
|
|
|
endif
|
2011-08-16 10:34:52 +00:00
|
|
|
|
2018-08-21 09:20:01 +00:00
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
# Blender binary path
|
|
|
|
|
2019-02-27 23:33:58 +00:00
|
|
|
# Allow passing in own BLENDER_BIN so developers who don't
|
|
|
|
# use the default build path can still use utility helpers.
|
2018-08-21 10:27:36 +00:00
|
|
|
ifeq ($(OS), Darwin)
|
2019-06-21 16:12:00 +00:00
|
|
|
BLENDER_BIN?="$(BUILD_DIR)/bin/Blender.app/Contents/MacOS/Blender"
|
2018-08-21 09:20:01 +00:00
|
|
|
else
|
2019-02-27 23:33:58 +00:00
|
|
|
BLENDER_BIN?="$(BUILD_DIR)/bin/blender"
|
2018-08-21 09:20:01 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
|
2011-08-16 10:34:52 +00:00
|
|
|
# -----------------------------------------------------------------------------
|
2011-02-03 10:07:15 +00:00
|
|
|
# Get the number of cores for threaded build
|
2015-06-13 22:26:33 +00:00
|
|
|
ifndef NPROCS
|
|
|
|
NPROCS:=1
|
|
|
|
ifeq ($(OS), Linux)
|
|
|
|
NPROCS:=$(shell nproc)
|
|
|
|
endif
|
2019-11-18 05:27:06 +00:00
|
|
|
ifeq ($(OS), NetBSD)
|
|
|
|
NPROCS:=$(shell getconf NPROCESSORS_ONLN)
|
|
|
|
endif
|
|
|
|
ifneq (,$(filter $(OS),Darwin FreeBSD))
|
2016-04-08 21:58:37 +00:00
|
|
|
NPROCS:=$(shell sysctl -n hw.ncpu)
|
2015-06-13 22:26:33 +00:00
|
|
|
endif
|
2011-02-03 10:07:15 +00:00
|
|
|
endif
|
|
|
|
|
2011-09-20 10:15:57 +00:00
|
|
|
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
# Macro for configuring cmake
|
|
|
|
|
2019-11-12 14:52:04 +00:00
|
|
|
CMAKE_CONFIG = cmake $(CMAKE_CONFIG_ARGS) \
|
2013-11-17 07:54:03 +00:00
|
|
|
-H"$(BLENDER_DIR)" \
|
|
|
|
-B"$(BUILD_DIR)" \
|
2017-06-26 23:50:35 +00:00
|
|
|
-DCMAKE_BUILD_TYPE_INIT:STRING=$(BUILD_TYPE)
|
2011-09-20 10:15:57 +00:00
|
|
|
|
|
|
|
|
2011-11-23 17:14:29 +00:00
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
# Tool for 'make config'
|
|
|
|
|
|
|
|
# X11 spesific
|
|
|
|
ifdef DISPLAY
|
|
|
|
CMAKE_CONFIG_TOOL = cmake-gui
|
2017-03-11 06:14:39 +00:00
|
|
|
else
|
2011-11-23 17:14:29 +00:00
|
|
|
CMAKE_CONFIG_TOOL = ccmake
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
2011-08-16 13:45:17 +00:00
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
# Build Blender
|
2016-05-20 19:47:33 +00:00
|
|
|
all: .FORCE
|
2011-08-16 13:45:17 +00:00
|
|
|
@echo
|
2015-09-21 14:16:53 +00:00
|
|
|
@echo Configuring Blender in \"$(BUILD_DIR)\" ...
|
2011-08-16 13:45:17 +00:00
|
|
|
|
2015-06-16 23:16:17 +00:00
|
|
|
# # if test ! -f $(BUILD_DIR)/CMakeCache.txt ; then \
|
|
|
|
# # $(CMAKE_CONFIG); \
|
|
|
|
# # fi
|
2017-03-11 06:14:39 +00:00
|
|
|
|
2015-06-16 23:16:17 +00:00
|
|
|
# # do this always incase of failed initial build, could be smarter here...
|
|
|
|
@$(CMAKE_CONFIG)
|
2011-08-16 13:45:17 +00:00
|
|
|
|
|
|
|
@echo
|
|
|
|
@echo Building Blender ...
|
2019-08-05 12:40:26 +00:00
|
|
|
$(BUILD_COMMAND) -C "$(BUILD_DIR)" -j $(NPROCS) install
|
2011-08-16 13:45:17 +00:00
|
|
|
@echo
|
|
|
|
@echo edit build configuration with: "$(BUILD_DIR)/CMakeCache.txt" run make again to rebuild.
|
2018-08-21 09:20:01 +00:00
|
|
|
@echo Blender successfully built, run from: $(BLENDER_BIN)
|
2011-08-16 13:45:17 +00:00
|
|
|
@echo
|
|
|
|
|
|
|
|
debug: all
|
2014-11-13 17:06:03 +00:00
|
|
|
full: all
|
2011-08-16 13:45:17 +00:00
|
|
|
lite: all
|
2020-06-11 21:28:01 +00:00
|
|
|
release: all
|
2014-01-20 19:41:54 +00:00
|
|
|
cycles: all
|
2011-08-16 13:45:17 +00:00
|
|
|
headless: all
|
|
|
|
bpy: all
|
2019-06-28 11:36:19 +00:00
|
|
|
developer: all
|
2019-08-05 12:40:26 +00:00
|
|
|
ninja: all
|
2011-02-03 10:07:15 +00:00
|
|
|
|
2017-07-25 14:37:55 +00:00
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
# Build dependencies
|
|
|
|
DEPS_TARGET = install
|
|
|
|
ifneq "$(findstring clean, $(MAKECMDGOALS))" ""
|
|
|
|
DEPS_TARGET = clean
|
|
|
|
endif
|
|
|
|
|
|
|
|
deps: .FORCE
|
|
|
|
@echo
|
|
|
|
@echo Configuring dependencies in \"$(DEPS_BUILD_DIR)\"
|
|
|
|
|
|
|
|
@cmake -H"$(DEPS_SOURCE_DIR)" \
|
|
|
|
-B"$(DEPS_BUILD_DIR)" \
|
|
|
|
-DHARVEST_TARGET=$(DEPS_INSTALL_DIR)
|
|
|
|
|
|
|
|
@echo
|
|
|
|
@echo Building dependencies ...
|
2019-08-30 15:47:57 +00:00
|
|
|
$(DEPS_BUILD_COMMAND) -C "$(DEPS_BUILD_DIR)" -j $(NPROCS) $(DEPS_TARGET)
|
2017-07-25 14:37:55 +00:00
|
|
|
@echo
|
|
|
|
@echo Dependencies successfully built and installed to $(DEPS_INSTALL_DIR).
|
|
|
|
@echo
|
2011-11-23 17:14:29 +00:00
|
|
|
|
2011-08-16 10:34:52 +00:00
|
|
|
# -----------------------------------------------------------------------------
|
2011-11-23 17:14:29 +00:00
|
|
|
# Configuration (save some cd'ing around)
|
2016-05-20 19:47:33 +00:00
|
|
|
config: .FORCE
|
2013-11-17 07:54:03 +00:00
|
|
|
$(CMAKE_CONFIG_TOOL) "$(BUILD_DIR)"
|
2011-11-23 17:14:29 +00:00
|
|
|
|
|
|
|
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
# Help for build targets
|
2019-02-27 23:07:50 +00:00
|
|
|
export HELP_TEXT
|
2016-05-20 19:47:33 +00:00
|
|
|
help: .FORCE
|
2019-02-27 23:07:50 +00:00
|
|
|
@echo "$$HELP_TEXT"
|
2011-08-16 10:34:52 +00:00
|
|
|
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
# Packages
|
|
|
|
#
|
2016-05-20 19:47:33 +00:00
|
|
|
package_debian: .FORCE
|
2011-02-22 05:49:21 +00:00
|
|
|
cd build_files/package_spec ; DEB_BUILD_OPTIONS="parallel=$(NPROCS)" sh ./build_debian.sh
|
2011-02-14 06:15:23 +00:00
|
|
|
|
2016-05-20 19:47:33 +00:00
|
|
|
package_pacman: .FORCE
|
2015-03-23 19:49:44 +00:00
|
|
|
cd build_files/package_spec/pacman ; MAKEFLAGS="-j$(NPROCS)" makepkg
|
2011-02-14 06:15:23 +00:00
|
|
|
|
2016-05-20 19:47:33 +00:00
|
|
|
package_archive: .FORCE
|
2013-11-17 07:54:03 +00:00
|
|
|
make -C "$(BUILD_DIR)" -s package_archive
|
2011-03-21 16:42:21 +00:00
|
|
|
@echo archive in "$(BUILD_DIR)/release"
|
|
|
|
|
2011-08-16 10:34:52 +00:00
|
|
|
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
# Tests
|
|
|
|
#
|
2016-05-20 19:47:33 +00:00
|
|
|
test: .FORCE
|
2019-09-30 08:19:55 +00:00
|
|
|
$(PYTHON) ./build_files/utils/make_test.py "$(BUILD_DIR)"
|
2011-02-14 06:15:23 +00:00
|
|
|
|
2011-04-10 10:45:56 +00:00
|
|
|
# run pep8 check check on scripts we distribute.
|
2016-05-20 19:47:33 +00:00
|
|
|
test_pep8: .FORCE
|
2015-06-10 17:57:21 +00:00
|
|
|
$(PYTHON) tests/python/pep8.py > test_pep8.log 2>&1
|
2011-04-10 10:45:56 +00:00
|
|
|
@echo "written: test_pep8.log"
|
|
|
|
|
|
|
|
# run some checks on our cmakefiles.
|
2016-05-20 19:47:33 +00:00
|
|
|
test_cmake: .FORCE
|
2015-06-10 17:57:21 +00:00
|
|
|
$(PYTHON) build_files/cmake/cmake_consistency_check.py > test_cmake_consistency.log 2>&1
|
2011-04-10 15:24:05 +00:00
|
|
|
@echo "written: test_cmake_consistency.log"
|
2011-04-10 10:45:56 +00:00
|
|
|
|
2011-07-18 09:49:26 +00:00
|
|
|
# run deprecation tests, see if we have anything to remove.
|
2016-05-20 19:47:33 +00:00
|
|
|
test_deprecated: .FORCE
|
2015-06-10 17:57:21 +00:00
|
|
|
$(PYTHON) tests/check_deprecated.py
|
2011-07-18 09:49:26 +00:00
|
|
|
|
2012-10-10 23:44:07 +00:00
|
|
|
|
2011-08-16 10:34:52 +00:00
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
# Project Files
|
|
|
|
#
|
|
|
|
|
2016-05-20 19:47:33 +00:00
|
|
|
project_qtcreator: .FORCE
|
2019-06-07 12:19:56 +00:00
|
|
|
$(PYTHON) build_files/cmake/cmake_qtcreator_project.py --build-dir "$(BUILD_DIR)"
|
2011-08-16 10:34:52 +00:00
|
|
|
|
2016-05-20 19:47:33 +00:00
|
|
|
project_netbeans: .FORCE
|
2015-06-10 17:57:21 +00:00
|
|
|
$(PYTHON) build_files/cmake/cmake_netbeans_project.py "$(BUILD_DIR)"
|
2011-08-16 10:34:52 +00:00
|
|
|
|
2016-05-20 19:47:33 +00:00
|
|
|
project_eclipse: .FORCE
|
2013-11-17 07:54:03 +00:00
|
|
|
cmake -G"Eclipse CDT4 - Unix Makefiles" -H"$(BLENDER_DIR)" -B"$(BUILD_DIR)"
|
2011-08-16 10:34:52 +00:00
|
|
|
|
|
|
|
|
2011-09-16 06:58:20 +00:00
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
# Static Checking
|
|
|
|
#
|
|
|
|
|
2016-05-20 19:47:33 +00:00
|
|
|
check_cppcheck: .FORCE
|
2011-09-20 10:15:57 +00:00
|
|
|
$(CMAKE_CONFIG)
|
2013-11-17 07:54:03 +00:00
|
|
|
cd "$(BUILD_DIR)" ; \
|
2015-06-10 17:57:21 +00:00
|
|
|
$(PYTHON) "$(BLENDER_DIR)/build_files/cmake/cmake_static_check_cppcheck.py" 2> \
|
2014-07-25 05:16:30 +00:00
|
|
|
"$(BLENDER_DIR)/check_cppcheck.txt"
|
2013-04-01 07:57:33 +00:00
|
|
|
@echo "written: check_cppcheck.txt"
|
2011-09-16 06:58:20 +00:00
|
|
|
|
2016-05-20 19:47:33 +00:00
|
|
|
check_clang_array: .FORCE
|
2012-10-06 12:36:21 +00:00
|
|
|
$(CMAKE_CONFIG)
|
2013-11-17 07:54:03 +00:00
|
|
|
cd "$(BUILD_DIR)" ; \
|
2015-06-10 17:57:21 +00:00
|
|
|
$(PYTHON) "$(BLENDER_DIR)/build_files/cmake/cmake_static_check_clang_array.py"
|
2012-10-06 12:36:21 +00:00
|
|
|
|
2016-05-20 19:47:33 +00:00
|
|
|
check_splint: .FORCE
|
2011-09-20 10:15:57 +00:00
|
|
|
$(CMAKE_CONFIG)
|
2013-11-17 07:54:03 +00:00
|
|
|
cd "$(BUILD_DIR)" ; \
|
2015-06-10 17:57:21 +00:00
|
|
|
$(PYTHON) "$(BLENDER_DIR)/build_files/cmake/cmake_static_check_splint.py"
|
2011-09-16 06:58:20 +00:00
|
|
|
|
2016-05-20 19:47:33 +00:00
|
|
|
check_sparse: .FORCE
|
2011-09-20 10:15:57 +00:00
|
|
|
$(CMAKE_CONFIG)
|
2013-11-17 07:54:03 +00:00
|
|
|
cd "$(BUILD_DIR)" ; \
|
2015-06-10 17:57:21 +00:00
|
|
|
$(PYTHON) "$(BLENDER_DIR)/build_files/cmake/cmake_static_check_sparse.py"
|
2011-09-16 06:58:20 +00:00
|
|
|
|
2016-05-20 19:47:33 +00:00
|
|
|
check_smatch: .FORCE
|
2012-09-14 05:08:48 +00:00
|
|
|
$(CMAKE_CONFIG)
|
2013-11-17 07:54:03 +00:00
|
|
|
cd "$(BUILD_DIR)" ; \
|
2015-06-10 17:57:21 +00:00
|
|
|
$(PYTHON) "$(BLENDER_DIR)/build_files/cmake/cmake_static_check_smatch.py"
|
2012-09-14 05:08:48 +00:00
|
|
|
|
2016-05-20 19:47:33 +00:00
|
|
|
check_spelling_py: .FORCE
|
2013-11-17 07:54:03 +00:00
|
|
|
cd "$(BUILD_DIR)" ; \
|
2015-06-10 17:57:21 +00:00
|
|
|
PYTHONIOENCODING=utf_8 $(PYTHON) \
|
2014-07-25 05:16:30 +00:00
|
|
|
"$(BLENDER_DIR)/source/tools/check_source/check_spelling.py" \
|
|
|
|
"$(BLENDER_DIR)/release/scripts"
|
2012-03-01 12:20:18 +00:00
|
|
|
|
2016-05-20 19:47:33 +00:00
|
|
|
check_spelling_c: .FORCE
|
2013-11-17 07:54:03 +00:00
|
|
|
cd "$(BUILD_DIR)" ; \
|
2015-06-10 17:57:21 +00:00
|
|
|
PYTHONIOENCODING=utf_8 $(PYTHON) \
|
2014-07-25 05:16:30 +00:00
|
|
|
"$(BLENDER_DIR)/source/tools/check_source/check_spelling.py" \
|
|
|
|
"$(BLENDER_DIR)/source" \
|
|
|
|
"$(BLENDER_DIR)/intern/cycles" \
|
|
|
|
"$(BLENDER_DIR)/intern/guardedalloc" \
|
|
|
|
"$(BLENDER_DIR)/intern/ghost" \
|
2012-11-12 07:33:01 +00:00
|
|
|
|
2016-05-20 19:47:33 +00:00
|
|
|
check_spelling_c_qtc: .FORCE
|
2013-11-17 07:54:03 +00:00
|
|
|
cd "$(BUILD_DIR)" ; USE_QTC_TASK=1 \
|
2015-06-10 17:57:21 +00:00
|
|
|
PYTHONIOENCODING=utf_8 $(PYTHON) \
|
2014-07-25 05:16:30 +00:00
|
|
|
"$(BLENDER_DIR)/source/tools/check_source/check_spelling.py" \
|
|
|
|
"$(BLENDER_DIR)/source" \
|
|
|
|
"$(BLENDER_DIR)/intern/cycles" \
|
|
|
|
"$(BLENDER_DIR)/intern/guardedalloc" \
|
|
|
|
"$(BLENDER_DIR)/intern/ghost" \
|
|
|
|
> \
|
|
|
|
"$(BLENDER_DIR)/check_spelling_c.tasks"
|
2012-02-08 04:37:37 +00:00
|
|
|
|
2016-05-20 19:47:33 +00:00
|
|
|
check_spelling_osl: .FORCE
|
2014-07-25 05:16:30 +00:00
|
|
|
cd "$(BUILD_DIR)" ;\
|
2015-06-10 17:57:21 +00:00
|
|
|
PYTHONIOENCODING=utf_8 $(PYTHON) \
|
2014-07-25 05:16:30 +00:00
|
|
|
"$(BLENDER_DIR)/source/tools/check_source/check_spelling.py" \
|
|
|
|
"$(BLENDER_DIR)/intern/cycles/kernel/shaders"
|
2012-10-10 23:44:07 +00:00
|
|
|
|
2016-05-20 19:47:33 +00:00
|
|
|
check_descriptions: .FORCE
|
2018-08-21 09:20:01 +00:00
|
|
|
$(BLENDER_BIN) --background -noaudio --factory-startup --python \
|
2014-07-25 05:16:30 +00:00
|
|
|
"$(BLENDER_DIR)/source/tools/check_source/check_descriptions.py"
|
2013-09-30 05:50:41 +00:00
|
|
|
|
2012-10-10 23:44:07 +00:00
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
# Utilities
|
|
|
|
#
|
|
|
|
|
2019-10-30 13:16:29 +00:00
|
|
|
source_archive: .FORCE
|
|
|
|
./build_files/utils/make_source_archive.sh
|
2012-10-10 23:44:07 +00:00
|
|
|
|
2019-02-27 23:34:50 +00:00
|
|
|
INKSCAPE_BIN?="inkscape"
|
2016-05-20 19:47:33 +00:00
|
|
|
icons: .FORCE
|
2019-02-27 23:34:50 +00:00
|
|
|
BLENDER_BIN=$(BLENDER_BIN) INKSCAPE_BIN=$(INKSCAPE_BIN) \
|
|
|
|
"$(BLENDER_DIR)/release/datafiles/blender_icons_update.py"
|
|
|
|
BLENDER_BIN=$(BLENDER_BIN) INKSCAPE_BIN=$(INKSCAPE_BIN) \
|
|
|
|
"$(BLENDER_DIR)/release/datafiles/prvicons_update.py"
|
2013-08-27 10:03:37 +00:00
|
|
|
|
2018-04-24 10:08:01 +00:00
|
|
|
icons_geom: .FORCE
|
2018-08-21 09:22:59 +00:00
|
|
|
BLENDER_BIN=$(BLENDER_BIN) \
|
2018-04-24 10:08:01 +00:00
|
|
|
"$(BLENDER_DIR)/release/datafiles/blender_icons_geom_update.py"
|
|
|
|
|
2016-05-20 19:47:33 +00:00
|
|
|
update: .FORCE
|
2019-09-30 08:19:55 +00:00
|
|
|
$(PYTHON) ./build_files/utils/make_update.py
|
2014-09-15 04:04:30 +00:00
|
|
|
|
2019-04-16 13:42:54 +00:00
|
|
|
format: .FORCE
|
2020-02-15 08:22:26 +00:00
|
|
|
PATH="../lib/${OS_NCASE}_${CPU}/llvm/bin/:../lib/${OS_NCASE}_centos7_${CPU}/llvm/bin/:../lib/${OS_NCASE}/llvm/bin/:$(PATH)" \
|
2019-09-30 08:19:55 +00:00
|
|
|
$(PYTHON) source/tools/utils_maintenance/clang_format_paths.py $(PATHS)
|
2019-04-16 13:42:54 +00:00
|
|
|
|
2012-10-10 23:44:07 +00:00
|
|
|
|
2011-10-13 06:59:09 +00:00
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
# Documentation
|
|
|
|
#
|
|
|
|
|
|
|
|
# Simple version of ./doc/python_api/sphinx_doc_gen.sh with no PDF generation.
|
2016-05-20 19:47:33 +00:00
|
|
|
doc_py: .FORCE
|
2018-09-13 05:37:30 +00:00
|
|
|
ASAN_OPTIONS=halt_on_error=0 \
|
2018-08-21 09:20:01 +00:00
|
|
|
$(BLENDER_BIN) --background -noaudio --factory-startup \
|
2016-07-14 15:26:04 +00:00
|
|
|
--python doc/python_api/sphinx_doc_gen.py
|
2011-11-05 01:48:10 +00:00
|
|
|
cd doc/python_api ; sphinx-build -b html sphinx-in sphinx-out
|
2018-08-13 23:07:50 +00:00
|
|
|
@echo "docs written into: '$(BLENDER_DIR)/doc/python_api/sphinx-out/index.html'"
|
2011-10-13 06:59:09 +00:00
|
|
|
|
2016-05-20 19:47:33 +00:00
|
|
|
doc_doxy: .FORCE
|
2012-02-27 20:27:19 +00:00
|
|
|
cd doc/doxygen; doxygen Doxyfile
|
2011-11-05 01:48:10 +00:00
|
|
|
@echo "docs written into: '$(BLENDER_DIR)/doc/doxygen/html/index.html'"
|
|
|
|
|
2016-05-20 19:47:33 +00:00
|
|
|
doc_dna: .FORCE
|
2018-08-21 09:20:01 +00:00
|
|
|
$(BLENDER_BIN) --background -noaudio --factory-startup \
|
2016-07-14 15:26:04 +00:00
|
|
|
--python doc/blender_file_format/BlendFileDnaExporter_25.py
|
2011-10-16 11:09:15 +00:00
|
|
|
@echo "docs written into: '$(BLENDER_DIR)/doc/blender_file_format/dna.html'"
|
|
|
|
|
2016-05-20 19:47:33 +00:00
|
|
|
doc_man: .FORCE
|
2018-08-21 09:20:01 +00:00
|
|
|
$(PYTHON) doc/manpage/blender.1.py $(BLENDER_BIN) blender.1
|
2011-10-16 11:09:15 +00:00
|
|
|
|
2016-05-20 19:47:33 +00:00
|
|
|
help_features: .FORCE
|
2018-09-13 06:20:02 +00:00
|
|
|
@$(PYTHON) "$(BLENDER_DIR)/build_files/cmake/cmake_print_build_options.py" $(BLENDER_DIR)"/CMakeLists.txt"
|
2011-10-13 06:59:09 +00:00
|
|
|
|
2016-05-20 19:47:33 +00:00
|
|
|
clean: .FORCE
|
2019-08-05 12:40:26 +00:00
|
|
|
$(BUILD_COMMAND) -C "$(BUILD_DIR)" clean
|
2011-02-14 06:15:23 +00:00
|
|
|
|
2011-02-03 10:07:15 +00:00
|
|
|
.PHONY: all
|
2014-12-20 01:14:04 +00:00
|
|
|
|
2016-05-20 19:47:33 +00:00
|
|
|
.FORCE:
|