ROOT_DIR=../../..

include $(ROOT_DIR)/config/config.mk
include $(ROOT_DIR)/multibuild/sdk.mk

### Build Android ##############################################################
LOCAL_NDK_PATH := $(CONFIG_ANDROID_NDK_PATH)
LOCAL_PROJECTS := test
LOCAL_PLATFORM_VERSION := android-28
include $(BUILD_ANDROID)

### Deploy/install targets  ####################################################
.PHONY: run_test
run_test:
	@adb shell stest_dead_app --gtest_color=yes

DEVICE_APP_ABI := `adb shell getprop ro.product.cpu.abi`

.PHONY: install
install:
	@adb remount
	@adb push out/android/test/$(DEVICE_APP_ABI)/stest_dead_app /system/bin

force_clean: clean
	@rm -rf out/
