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 include $(call all-makefiles-under,$(CTS_AUDIO_TOP))
     23 
     24 CTS_AUDIO_INSTALL_DIR := $(HOST_OUT)/cts-audio-quality/android-cts-audio-quality
     25 CTS_AUDIO_QUALITY_ZIP := $(HOST_OUT)/cts-audio-quality/android-cts-audio-quality.zip
     26 
     27 cts_audio_quality_client_apk := $(TARGET_OUT_DATA_APPS)/CtsAudioClient/CtsAudioClient.apk
     28 cts_audio_quality_host_bins := $(ALL_MODULES.cts_audio_quality_test.INSTALLED) $(ALL_MODULES.cts_audio_quality.INSTALLED)
     29 $(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)
     34 	$(hide) rm -rf $@ $(CTS_AUDIO_INSTALL_DIR)
     35 	$(hide) mkdir -p $(CTS_AUDIO_INSTALL_DIR)/client
     36 	$(hide) $(ACP) -fp $(PRIVATE_CLIENT_APK) \
     37         $(CTS_AUDIO_INSTALL_DIR)/client
     38 	$(hide) $(ACP) -fp $(PRIVATE_HOST_BINS) $(CTS_AUDIO_INSTALL_DIR)
     39 	$(hide) $(ACP) -fr $(PRIVATE_TEST_DESC) $(CTS_AUDIO_INSTALL_DIR)
     40 	$(hide) echo "Package cts_audio: $@"
     41 	$(hide) cd $(dir $@) && \
     42         zip -rq $(notdir $@) android-cts-audio-quality -x android-cts-audio-quality/reports/\*
     43 
     44 cts_audio_quality_client_apk :=
     45 cts_audio_quality_host_bins :=
     46 
     47 # target to build only this package
     48 .PHONY: cts_audio_quality_package
     49 cts_audio_quality_package: $(CTS_AUDIO_QUALITY_ZIP)
     50 
     51 cts: $(CTS_AUDIO_QUALITY_ZIP)
     52 
     53 ifneq ($(filter cts, $(MAKECMDGOALS)),)
     54 $(call dist-for-goals, cts, $(CTS_AUDIO_QUALITY_ZIP))
     55 endif # cts
     56 
     57 endif # linux
     58