1# 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 28LOCAL_JNI_SHARED_LIBRARIES := libctsverifier_jni libcameraanalyzer 29 30LOCAL_PROGUARD_FLAG_FILES := proguard.flags 31 32LOCAL_SDK_VERSION := current 33 34include $(BUILD_PACKAGE) 35 36# Builds and launches CTS Verifier on a device. 37.PHONY: cts-verifier 38cts-verifier: CtsVerifier adb 39 adb install -r $(ANDROID_PRODUCT_OUT)/data/app/CtsVerifier.apk \ 40 && adb shell "am start -n com.android.cts.verifier/.CtsVerifierActivity" 41 42# 43# Creates a "cts-verifier" directory that will contain: 44# 45# 1. Out directory with a "android-cts-verifier" containing the CTS Verifier 46# and other binaries it needs. 47# 48# 2. Zipped version of the android-cts-verifier directory to be included with 49# the build distribution. 50# 51cts-dir := $(HOST_OUT)/cts-verifier 52verifier-dir-name := android-cts-verifier 53verifier-dir := $(cts-dir)/$(verifier-dir-name) 54verifier-zip-name := $(verifier-dir-name).zip 55verifier-zip := $(cts-dir)/$(verifier-zip-name) 56 57cts : $(verifier-zip) 58ifeq ($(HOST_OS),linux) 59$(verifier-zip) : $(HOST_OUT)/bin/cts-usb-accessory 60endif 61$(verifier-zip) : $(call intermediates-dir-for,APPS,CtsVerifier)/package.apk | $(ACP) 62 $(hide) mkdir -p $(verifier-dir) 63 $(hide) $(ACP) -fp $< $(verifier-dir)/CtsVerifier.apk 64ifeq ($(HOST_OS),linux) 65 $(hide) $(ACP) -fp $(HOST_OUT)/bin/cts-usb-accessory $(verifier-dir)/cts-usb-accessory 66endif 67 $(hide) cd $(cts-dir) && zip -rq $(verifier-dir-name) $(verifier-dir-name) 68 69ifneq ($(filter cts, $(MAKECMDGOALS)),) 70 $(call dist-for-goals, cts, $(verifier-zip):$(verifier-zip-name)) 71endif 72 73include $(call all-makefiles-under,$(LOCAL_PATH)) 74