Advertisement
neochapay

Untitled

Oct 3rd, 2016
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.64 KB | None | 0 0
  1. #
  2. # Copyright (C) 2008-2014 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. ifneq ($(TARGET_USES_LOGD),false)
  20. liblog_sources := logd_write.c log_event_write.c
  21. else
  22. liblog_sources := logd_write_kern.c
  23. endif
  24.  
  25. # some files must not be compiled when building against Mingw
  26. # they correspond to features not used by our host development tools
  27. # which are also hard or even impossible to port to native Win32
  28. WITH_MINGW :=
  29. ifeq ($(HOST_OS),windows)
  30. ifeq ($(strip $(USE_CYGWIN)),)
  31. WITH_MINGW := true
  32. endif
  33. endif
  34. # USE_MINGW is defined when we build against Mingw on Linux
  35. ifneq ($(strip $(USE_MINGW)),)
  36. WITH_MINGW := true
  37. endif
  38.  
  39. ifndef WITH_MINGW
  40. liblog_sources += \
  41. logprint.c \
  42. event_tag_map.c
  43. else
  44. liblog_sources += \
  45. uio.c
  46. endif
  47.  
  48. liblog_host_sources := $(liblog_sources) fake_log_device.c
  49. liblog_target_sources := $(liblog_sources) log_time.cpp
  50. ifneq ($(TARGET_USES_LOGD),false)
  51. liblog_target_sources += log_read.c
  52. else
  53. liblog_target_sources += log_read_kern.c
  54. endif
  55.  
  56. # Shared and static library for host
  57. # ========================================================
  58. LOCAL_MODULE := liblog
  59. LOCAL_SRC_FILES := $(liblog_host_sources)
  60. LOCAL_CFLAGS := -DFAKE_LOG_DEVICE=1 -Werror
  61. LOCAL_MULTILIB := both
  62. include $(BUILD_HOST_STATIC_LIBRARY)
  63.  
  64. include $(CLEAR_VARS)
  65. LOCAL_MODULE := liblog
  66. LOCAL_WHOLE_STATIC_LIBRARIES := liblog
  67. ifeq ($(strip $(HOST_OS)),linux)
  68. LOCAL_LDLIBS := -lrt
  69. endif
  70. LOCAL_MULTILIB := both
  71. include $(BUILD_HOST_SHARED_LIBRARY)
  72.  
  73. ifeq ($(TARGET_USES_MOTOROLA_LOG),true)
  74. LIBLOG_CFLAGS := -DMOTOROLA_LOG
  75. endif
  76.  
  77. # Shared and static library for target
  78. # ========================================================
  79. include $(CLEAR_VARS)
  80. LOCAL_MODULE := liblog
  81. LOCAL_SRC_FILES := $(liblog_target_sources)
  82. LOCAL_CFLAGS := $(LIBLOG_CFLAGS) -Werror
  83. include $(BUILD_STATIC_LIBRARY)
  84.  
  85. include $(CLEAR_VARS)
  86. LOCAL_MODULE := liblog
  87. LOCAL_WHOLE_STATIC_LIBRARIES := liblog
  88. LOCAL_CFLAGS := $(LIBLOG_CFLAGS) -Werror
  89. include $(BUILD_SHARED_LIBRARY)
  90.  
  91. include $(call first-makefiles-under,$(LOCAL_PATH))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement