Brian Carlstrom | 07d579f | 2011-07-27 13:31:51 -0700 | [diff] [blame] | 1 | # |
| 2 | # Copyright (C) 2011 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 | # $(1): target or host |
| 18 | define build-libarttest |
| 19 | include $(CLEAR_VARS) |
| 20 | ifeq ($(1),target) |
| 21 | include external/stlport/libstlport.mk |
| 22 | endif |
| 23 | LOCAL_CPP_EXTENSION := $(ART_CPP_EXTENSION) |
| 24 | LOCAL_MODULE := libarttest |
| 25 | LOCAL_MODULE_TAGS := tests |
| 26 | LOCAL_SRC_FILES := $(LIBARTTEST_COMMON_SRC_FILES) |
Brian Carlstrom | 07d579f | 2011-07-27 13:31:51 -0700 | [diff] [blame] | 27 | ifeq ($(1),target) |
Brian Carlstrom | 8692721 | 2011-09-15 11:31:11 -0700 | [diff] [blame^] | 28 | LOCAL_CFLAGS := $(ART_TARGET_CFLAGS) $(ART_TARGET_DEBUG_CFLAGS) |
Elliott Hughes | 0af5543 | 2011-08-17 18:37:28 -0700 | [diff] [blame] | 29 | LOCAL_SHARED_LIBRARIES := libdl libstlport |
Brian Carlstrom | 07d579f | 2011-07-27 13:31:51 -0700 | [diff] [blame] | 30 | else |
Brian Carlstrom | 8692721 | 2011-09-15 11:31:11 -0700 | [diff] [blame^] | 31 | LOCAL_CFLAGS := $(ART_HOST_CFLAGS) $(ART_HOST_DEBUG_CFLAGS) |
Elliott Hughes | 0af5543 | 2011-08-17 18:37:28 -0700 | [diff] [blame] | 32 | LOCAL_LDLIBS := -ldl -lrt |
Brian Carlstrom | 07d579f | 2011-07-27 13:31:51 -0700 | [diff] [blame] | 33 | endif |
| 34 | ifeq ($(1),target) |
| 35 | include $(BUILD_SHARED_LIBRARY) |
| 36 | else |
| 37 | include $(BUILD_HOST_SHARED_LIBRARY) |
| 38 | endif |
| 39 | endef |
| 40 | |
Brian Carlstrom | 4b620ff | 2011-09-11 01:11:01 -0700 | [diff] [blame] | 41 | ifeq ($(ART_BUILD_TARGET),true) |
| 42 | $(eval $(call build-libarttest,target)) |
| 43 | endif |
| 44 | ifeq ($(ART_BUILD_HOST),true) |
Brian Carlstrom | 07d579f | 2011-07-27 13:31:51 -0700 | [diff] [blame] | 45 | $(eval $(call build-libarttest,host)) |
| 46 | endif |