File: Makefile

package info (click to toggle)
tbb 2.0r020-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 6,128 kB
  • ctags: 4,501
  • sloc: cpp: 24,707; ansic: 1,563; asm: 777; makefile: 470; sh: 175
file content (123 lines) | stat: -rw-r--r-- 4,934 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# Copyright 2005-2008 Intel Corporation.  All Rights Reserved.
#
# This file is part of Threading Building Blocks.
#
# Threading Building Blocks is free software; you can redistribute it
# and/or modify it under the terms of the GNU General Public License
# version 2 as published by the Free Software Foundation.
#
# Threading Building Blocks 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 Threading Building Blocks; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
#
# As a special exception, you may use this file as part of a free software
# library without restriction.  Specifically, if other files instantiate
# templates or use macros or inline functions from this file, or you compile
# this file and link it with other files to produce an executable, this
# file does not by itself cause the resulting executable to be covered by
# the GNU General Public License.  This exception does not however
# invalidate any other reasons why the executable file might be covered by
# the GNU General Public License.

tbb_root?=.
include $(tbb_root)/build/common.inc
.PHONY: all tbb tbbmalloc test debug examples clean

all: release debug examples

tbb: tbb_release tbb_debug

tbbmalloc: tbbmalloc_release tbbmalloc_debug

test: tbbmalloc_test_release test_release tbbmalloc_test_debug test_debug

test_no_depends: tbbmalloc_test_release_no_depends test_release_no_depends tbbmalloc_test_debug_no_depends test_debug_no_depends

release: tbb_release tbbmalloc_release tbbmalloc_test_release test_release
 
debug: tbb_debug tbbmalloc_debug tbbmalloc_test_debug test_debug

examples: tbb tbbmalloc examples_debug clean_examples examples_release

clean: clean_release clean_debug clean_examples
	@echo clean done


.PHONY: tbb_release tbb_debug test_release test_debug

# do not delete double-space after -C option
tbb_release: mkdir_release
	$(MAKE) -C "$(work_dir)_release"  -r -f $(tbb_root)/build/Makefile.tbb cfg=release tbb_root=$(tbb_root)

tbb_debug: mkdir_debug
	$(MAKE) -C "$(work_dir)_debug"  -r -f $(tbb_root)/build/Makefile.tbb cfg=debug tbb_root=$(tbb_root)

test_release: mkdir_release tbb_release test_release_no_depends
test_release_no_depends: 
	-$(MAKE) -C "$(work_dir)_release"  -r -f $(tbb_root)/build/Makefile.test cfg=release tbb_root=$(tbb_root) 

test_debug: tbb_debug mkdir_debug test_debug_no_depends
test_debug_no_depends:
	-$(MAKE) -C "$(work_dir)_debug"  -r -f $(tbb_root)/build/Makefile.test cfg=debug tbb_root=$(tbb_root)

.PHONY: tbbmalloc_release tbbmalloc_debug tbbmalloc_test_release tbbmalloc_test_debug

tbbmalloc_release: mkdir_release
	$(MAKE) -C "$(work_dir)_release"  -r -f $(tbb_root)/build/Makefile.tbbmalloc cfg=release malloc tbb_root=$(tbb_root)

tbbmalloc_debug: mkdir_debug
	$(MAKE) -C "$(work_dir)_debug"  -r -f $(tbb_root)/build/Makefile.tbbmalloc cfg=debug malloc tbb_root=$(tbb_root)

tbbmalloc_test_release: tbb_release tbbmalloc_release mkdir_release tbbmalloc_test_release_no_depends
tbbmalloc_test_release_no_depends:
	-$(MAKE) -C "$(work_dir)_release"  -r -f $(tbb_root)/build/Makefile.tbbmalloc cfg=release malloc_test tbb_root=$(tbb_root)

tbbmalloc_test_debug: tbb_debug tbbmalloc_debug mkdir_debug tbbmalloc_test_debug_no_depends
tbbmalloc_test_debug_no_depends:
	-$(MAKE) -C "$(work_dir)_debug"  -r -f $(tbb_root)/build/Makefile.tbbmalloc cfg=debug malloc_test tbb_root=$(tbb_root)

.PHONY: examples_release examples_debug

examples_release: tbb_release tbbmalloc_release
	$(MAKE) -C examples -r -f Makefile tbb_root=.. release test

examples_debug: tbb_debug tbbmalloc_debug
	$(MAKE) -C examples -r -f Makefile tbb_root=.. debug test

.PHONY: clean_release clean_debug clean_examples

clean_%:
	$(MAKE) -C "$(work_dir)_debug"  -r -f $(tbb_root)/build/Makefile.test cfg=debug tbb_root=$(tbb_root) $@
	
clean_release:
	$(shell $(RM) $(work_dir)_release$(SLASH)*.* $(NUL))
	$(shell $(RD) $(work_dir)_release $(NUL))

clean_debug:
	$(shell $(RM) $(work_dir)_debug$(SLASH)*.* $(NUL))
	$(shell $(RD) $(work_dir)_debug $(NUL))
	
clean_examples:
	$(shell $(MAKE) -s -i -r -C examples -f Makefile tbb_root=.. clean $(NUL))

.PHONY: mkdir_release mkdir_debug

mkdir_release:
	$(shell $(MD) "$(work_dir)_release" $(NUL))
	$(if $(subst undefined,,$(origin_build_dir)),,cd "$(work_dir)_release" && $(MAKE_TBBVARS) $(tbb_build_prefix)_release)

mkdir_debug:
	$(shell $(MD) "$(work_dir)_debug" $(NUL))
	$(if $(subst undefined,,$(origin_build_dir)),,cd "$(work_dir)_debug" && $(MAKE_TBBVARS) $(tbb_build_prefix)_debug)

info:
	@echo OS: $(tbb_os)
	@echo arch=$(arch)
	@echo compiler=$(compiler)
	@echo runtime=$(runtime)
	@echo tbb_build_prefix=$(tbb_build_prefix)