blob: c3404d251682373dc7e83c0735ba1e4b6e46257c [file] [log] [blame]
Keun young Park5eba08f2012-03-26 18:31:29 -07001#
2# Copyright (C) 2012 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# build only for linux
18ifeq ($(HOST_OS),linux)
19
20CTS_AUDIO_TOP:= $(call my-dir)
21
Dan Willemsenc099d052016-05-24 15:33:05 -070022include $(call all-makefiles-under,$(CTS_AUDIO_TOP))
23
Keun young Park51a36fa2012-07-27 09:52:08 -070024CTS_AUDIO_INSTALL_DIR := $(HOST_OUT)/cts-audio-quality/android-cts-audio-quality
25CTS_AUDIO_QUALITY_ZIP := $(HOST_OUT)/cts-audio-quality/android-cts-audio-quality.zip
Keun young Park5eba08f2012-03-26 18:31:29 -070026
Ying Wangd79e2332014-07-21 15:29:10 -070027cts_audio_quality_client_apk := $(TARGET_OUT_DATA_APPS)/CtsAudioClient/CtsAudioClient.apk
Dan Willemsenc099d052016-05-24 15:33:05 -070028cts_audio_quality_host_bins := $(ALL_MODULES.cts_audio_quality_test.INSTALLED) $(ALL_MODULES.cts_audio_quality.INSTALLED)
Ying Wang1a833732013-07-10 11:29:35 -070029$(CTS_AUDIO_QUALITY_ZIP): PRIVATE_CLIENT_APK := $(cts_audio_quality_client_apk)
30$(CTS_AUDIO_QUALITY_ZIP): PRIVATE_HOST_BINS := $(cts_audio_quality_host_bins)
31$(CTS_AUDIO_QUALITY_ZIP): PRIVATE_TEST_DESC := $(CTS_AUDIO_TOP)/test_description
32$(CTS_AUDIO_QUALITY_ZIP): $(cts_audio_quality_client_apk) $(cts_audio_quality_host_bins) \
33 $(CTS_AUDIO_TOP)/test_description | $(ACP)
Dan Willemsenc099d052016-05-24 15:33:05 -070034 $(hide) rm -rf $@ $(CTS_AUDIO_INSTALL_DIR)
Keun young Park5eba08f2012-03-26 18:31:29 -070035 $(hide) mkdir -p $(CTS_AUDIO_INSTALL_DIR)/client
Ying Wang1a833732013-07-10 11:29:35 -070036 $(hide) $(ACP) -fp $(PRIVATE_CLIENT_APK) \
Keun young Park5eba08f2012-03-26 18:31:29 -070037 $(CTS_AUDIO_INSTALL_DIR)/client
Ying Wang1a833732013-07-10 11:29:35 -070038 $(hide) $(ACP) -fp $(PRIVATE_HOST_BINS) $(CTS_AUDIO_INSTALL_DIR)
39 $(hide) $(ACP) -fr $(PRIVATE_TEST_DESC) $(CTS_AUDIO_INSTALL_DIR)
Keun young Parkf4426362012-07-26 13:06:04 -070040 $(hide) echo "Package cts_audio: $@"
Ying Wang1a833732013-07-10 11:29:35 -070041 $(hide) cd $(dir $@) && \
42 zip -rq $(notdir $@) android-cts-audio-quality -x android-cts-audio-quality/reports/\*
43
44cts_audio_quality_client_apk :=
45cts_audio_quality_host_bins :=
Keun young Parkf4426362012-07-26 13:06:04 -070046
Keun young Park69adcd72012-09-25 15:23:16 -070047# target to build only this package
48.PHONY: cts_audio_quality_package
49cts_audio_quality_package: $(CTS_AUDIO_QUALITY_ZIP)
50
Keun young Park51a36fa2012-07-27 09:52:08 -070051cts: $(CTS_AUDIO_QUALITY_ZIP)
Keun young Park69adcd72012-09-25 15:23:16 -070052
Keun young Parkf4426362012-07-26 13:06:04 -070053ifneq ($(filter cts, $(MAKECMDGOALS)),)
Keun young Park51a36fa2012-07-27 09:52:08 -070054$(call dist-for-goals, cts, $(CTS_AUDIO_QUALITY_ZIP))
Keun young Parkf4426362012-07-26 13:06:04 -070055endif # cts
Keun young Park5eba08f2012-03-26 18:31:29 -070056
Keun young Park5eba08f2012-03-26 18:31:29 -070057endif # linux