Home | History | Annotate | Download | only in audio_quality
      1 #
      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
     18 ifeq ($(HOST_OS),linux)
     19 
     20 CTS_AUDIO_TOP:= $(call my-dir)
     21 
     22 CTS_AUDIO_INSTALL_DIR := $(HOST_OUT)/cts-audio-quality/android-cts-audio-quality
     23 CTS_AUDIO_QUALITY_ZIP := $(HOST_OUT)/cts-audio-quality/android-cts-audio-quality.zip
     24 
     25 cts_audio_quality_client_apk := $(TARGET_OUT_DATA_APPS)/CtsAudioClient.apk
     26 cts_audio_quality_host_bins := $(HOST_OUT)/bin/cts_audio_quality_test $(HOST_OUT)/bin/cts_audio_quality
     27 $(CTS_AUDIO_QUALITY_ZIP): PRIVATE_CLIENT_APK := $(cts_audio_quality_client_apk)
     28 $(CTS_AUDIO_QUALITY_ZIP): PRIVATE_HOST_BINS := $(cts_audio_quality_host_bins)
     29 $(CTS_AUDIO_QUALITY_ZIP): PRIVATE_TEST_DESC := $(CTS_AUDIO_TOP)/test_description
     30 $(CTS_AUDIO_QUALITY_ZIP): $(cts_audio_quality_client_apk) $(cts_audio_quality_host_bins) \
     31     $(CTS_AUDIO_TOP)/test_description | $(ACP)
     32 	$(hide) mkdir -p $(CTS_AUDIO_INSTALL_DIR)/client
     33 	$(hide) $(ACP) -fp $(PRIVATE_CLIENT_APK) \
     34         $(CTS_AUDIO_INSTALL_DIR)/client
     35 	$(hide) $(ACP) -fp $(PRIVATE_HOST_BINS) $(CTS_AUDIO_INSTALL_DIR)
     36 	$(hide) $(ACP) -fr $(PRIVATE_TEST_DESC) $(CTS_AUDIO_INSTALL_DIR)
     37 	$(hide) echo "Package cts_audio: $@"
     38 	$(hide) cd $(dir $@) && \
     39         zip -rq $(notdir $@) android-cts-audio-quality -x android-cts-audio-quality/reports/\*
     40 
     41 cts_audio_quality_client_apk :=
     42 cts_audio_quality_host_bins :=
     43 
     44 # target to build only this package
     45 .PHONY: cts_audio_quality_package
     46 cts_audio_quality_package: $(CTS_AUDIO_QUALITY_ZIP)
     47 
     48 cts: $(CTS_AUDIO_QUALITY_ZIP)
     49 
     50 ifneq ($(filter cts, $(MAKECMDGOALS)),)
     51 $(call dist-for-goals, cts, $(CTS_AUDIO_QUALITY_ZIP))
     52 endif # cts
     53 
     54 include $(call all-subdir-makefiles)
     55 
     56 endif # linux
     57