The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 1 | ########################################################### |
| 2 | ## Standard rules for building a static library. |
| 3 | ## |
| 4 | ## Additional inputs from base_rules.make: |
| 5 | ## None. |
| 6 | ## |
| 7 | ## LOCAL_MODULE_SUFFIX will be set for you. |
| 8 | ########################################################### |
| 9 | |
| 10 | ifeq ($(strip $(LOCAL_MODULE_CLASS)),) |
| 11 | LOCAL_MODULE_CLASS := STATIC_LIBRARIES |
| 12 | endif |
| 13 | ifeq ($(strip $(LOCAL_MODULE_SUFFIX)),) |
| 14 | LOCAL_MODULE_SUFFIX := .a |
| 15 | endif |
| 16 | LOCAL_UNINSTALLABLE_MODULE := true |
Ying Wang | 5f07480 | 2011-11-08 09:31:21 -0800 | [diff] [blame] | 17 | ifneq ($(strip $(LOCAL_MODULE_STEM)$(LOCAL_BUILT_MODULE_STEM)),) |
Ian Rogers | 76a6dc3 | 2012-10-01 16:36:23 -0700 | [diff] [blame] | 18 | $(error $(LOCAL_PATH): Cannot set module stem for a library) |
Ying Wang | 5f07480 | 2011-11-08 09:31:21 -0800 | [diff] [blame] | 19 | endif |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 20 | |
Kito Cheng | 70dc3e1 | 2012-06-15 15:15:50 +0800 | [diff] [blame] | 21 | #################################################### |
| 22 | ## Add profiling libraries if aprof is turned |
| 23 | #################################################### |
| 24 | ifeq ($(strip $(LOCAL_ENABLE_APROF)),true) |
| 25 | LOCAL_WHOLE_STATIC_LIBRARIES += libaprof |
| 26 | endif |
| 27 | |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 28 | include $(BUILD_SYSTEM)/binary.mk |
| 29 | |
| 30 | ifeq ($(LOCAL_RAW_STATIC_LIBRARY),true) |
| 31 | LOCAL_RAW_STATIC_LIBRARY:= |
Ying Wang | 1a08100 | 2010-07-13 14:55:47 -0700 | [diff] [blame] | 32 | $(all_objects) : PRIVATE_TARGET_PROJECT_INCLUDES := |
| 33 | $(all_objects) : PRIVATE_TARGET_C_INCLUDES := |
| 34 | $(all_objects) : PRIVATE_TARGET_GLOBAL_CFLAGS := |
| 35 | $(all_objects) : PRIVATE_TARGET_GLOBAL_CPPFLAGS := |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 36 | endif |
| 37 | |
Dima Zavin | 46e9bec | 2009-05-27 19:41:07 -0700 | [diff] [blame] | 38 | $(LOCAL_BUILT_MODULE): $(built_whole_libraries) |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 39 | $(LOCAL_BUILT_MODULE): $(all_objects) |
| 40 | $(transform-o-to-static-lib) |