The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 1 | # |
| 2 | # Copyright (C) 2008 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 | LOCAL_PATH := $(my-dir) |
| 17 | include $(CLEAR_VARS) |
| 18 | |
| 19 | liblog_sources := logd_write.c |
| 20 | |
| 21 | # some files must not be compiled when building against Mingw |
| 22 | # they correspond to features not used by our host development tools |
| 23 | # which are also hard or even impossible to port to native Win32 |
| 24 | WITH_MINGW := |
| 25 | ifeq ($(HOST_OS),windows) |
| 26 | ifeq ($(strip $(USE_CYGWIN)),) |
| 27 | WITH_MINGW := true |
| 28 | endif |
| 29 | endif |
| 30 | # USE_MINGW is defined when we build against Mingw on Linux |
| 31 | ifneq ($(strip $(USE_MINGW)),) |
| 32 | WITH_MINGW := true |
| 33 | endif |
| 34 | |
| 35 | ifndef WITH_MINGW |
| 36 | liblog_sources += \ |
| 37 | logprint.c \ |
| 38 | event_tag_map.c |
| 39 | endif |
| 40 | |
| 41 | liblog_host_sources := $(liblog_sources) fake_log_device.c |
| 42 | |
Andrew Hsieh | 99e7f7a | 2012-03-01 23:58:50 -0800 | [diff] [blame] | 43 | |
Elliott Hughes | f82e741 | 2011-07-13 17:37:07 -0700 | [diff] [blame] | 44 | # Shared and static library for host |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 45 | # ======================================================== |
| 46 | LOCAL_MODULE := liblog |
| 47 | LOCAL_SRC_FILES := $(liblog_host_sources) |
| 48 | LOCAL_LDLIBS := -lpthread |
| 49 | LOCAL_CFLAGS := -DFAKE_LOG_DEVICE=1 |
| 50 | include $(BUILD_HOST_STATIC_LIBRARY) |
| 51 | |
Elliott Hughes | f82e741 | 2011-07-13 17:37:07 -0700 | [diff] [blame] | 52 | include $(CLEAR_VARS) |
| 53 | LOCAL_MODULE := liblog |
| 54 | LOCAL_WHOLE_STATIC_LIBRARIES := liblog |
| 55 | include $(BUILD_HOST_SHARED_LIBRARY) |
| 56 | |
Andrew Hsieh | 99e7f7a | 2012-03-01 23:58:50 -0800 | [diff] [blame] | 57 | |
| 58 | # Static library for host, 64-bit |
| 59 | # ======================================================== |
| 60 | include $(CLEAR_VARS) |
| 61 | LOCAL_MODULE := lib64log |
| 62 | LOCAL_SRC_FILES := $(liblog_host_sources) |
| 63 | LOCAL_LDLIBS := -lpthread |
| 64 | LOCAL_CFLAGS := -DFAKE_LOG_DEVICE=1 -m64 |
| 65 | include $(BUILD_HOST_STATIC_LIBRARY) |
| 66 | |
| 67 | |
Jeff Brown | 29e1e73 | 2011-07-11 22:12:32 -0700 | [diff] [blame] | 68 | # Shared and static library for target |
| 69 | # ======================================================== |
| 70 | include $(CLEAR_VARS) |
| 71 | LOCAL_MODULE := liblog |
| 72 | LOCAL_SRC_FILES := $(liblog_sources) |
| 73 | include $(BUILD_STATIC_LIBRARY) |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 74 | |
Jeff Brown | 29e1e73 | 2011-07-11 22:12:32 -0700 | [diff] [blame] | 75 | include $(CLEAR_VARS) |
| 76 | LOCAL_MODULE := liblog |
| 77 | LOCAL_WHOLE_STATIC_LIBRARIES := liblog |
| 78 | include $(BUILD_SHARED_LIBRARY) |