diff options
Diffstat (limited to 'jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/bits.mk')
-rw-r--r-- | jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/bits.mk | 112 |
1 files changed, 112 insertions, 0 deletions
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/bits.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/bits.mk new file mode 100644 index 0000000..a1a7eef --- /dev/null +++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/bits.mk | |||
@@ -0,0 +1,112 @@ | |||
1 | ########################################################################### ### | ||
2 | #@Title Useful special targets which don't build anything | ||
3 | #@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved | ||
4 | #@License Dual MIT/GPLv2 | ||
5 | # | ||
6 | # The contents of this file are subject to the MIT license as set out below. | ||
7 | # | ||
8 | # Permission is hereby granted, free of charge, to any person obtaining a copy | ||
9 | # of this software and associated documentation files (the "Software"), to deal | ||
10 | # in the Software without restriction, including without limitation the rights | ||
11 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
12 | # copies of the Software, and to permit persons to whom the Software is | ||
13 | # furnished to do so, subject to the following conditions: | ||
14 | # | ||
15 | # The above copyright notice and this permission notice shall be included in | ||
16 | # all copies or substantial portions of the Software. | ||
17 | # | ||
18 | # Alternatively, the contents of this file may be used under the terms of | ||
19 | # the GNU General Public License Version 2 ("GPL") in which case the provisions | ||
20 | # of GPL are applicable instead of those above. | ||
21 | # | ||
22 | # If you wish to allow use of your version of this file only under the terms of | ||
23 | # GPL, and not to allow others to use your version of this file under the terms | ||
24 | # of the MIT license, indicate your decision by deleting the provisions above | ||
25 | # and replace them with the notice and other provisions required by GPL as set | ||
26 | # out in the file called "GPL-COPYING" included in this distribution. If you do | ||
27 | # not delete the provisions above, a recipient may use your version of this file | ||
28 | # under the terms of either the MIT license or GPL. | ||
29 | # | ||
30 | # This License is also included in this distribution in the file called | ||
31 | # "MIT-COPYING". | ||
32 | # | ||
33 | # EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS | ||
34 | # PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING | ||
35 | # BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR | ||
36 | # PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR | ||
37 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER | ||
38 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
39 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
40 | ### ########################################################################### | ||
41 | |||
42 | ifneq ($(filter dumpvar-%,$(MAKECMDGOALS)),) | ||
43 | dumpvar-%: ; | ||
44 | $(foreach _var_to_dump,$(patsubst dumpvar-%,%,$(filter dumpvar-%,$(MAKECMDGOALS))),$(info $(if $(filter undefined,$(origin $(_var_to_dump))),# $$($(_var_to_dump)) is not set,$(_var_to_dump) := $($(_var_to_dump))))) | ||
45 | endif | ||
46 | |||
47 | ifneq ($(filter whereis-%,$(MAKECMDGOALS)),) | ||
48 | whereis-%: ; | ||
49 | $(foreach _module_to_find,$(patsubst whereis-%,%,$(filter whereis-%,$(MAKECMDGOALS))),$(info $(if $(INTERNAL_MAKEFILE_FOR_MODULE_$(_module_to_find)),$(INTERNAL_MAKEFILE_FOR_MODULE_$(_module_to_find)),# No module $(_module_to_find)))) | ||
50 | endif | ||
51 | |||
52 | ifneq ($(filter whatis-%,$(MAKECMDGOALS)),) | ||
53 | whatis-$(RELATIVE_OUT)/target/%: ; | ||
54 | whatis-$(RELATIVE_OUT)/host/%: ; | ||
55 | $(foreach _file_to_find,$(patsubst whatis-%,%,$(filter whatis-%,$(MAKECMDGOALS))),$(info $(strip $(foreach _m,$(ALL_MODULES),$(if $(filter $(_file_to_find),$(INTERNAL_TARGETS_FOR_$(_m))),$(_file_to_find) is in $(_m) which is defined in $(INTERNAL_MAKEFILE_FOR_MODULE_$(_m)),))))) | ||
56 | endif | ||
57 | |||
58 | .PHONY: ls-modules | ||
59 | ls-modules: | ||
60 | @: $(foreach _m,$(ALL_MODULES),$(info $($(_m)_type) $(_m) $(patsubst $(TOP)/%,%,$(INTERNAL_MAKEFILE_FOR_MODULE_$(_m))))) | ||
61 | |||
62 | ifeq ($(strip $(MAKECMDGOALS)),visualise) | ||
63 | FORMAT ?= xlib | ||
64 | GRAPHVIZ ?= neato | ||
65 | visualise: $(OUT)/MAKE_RULES.dot | ||
66 | $(GRAPHVIZ) -T$(FORMAT) -o $(OUT)/MAKE_RULES.$(FORMAT) $< | ||
67 | $(OUT)/MAKE_RULES.dot: $(OUT)/MAKE_RULES | ||
68 | perl $(MAKE_TOP)/tools/depgraph.pl -t $(TOP) -g $(firstword $(GRAPHVIZ)) $(OUT)/MAKE_RULES >$(OUT)/MAKE_RULES.dot | ||
69 | $(OUT)/MAKE_RULES: $(ALL_MAKEFILES) | ||
70 | -$(MAKE) -C $(TOP) -f $(MAKE_TOP)/toplevel.mk TOP=$(TOP) OUT=$(OUT) ls-modules -qp >$(OUT)/MAKE_RULES 2>&1 | ||
71 | else | ||
72 | visualise: | ||
73 | @: $(error visualise specified along with other goals. This is not supported) | ||
74 | endif | ||
75 | |||
76 | .PHONY: help | ||
77 | help: | ||
78 | @echo 'Build targets' | ||
79 | @echo ' make, make build Build all components of the build' | ||
80 | @echo ' make components Build only the user-mode components' | ||
81 | @echo ' make kbuild Build only the kernel-mode components' | ||
82 | @echo ' make MODULE Build the module MODULE and all of its dependencies' | ||
83 | @echo ' make eurasiacon/binary2_.../target/libsomething.so' | ||
84 | @echo ' Build a particular file (including intermediates)' | ||
85 | @echo 'Variables' | ||
86 | @echo ' make V=1 ... Print the commands that are executed' | ||
87 | @echo ' make W=1 ... Enable extra compiler warnings' | ||
88 | @echo ' make D=opt ... Set build system debug option (D=help for a list)' | ||
89 | @echo ' make OUT=dir ... Place output+intermediates in specified directory' | ||
90 | @echo ' EXCLUDED_APIS=... List of APIs to remove from the build' | ||
91 | @echo ' make SOMEOPTION=1 ... Set configuration options (see config/core.mk)' | ||
92 | @echo ' Defaults are set by $(PVR_BUILD_DIR)/Makefile' | ||
93 | @echo 'Clean targets' | ||
94 | @echo ' make clean Remove only intermediates for the current build' | ||
95 | @echo ' make clobber As "make clean", but remove output files too' | ||
96 | @echo ' make clean-MODULE Clean (or clobber) only files for MODULE' | ||
97 | @echo '' | ||
98 | @echo 'Special targets' | ||
99 | @echo ' make whereis-MODULE Show the path to the Linux.mk defining MODULE' | ||
100 | @echo ' make whatis-FILE Show which module builds an output FILE' | ||
101 | @echo ' make ls-modules List all modules defined by makefiles' | ||
102 | |||
103 | ifneq ($(filter help,$(D)),) | ||
104 | empty := | ||
105 | space := $(empty) $(empty) | ||
106 | $(info Debug options) | ||
107 | $(info $(space)D=modules dump module info) | ||
108 | $(info $(space)D=freeze-config prevent config changes) | ||
109 | $(info $(space)D=config-changes dump diffs when config changes) | ||
110 | $(info Options may be combined: make D=freeze-config,config-changes) | ||
111 | $(error D=help given) | ||
112 | endif | ||