blob: c265259da02df51c2de7ea582930de41d1501a95 [file] [log] [blame]
Shinichiro Hamajiee482fd2015-08-17 17:38:24 +09001#
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 Hamajid78cba12015-12-18 15:26:17 +090018ifneq ($(filter-out false,$(USE_GOMA)),)
Shinichiro Hamajiee482fd2015-08-17 17:38:24 +090019 ifdef GOMA_DIR
20 goma_dir := $(GOMA_DIR)
21 else
22 goma_dir := $(HOME)/goma
23 endif
Shinichiro Hamaji09295a82015-09-24 17:51:20 +090024 GOMA_CC := $(goma_dir)/gomacc
Shinichiro Hamajiee482fd2015-08-17 17:38:24 +090025
Shinichiro Hamajiee482fd2015-08-17 17:38:24 +090026 # Append gomacc to existing *_WRAPPER variables so it's possible to
27 # use both ccache and gomacc.
Shinichiro Hamaji09295a82015-09-24 17:51:20 +090028 CC_WRAPPER := $(strip $(CC_WRAPPER) $(GOMA_CC))
29 CXX_WRAPPER := $(strip $(CXX_WRAPPER) $(GOMA_CC))
Yoshisato Yanagisawa4f3e5682017-06-05 18:08:36 +090030 JAVAC_WRAPPER := $(strip $(JAVAC_WRAPPER) $(GOMA_CC))
Shinichiro Hamajiee482fd2015-08-17 17:38:24 +090031
Shinichiro Hamajiee482fd2015-08-17 17:38:24 +090032 goma_dir :=
33endif