blob: 32aaa2586e44b56542039040c65adf1eb41087b7 [file] [log] [blame]
Brian Muramatsu70a9e3f2010-06-25 15:27:09 -07001#
2# Copyright (C) 2010 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
17LOCAL_PATH:= $(call my-dir)
18include $(CLEAR_VARS)
19
20LOCAL_MODULE_TAGS := optional
21
22LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
23
24LOCAL_SRC_FILES := $(call all-java-files-under, src)
25
26LOCAL_PACKAGE_NAME := CtsVerifier
27
Brian Muramatsuf8946202010-11-09 13:43:39 -080028LOCAL_JNI_SHARED_LIBRARIES := libctsverifier_jni libaudioquality
Brian Muramatsuaccc6842010-08-11 18:57:27 -070029
Brian Muramatsu70a9e3f2010-06-25 15:27:09 -070030LOCAL_SDK_VERSION := current
31
32include $(BUILD_PACKAGE)
33
Brian Muramatsuf65e6202010-11-29 16:07:30 -080034# Builds and launches CTS Verifier on a device.
35.PHONY: cts-verifier
36cts-verifier: CtsVerifier adb
37 adb install -r $(ANDROID_PRODUCT_OUT)/data/app/CtsVerifier.apk \
38 && adb shell "am start -n com.android.cts.verifier/.CtsVerifierActivity"
39
Brian Muramatsu2ddd8052011-08-10 16:55:44 -070040#
41# Creates a "cts-verifier" directory that will contain:
42#
43# 1. Out directory with a "android-cts-verifier" containing the CTS Verifier
44# and other binaries it needs.
45#
46# 2. Zipped version of the android-cts-verifier directory to be included with
47# the build distribution.
48#
49cts-dir := $(HOST_OUT)/cts-verifier
50verifier-dir-name := android-cts-verifier
51verifier-dir := $(cts-dir)/$(verifier-dir-name)
52verifier-zip-name := $(verifier-dir-name).zip
53verifier-zip := $(cts-dir)/$(verifier-zip-name)
54
55cts : $(verifier-zip)
Brian Muramatsudd2bf712011-08-12 12:46:07 -070056$(verifier-zip) : CtsVerifier $(ACP) $(HOST_OUT)/bin/cts-usb-accessory
Brian Muramatsu2ddd8052011-08-10 16:55:44 -070057 $(hide) mkdir -p $(verifier-dir)
58 $(hide) $(ACP) -fp $(call intermediates-dir-for,APPS,CtsVerifier)/package.apk \
59 $(verifier-dir)/CtsVerifier.apk
Brian Muramatsudd2bf712011-08-12 12:46:07 -070060 $(hide) $(ACP) -fp $(HOST_OUT)/bin/cts-usb-accessory $(verifier-dir)/cts-usb-accessory
Brian Muramatsu2ddd8052011-08-10 16:55:44 -070061 $(hide) cd $(cts-dir) && zip -rq $(verifier-dir-name) $(verifier-dir-name)
62
63ifneq ($(filter cts, $(MAKECMDGOALS)),)
64 $(call dist-for-goals, cts, $(verifier-zip):$(verifier-zip-name))
65endif
66
Brian Muramatsu70a9e3f2010-06-25 15:27:09 -070067include $(call all-makefiles-under,$(LOCAL_PATH))