oneTBB/Makefile

74 строки
2.6 KiB
Makefile

# Copyright (c) 2005-2020 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
tbb_root?=.
include $(tbb_root)/build/common.inc
.PHONY: default all tbb tbbmalloc test examples
#workaround for non-depend targets tbb and tbbmalloc which both depend on version_string.ver
#According to documentation, recursively invoked make commands can process their targets in parallel
.NOTPARALLEL: tbb tbbmalloc
default: tbb tbbmalloc
all: tbb tbbmalloc test examples
tbb: mkdir
$(MAKE) -C "$(work_dir)_debug" -r -f $(tbb_root)/build/Makefile.tbb cfg=debug
$(MAKE) -C "$(work_dir)_release" -r -f $(tbb_root)/build/Makefile.tbb cfg=release
tbbmalloc: mkdir
$(MAKE) -C "$(work_dir)_debug" -r -f $(tbb_root)/build/Makefile.tbbmalloc cfg=debug malloc
$(MAKE) -C "$(work_dir)_release" -r -f $(tbb_root)/build/Makefile.tbbmalloc cfg=release malloc
test: tbb tbbmalloc
-$(MAKE) -C "$(work_dir)_debug" -r -f $(tbb_root)/build/Makefile.tbbmalloc cfg=debug malloc_test
-$(MAKE) -C "$(work_dir)_debug" -r -f $(tbb_root)/build/Makefile.test cfg=debug
-$(MAKE) -C "$(work_dir)_release" -r -f $(tbb_root)/build/Makefile.tbbmalloc cfg=release malloc_test
-$(MAKE) -C "$(work_dir)_release" -r -f $(tbb_root)/build/Makefile.test cfg=release
examples: tbb tbbmalloc
$(MAKE) -C examples -r -f Makefile tbb_root=.. release test
python: tbb
$(MAKE) -C "$(work_dir)_release" -rf $(tbb_root)/python/Makefile install
doxygen:
doxygen Doxyfile
.PHONY: clean clean_examples mkdir info
clean: clean_examples
$(shell $(RM) $(work_dir)_release$(SLASH)*.* >$(NUL) 2>$(NUL))
$(shell $(RD) $(work_dir)_release >$(NUL) 2>$(NUL))
$(shell $(RM) $(work_dir)_debug$(SLASH)*.* >$(NUL) 2>$(NUL))
$(shell $(RD) $(work_dir)_debug >$(NUL) 2>$(NUL))
@echo clean done
clean_examples:
$(shell $(MAKE) -s -i -r -C examples -f Makefile tbb_root=.. clean >$(NUL) 2>$(NUL))
mkdir:
$(shell $(MD) "$(work_dir)_release" >$(NUL) 2>$(NUL))
$(shell $(MD) "$(work_dir)_debug" >$(NUL) 2>$(NUL))
@echo Created $(work_dir)_release and ..._debug directories
info:
@echo OS: $(tbb_os)
@echo arch=$(arch)
@echo compiler=$(compiler)
@echo runtime=$(runtime)
@echo tbb_build_prefix=$(tbb_build_prefix)