8dae49c5e1
We currently use static libraries without any source files to represent header libraries, but Soong actually has cc_library_headers. So to export those in a separate namespace from static libraries, implement them in Make as well. This also adds a nice pretty-warning / pretty-error macro that can be used to print out standard warning messages pointing to the real source file having the problem. Test: Use a header library exported by Soong in a Make module Change-Id: I3486539e247524cb82a20620745fc7be03014e14
21 lines
611 B
Makefile
21 lines
611 B
Makefile
###########################################################
|
|
## Standard rules for building a header library.
|
|
##
|
|
## Additional inputs from base_rules.make:
|
|
## None.
|
|
###########################################################
|
|
|
|
LOCAL_MODULE_CLASS := HEADER_LIBRARIES
|
|
LOCAL_UNINSTALLABLE_MODULE := true
|
|
ifneq ($(strip $(LOCAL_MODULE_STEM)$(LOCAL_BUILT_MODULE_STEM)),)
|
|
$(error $(LOCAL_PATH): Cannot set module stem for a library)
|
|
endif
|
|
|
|
include $(BUILD_SYSTEM)/binary.mk
|
|
|
|
ifneq ($(strip $(all_objects)),)
|
|
$(call pretty-error,Header libraries may not have any sources)
|
|
endif
|
|
|
|
$(LOCAL_BUILT_MODULE):
|
|
$(hide) touch $@
|