blob: 52cf5f407bbebff60bfafc66e1d39263e9ae653f [file] [log] [blame]
Igor Murashkind8f2a8d2014-04-08 11:22:42 -07001# Copyright (C) 2014 The Android Open Source Project
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15LOCAL_PATH := $(call my-dir)
Igor Murashkind8f2a8d2014-04-08 11:22:42 -070016
17test_src_files := \
David Pursell0eb8e1b2016-01-14 17:18:27 -080018 sockets_test.cpp \
19
20test_src_files_nonwindows := \
Elliott Hughesaf98efb2015-04-02 13:36:54 -070021 test_str_parms.cpp \
22
23test_target_only_src_files := \
Christopher Ferrisd660d892014-06-20 10:28:28 -070024 MemsetTest.cpp \
Igor Murashkind8f2a8d2014-04-08 11:22:42 -070025 PropertiesTest.cpp \
Christopher Ferris626efb72016-02-23 18:02:20 -080026 trace-dev_test.cpp \
Igor Murashkind8f2a8d2014-04-08 11:22:42 -070027
Christopher Ferris626efb72016-02-23 18:02:20 -080028test_libraries := libcutils liblog libbase
Christopher Ferrisd660d892014-06-20 10:28:28 -070029
Elliott Hughesaf98efb2015-04-02 13:36:54 -070030
31#
32# Target.
33#
34
35include $(CLEAR_VARS)
36LOCAL_MODULE := libcutils_test
37LOCAL_SRC_FILES := $(test_src_files) $(test_target_only_src_files)
38LOCAL_SHARED_LIBRARIES := $(test_libraries)
Christopher Ferrisd660d892014-06-20 10:28:28 -070039LOCAL_MULTILIB := both
40LOCAL_MODULE_STEM_32 := $(LOCAL_MODULE)32
41LOCAL_MODULE_STEM_64 := $(LOCAL_MODULE)64
42include $(BUILD_NATIVE_TEST)
43
Dan Albert43db1c32015-04-01 16:43:47 -070044include $(CLEAR_VARS)
Dan Albert43db1c32015-04-01 16:43:47 -070045LOCAL_MODULE := libcutils_test_static
46LOCAL_FORCE_STATIC_EXECUTABLE := true
Elliott Hughesaf98efb2015-04-02 13:36:54 -070047LOCAL_SRC_FILES := $(test_src_files) $(test_target_only_src_files)
48LOCAL_STATIC_LIBRARIES := libc $(test_libraries)
Dan Albert43db1c32015-04-01 16:43:47 -070049LOCAL_CXX_STL := libc++_static
50LOCAL_MULTILIB := both
51LOCAL_MODULE_STEM_32 := $(LOCAL_MODULE)32
52LOCAL_MODULE_STEM_64 := $(LOCAL_MODULE)64
53include $(BUILD_NATIVE_TEST)
Elliott Hughesaf98efb2015-04-02 13:36:54 -070054
55
56#
57# Host.
58#
59
60include $(CLEAR_VARS)
61LOCAL_MODULE := libcutils_test
David Pursell0eb8e1b2016-01-14 17:18:27 -080062LOCAL_SRC_FILES := $(test_src_files) $(test_src_files_nonwindows)
Elliott Hughesaf98efb2015-04-02 13:36:54 -070063LOCAL_SHARED_LIBRARIES := $(test_libraries)
64LOCAL_MULTILIB := both
65LOCAL_MODULE_STEM_32 := $(LOCAL_MODULE)32
66LOCAL_MODULE_STEM_64 := $(LOCAL_MODULE)64
67include $(BUILD_HOST_NATIVE_TEST)
68
69include $(CLEAR_VARS)
70LOCAL_MODULE := libcutils_test_static
71LOCAL_SRC_FILES := $(test_src_files)
David Pursell0eb8e1b2016-01-14 17:18:27 -080072LOCAL_SRC_FILES_darwin := $(test_src_files_nonwindows)
73LOCAL_SRC_FILES_linux := $(test_src_files_nonwindows)
Elliott Hughesaf98efb2015-04-02 13:36:54 -070074LOCAL_STATIC_LIBRARIES := $(test_libraries)
David Pursell0eb8e1b2016-01-14 17:18:27 -080075LOCAL_LDLIBS_windows := -lws2_32
Elliott Hughesaf98efb2015-04-02 13:36:54 -070076LOCAL_CXX_STL := libc++_static
77LOCAL_MULTILIB := both
78LOCAL_MODULE_STEM_32 := $(LOCAL_MODULE)32
79LOCAL_MODULE_STEM_64 := $(LOCAL_MODULE)64
David Pursell0eb8e1b2016-01-14 17:18:27 -080080LOCAL_MODULE_HOST_OS := darwin linux windows
Elliott Hughesaf98efb2015-04-02 13:36:54 -070081include $(BUILD_HOST_NATIVE_TEST)