blob: 4da5ed6f02cffc050b63d75f6dc227e17b4fef35 [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 \
26
Elliott Hughesaf98efb2015-04-02 13:36:54 -070027test_libraries := libcutils liblog
Christopher Ferrisd660d892014-06-20 10:28:28 -070028
Elliott Hughesaf98efb2015-04-02 13:36:54 -070029
30#
31# Target.
32#
33
34include $(CLEAR_VARS)
35LOCAL_MODULE := libcutils_test
36LOCAL_SRC_FILES := $(test_src_files) $(test_target_only_src_files)
37LOCAL_SHARED_LIBRARIES := $(test_libraries)
Christopher Ferrisd660d892014-06-20 10:28:28 -070038LOCAL_MULTILIB := both
39LOCAL_MODULE_STEM_32 := $(LOCAL_MODULE)32
40LOCAL_MODULE_STEM_64 := $(LOCAL_MODULE)64
41include $(BUILD_NATIVE_TEST)
42
Dan Albert43db1c32015-04-01 16:43:47 -070043include $(CLEAR_VARS)
Dan Albert43db1c32015-04-01 16:43:47 -070044LOCAL_MODULE := libcutils_test_static
45LOCAL_FORCE_STATIC_EXECUTABLE := true
Elliott Hughesaf98efb2015-04-02 13:36:54 -070046LOCAL_SRC_FILES := $(test_src_files) $(test_target_only_src_files)
47LOCAL_STATIC_LIBRARIES := libc $(test_libraries)
Dan Albert43db1c32015-04-01 16:43:47 -070048LOCAL_CXX_STL := libc++_static
49LOCAL_MULTILIB := both
50LOCAL_MODULE_STEM_32 := $(LOCAL_MODULE)32
51LOCAL_MODULE_STEM_64 := $(LOCAL_MODULE)64
52include $(BUILD_NATIVE_TEST)
Elliott Hughesaf98efb2015-04-02 13:36:54 -070053
54
55#
56# Host.
57#
58
59include $(CLEAR_VARS)
60LOCAL_MODULE := libcutils_test
David Pursell0eb8e1b2016-01-14 17:18:27 -080061LOCAL_SRC_FILES := $(test_src_files) $(test_src_files_nonwindows)
Elliott Hughesaf98efb2015-04-02 13:36:54 -070062LOCAL_SHARED_LIBRARIES := $(test_libraries)
63LOCAL_MULTILIB := both
64LOCAL_MODULE_STEM_32 := $(LOCAL_MODULE)32
65LOCAL_MODULE_STEM_64 := $(LOCAL_MODULE)64
66include $(BUILD_HOST_NATIVE_TEST)
67
68include $(CLEAR_VARS)
69LOCAL_MODULE := libcutils_test_static
70LOCAL_SRC_FILES := $(test_src_files)
David Pursell0eb8e1b2016-01-14 17:18:27 -080071LOCAL_SRC_FILES_darwin := $(test_src_files_nonwindows)
72LOCAL_SRC_FILES_linux := $(test_src_files_nonwindows)
Elliott Hughesaf98efb2015-04-02 13:36:54 -070073LOCAL_STATIC_LIBRARIES := $(test_libraries)
David Pursell0eb8e1b2016-01-14 17:18:27 -080074LOCAL_LDLIBS_windows := -lws2_32
Elliott Hughesaf98efb2015-04-02 13:36:54 -070075LOCAL_CXX_STL := libc++_static
76LOCAL_MULTILIB := both
77LOCAL_MODULE_STEM_32 := $(LOCAL_MODULE)32
78LOCAL_MODULE_STEM_64 := $(LOCAL_MODULE)64
David Pursell0eb8e1b2016-01-14 17:18:27 -080079LOCAL_MODULE_HOST_OS := darwin linux windows
Elliott Hughesaf98efb2015-04-02 13:36:54 -070080include $(BUILD_HOST_NATIVE_TEST)