Android.mk revision bfeab1bbe7e8d0c08b7e3f46aedab64e3b2bf706
1cc213f871bf4c5329eb5eb7a80a0ce9d4a880af8Elliott Hughes# 2cc213f871bf4c5329eb5eb7a80a0ce9d4a880af8Elliott Hughes# Copyright (C) 2012 The Android Open Source Project 3cc213f871bf4c5329eb5eb7a80a0ce9d4a880af8Elliott Hughes# 4cc213f871bf4c5329eb5eb7a80a0ce9d4a880af8Elliott Hughes# Licensed under the Apache License, Version 2.0 (the "License"); 5cc213f871bf4c5329eb5eb7a80a0ce9d4a880af8Elliott Hughes# you may not use this file except in compliance with the License. 6cc213f871bf4c5329eb5eb7a80a0ce9d4a880af8Elliott Hughes# You may obtain a copy of the License at 7cc213f871bf4c5329eb5eb7a80a0ce9d4a880af8Elliott Hughes# 8cc213f871bf4c5329eb5eb7a80a0ce9d4a880af8Elliott Hughes# http://www.apache.org/licenses/LICENSE-2.0 9cc213f871bf4c5329eb5eb7a80a0ce9d4a880af8Elliott Hughes# 10cc213f871bf4c5329eb5eb7a80a0ce9d4a880af8Elliott Hughes# Unless required by applicable law or agreed to in writing, software 11cc213f871bf4c5329eb5eb7a80a0ce9d4a880af8Elliott Hughes# distributed under the License is distributed on an "AS IS" BASIS, 12cc213f871bf4c5329eb5eb7a80a0ce9d4a880af8Elliott Hughes# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13cc213f871bf4c5329eb5eb7a80a0ce9d4a880af8Elliott Hughes# See the License for the specific language governing permissions and 14cc213f871bf4c5329eb5eb7a80a0ce9d4a880af8Elliott Hughes# limitations under the License. 155ac9eee1d3291a0d203a125849b4636a11c0d124Benoit Goby# 165ac9eee1d3291a0d203a125849b4636a11c0d124Benoit Goby 175ac9eee1d3291a0d203a125849b4636a11c0d124Benoit Gobyifneq ($(BUILD_TINY_ANDROID), true) 18cc213f871bf4c5329eb5eb7a80a0ce9d4a880af8Elliott Hughes 19cc213f871bf4c5329eb5eb7a80a0ce9d4a880af8Elliott HughesLOCAL_PATH := $(call my-dir) 20cc213f871bf4c5329eb5eb7a80a0ce9d4a880af8Elliott Hughes 21cc213f871bf4c5329eb5eb7a80a0ce9d4a880af8Elliott Hughestest_src_files = \ 2204a83a48ed89f433c78e31106ed50059764797a0Elliott Hughes getcwd_test.cpp \ 23bfeab1bbe7e8d0c08b7e3f46aedab64e3b2bf706Elliott Hughes pthread_test.cpp \ 24cc213f871bf4c5329eb5eb7a80a0ce9d4a880af8Elliott Hughes regex_test.cpp \ 25cc213f871bf4c5329eb5eb7a80a0ce9d4a880af8Elliott Hughes 26bfeab1bbe7e8d0c08b7e3f46aedab64e3b2bf706Elliott Hughes# Build for the device (with bionic's .so). Run with: 27cc213f871bf4c5329eb5eb7a80a0ce9d4a880af8Elliott Hughes# adb shell /data/nativetest/bionic-unit-tests/bionic-unit-tests 28cc213f871bf4c5329eb5eb7a80a0ce9d4a880af8Elliott Hughesinclude $(CLEAR_VARS) 297b841f3b4ad121dd64f639c1858b42defffd60bdJoe OnoratoLOCAL_MODULE := bionic-unit-tests 302e8f4345dfe16e64d7a3c26f688f17f2b48b2dd1Elliott HughesLOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk 31cc213f871bf4c5329eb5eb7a80a0ce9d4a880af8Elliott HughesLOCAL_SRC_FILES := $(test_src_files) 32cc213f871bf4c5329eb5eb7a80a0ce9d4a880af8Elliott Hughesinclude $(BUILD_NATIVE_TEST) 33cc213f871bf4c5329eb5eb7a80a0ce9d4a880af8Elliott Hughes 34bfeab1bbe7e8d0c08b7e3f46aedab64e3b2bf706Elliott Hughes# Build for the device (with bionic's .a). Run with: 35bfeab1bbe7e8d0c08b7e3f46aedab64e3b2bf706Elliott Hughes# adb shell /data/nativetest/bionic-unit-tests-static/bionic-unit-tests-static 36bfeab1bbe7e8d0c08b7e3f46aedab64e3b2bf706Elliott Hughesinclude $(CLEAR_VARS) 37bfeab1bbe7e8d0c08b7e3f46aedab64e3b2bf706Elliott HughesLOCAL_FORCE_STATIC_EXECUTABLE := true 38bfeab1bbe7e8d0c08b7e3f46aedab64e3b2bf706Elliott HughesLOCAL_STATIC_LIBRARIES += libstlport_static libstdc++ libm libc 39bfeab1bbe7e8d0c08b7e3f46aedab64e3b2bf706Elliott HughesLOCAL_MODULE := bionic-unit-tests-static 40bfeab1bbe7e8d0c08b7e3f46aedab64e3b2bf706Elliott HughesLOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk 41bfeab1bbe7e8d0c08b7e3f46aedab64e3b2bf706Elliott HughesLOCAL_SRC_FILES := $(test_src_files) 42bfeab1bbe7e8d0c08b7e3f46aedab64e3b2bf706Elliott Hughesinclude $(BUILD_NATIVE_TEST) 43bfeab1bbe7e8d0c08b7e3f46aedab64e3b2bf706Elliott Hughes 44cc213f871bf4c5329eb5eb7a80a0ce9d4a880af8Elliott Hughes# Build for the host (with glibc). 45cc213f871bf4c5329eb5eb7a80a0ce9d4a880af8Elliott Hughes# Note that this will build against glibc, so it's not useful for testing 46cc213f871bf4c5329eb5eb7a80a0ce9d4a880af8Elliott Hughes# bionic's implementation, but it does let you use glibc as a reference 47cc213f871bf4c5329eb5eb7a80a0ce9d4a880af8Elliott Hughes# implementation for testing the tests themselves. 48cc213f871bf4c5329eb5eb7a80a0ce9d4a880af8Elliott Hughesinclude $(CLEAR_VARS) 497b841f3b4ad121dd64f639c1858b42defffd60bdJoe OnoratoLOCAL_MODULE := bionic-unit-tests-glibc 502e8f4345dfe16e64d7a3c26f688f17f2b48b2dd1Elliott HughesLOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk 51bfeab1bbe7e8d0c08b7e3f46aedab64e3b2bf706Elliott HughesLOCAL_LDFLAGS += -lpthread 52cc213f871bf4c5329eb5eb7a80a0ce9d4a880af8Elliott HughesLOCAL_SRC_FILES := $(test_src_files) 53cc213f871bf4c5329eb5eb7a80a0ce9d4a880af8Elliott Hughesinclude $(BUILD_HOST_NATIVE_TEST) 545ac9eee1d3291a0d203a125849b4636a11c0d124Benoit Goby 555ac9eee1d3291a0d203a125849b4636a11c0d124Benoit Gobyendif # !BUILD_TINY_ANDROID 56