Shinichiro Hamaji | ee482fd | 2015-08-17 17:38:24 +0900 | [diff] [blame] | 1 | # |
| 2 | # Copyright (C) 2015 The Android Open Source Project |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
| 15 | # |
| 16 | |
| 17 | # Notice: this works only with Google's Goma build infrastructure. |
Shinichiro Hamaji | d78cba1 | 2015-12-18 15:26:17 +0900 | [diff] [blame] | 18 | ifneq ($(filter-out false,$(USE_GOMA)),) |
Shinichiro Hamaji | ee482fd | 2015-08-17 17:38:24 +0900 | [diff] [blame] | 19 | ifdef GOMA_DIR |
| 20 | goma_dir := $(GOMA_DIR) |
| 21 | else |
| 22 | goma_dir := $(HOME)/goma |
| 23 | endif |
Shinichiro Hamaji | 09295a8 | 2015-09-24 17:51:20 +0900 | [diff] [blame] | 24 | GOMA_CC := $(goma_dir)/gomacc |
Shinichiro Hamaji | ee482fd | 2015-08-17 17:38:24 +0900 | [diff] [blame] | 25 | |
Shinichiro Hamaji | ee482fd | 2015-08-17 17:38:24 +0900 | [diff] [blame] | 26 | # Append gomacc to existing *_WRAPPER variables so it's possible to |
| 27 | # use both ccache and gomacc. |
Shinichiro Hamaji | 09295a8 | 2015-09-24 17:51:20 +0900 | [diff] [blame] | 28 | CC_WRAPPER := $(strip $(CC_WRAPPER) $(GOMA_CC)) |
| 29 | CXX_WRAPPER := $(strip $(CXX_WRAPPER) $(GOMA_CC)) |
Yoshisato Yanagisawa | 4f3e568 | 2017-06-05 18:08:36 +0900 | [diff] [blame] | 30 | JAVAC_WRAPPER := $(strip $(JAVAC_WRAPPER) $(GOMA_CC)) |
Shinichiro Hamaji | ee482fd | 2015-08-17 17:38:24 +0900 | [diff] [blame] | 31 | |
Shinichiro Hamaji | ee482fd | 2015-08-17 17:38:24 +0900 | [diff] [blame] | 32 | goma_dir := |
| 33 | endif |