diff --git a/Android.bp b/Android.bp index a24f426..3b733f7 100644 --- a/Android.bp +++ b/Android.bp @@ -1,9 +1,50 @@ // Copyright 2006 The Android Open Source Project +subdirs = [ + "audio", +] + +cc_library_headers { + name: "libhardware_legacy_headers", + export_include_dirs: ["include"], + + header_libs: ["libcutils_headers"], + export_header_lib_headers: ["libcutils_headers"], +} + cc_library { name: "libpower", - srcs: ["power/power.c"], + srcs: ["power.c"], export_include_dirs: ["include"], shared_libs: ["libcutils", "liblog"], } + +cc_library_shared { + name: "libhardware_legacy", + + shared_libs: [ + "libbase", + "libdl", + "libcutils", + "liblog", + ], + + header_libs: [ + "libhardware_legacy_headers", + ], + export_header_lib_headers: ["libhardware_legacy_headers"], + + export_include_dirs: ["include"], + + cflags: [ + "-DQEMU_HARDWARE", + "-Wno-unused-parameter", + "-Wno-gnu-designator", + ], + + srcs: [ + "power.c", + "uevent.c", + ], +} diff --git a/Android.mk b/Android.mk deleted file mode 100644 index 3cd3031..0000000 --- a/Android.mk +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright 2006 The Android Open Source Project - -# Setting LOCAL_PATH will mess up all-subdir-makefiles, so do it beforehand. -legacy_modules := power uevent - -SAVE_MAKEFILES := $(call all-named-subdir-makefiles,$(legacy_modules)) -LEGACY_AUDIO_MAKEFILES := $(call all-named-subdir-makefiles,audio) - -LOCAL_PATH:= $(call my-dir) -include $(CLEAR_VARS) - -LOCAL_SHARED_LIBRARIES := libbase libcutils liblog -LOCAL_EXPORT_SHARED_LIBRARY_HEADERS := libmedia - -LOCAL_C_INCLUDES := $(LOCAL_PATH)/include -LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include - -LOCAL_CFLAGS += -DQEMU_HARDWARE -Wno-unused-parameter -Wno-gnu-designator -QEMU_HARDWARE := true - -LOCAL_SHARED_LIBRARIES += libdl - -include $(SAVE_MAKEFILES) - -# TODO: Remove this line b/29915755 -ifndef BRILLO -LOCAL_WHOLE_STATIC_LIBRARIES := libwifi-hal-common -endif - -LOCAL_MODULE:= libhardware_legacy - -include $(BUILD_SHARED_LIBRARY) - -include $(CLEAR_VARS) -LOCAL_MODULE := libhardware_legacy_headers -LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include -include $(BUILD_HEADER_LIBRARY) - -# legacy_audio builds it's own set of libraries that aren't linked into -# hardware_legacy -include $(LEGACY_AUDIO_MAKEFILES) diff --git a/audio/Android.bp b/audio/Android.bp new file mode 100644 index 0000000..5141dee --- /dev/null +++ b/audio/Android.bp @@ -0,0 +1,25 @@ +// Copyright 2011 The Android Open Source Project + +//AUDIO_POLICY_TEST := true +//ENABLE_AUDIO_DUMP := true + +cc_library_static { + + srcs: [ + "AudioHardwareInterface.cpp", + "audio_hw_hal.cpp", + ], + + name: "libaudiohw_legacy", + static_libs: ["libmedia_helper"], + cflags: [ + "-Wno-unused-parameter", + "-Wno-gnu-designator", + ], + + header_libs: [ + "libbase_headers", + "libhardware_legacy_headers", + ], + export_header_lib_headers: ["libhardware_legacy_headers"], +} diff --git a/audio/Android.mk b/audio/Android.mk deleted file mode 100644 index 8f8284f..0000000 --- a/audio/Android.mk +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright 2011 The Android Open Source Project - -#AUDIO_POLICY_TEST := true -#ENABLE_AUDIO_DUMP := true - -LOCAL_PATH := $(call my-dir) -include $(CLEAR_VARS) - -LOCAL_SRC_FILES := \ - AudioHardwareInterface.cpp \ - audio_hw_hal.cpp - -LOCAL_MODULE := libaudiohw_legacy -LOCAL_SHARED_LIBRARIES := libmedia -LOCAL_STATIC_LIBRARIES := libmedia_helper -LOCAL_CFLAGS := -Wno-unused-parameter -Wno-gnu-designator -LOCAL_C_INCLUDES := $(LOCAL_PATH)/../include -LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/../include - -include $(BUILD_STATIC_LIBRARY) - - diff --git a/power/power.c b/power.c similarity index 100% rename from power/power.c rename to power.c diff --git a/power/Android.mk b/power/Android.mk deleted file mode 100644 index 3e3ff5d..0000000 --- a/power/Android.mk +++ /dev/null @@ -1,3 +0,0 @@ -# Copyright 2006 The Android Open Source Project - -LOCAL_SRC_FILES += power/power.c diff --git a/uevent/uevent.c b/uevent.c similarity index 100% rename from uevent/uevent.c rename to uevent.c diff --git a/uevent/Android.mk b/uevent/Android.mk deleted file mode 100644 index 2d8b524..0000000 --- a/uevent/Android.mk +++ /dev/null @@ -1,3 +0,0 @@ -# Copyright 2008 The Android Open Source Project - -LOCAL_SRC_FILES += uevent/uevent.c