Skip to content
This repository has been archived by the owner on Nov 8, 2023. It is now read-only.

Commit

Permalink
Begin converting Android.mk to Android.bp
Browse files Browse the repository at this point in the history
These modules have their dependencies satisfied.

Change-Id: I67986efd7478e477770bedac72ab35a407e3d06a
  • Loading branch information
danw committed Jul 13, 2016
1 parent 99d2543 commit f51bf92
Show file tree
Hide file tree
Showing 27 changed files with 308 additions and 345 deletions.
18 changes: 18 additions & 0 deletions Android.bp
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// Copyright 2006 The Android Open Source Project

cc_library_shared {
name: "libhardware",

srcs: ["hardware.c"],
shared_libs: [
"libcutils",
"liblog",
"libdl",
],
cflags: ["-DQEMU_HARDWARE"],
}

subdirs = [
"modules/*",
"tests/*",
]
23 changes: 1 addition & 22 deletions Android.mk
Original file line number Diff line number Diff line change
@@ -1,24 +1,3 @@
# Copyright 2006 The Android Open Source Project

# Setting LOCAL_PATH will mess up all-subdir-makefiles, so do it beforehand.
SUBDIR_MAKEFILES := $(call all-named-subdir-makefiles,modules tests)

LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)

LOCAL_SHARED_LIBRARIES := libcutils liblog

LOCAL_INCLUDES += $(LOCAL_PATH)

LOCAL_CFLAGS += -DQEMU_HARDWARE
QEMU_HARDWARE := true

LOCAL_SHARED_LIBRARIES += libdl

LOCAL_SRC_FILES += hardware.c

LOCAL_MODULE:= libhardware

include $(BUILD_SHARED_LIBRARY)

include $(SUBDIR_MAKEFILES)
include $(call all-named-subdir-makefiles,modules tests)
5 changes: 2 additions & 3 deletions modules/Android.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
hardware_modules := gralloc hwcomposer audio nfc nfc-nci local_time \
power usbaudio audio_remote_submix camera usbcamera consumerir sensors vibrator \
tv_input fingerprint input
hardware_modules := gralloc hwcomposer \
usbaudio audio_remote_submix camera usbcamera sensors input
include $(call all-named-subdir-makefiles,$(hardware_modules))
60 changes: 60 additions & 0 deletions modules/audio/Android.bp
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
// Copyright (C) 2011 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// The default audio HAL module, which is a stub, that is loaded if no other
// device specific modules are present. The exact load order can be seen in
// libhardware/hardware.c
//
// The format of the name is audio.<type>.<hardware/etc>.so where the only
// required type is 'primary'. Other possibilites are 'a2dp', 'usb', etc.
cc_library_shared {
name: "audio.primary.default",
relative_install_path: "hw",
srcs: ["audio_hw.c"],
shared_libs: [
"liblog",
"libcutils",
],
cflags: ["-Wno-unused-parameter"],
}

// The stub audio HAL module, identical to the default audio hal, but with
// different name to be loaded concurrently with other audio HALs if necessary.
// This can also be used as skeleton for new implementations
//
// The format of the name is audio.<type>.<hardware/etc>.so where the only
// required type is 'primary'. Other possibilites are 'a2dp', 'usb', etc.
cc_library_shared {
name: "audio.stub.default",
relative_install_path: "hw",
srcs: ["audio_hw.c"],
shared_libs: [
"liblog",
"libcutils",
],
cflags: ["-Wno-unused-parameter"],
}

// The stub audio policy HAL module that can be used as a skeleton for
// new implementations.
cc_library_shared {
name: "audio_policy.stub",
relative_install_path: "hw",
srcs: ["audio_policy.c"],
shared_libs: [
"liblog",
"libcutils",
],
cflags: ["-Wno-unused-parameter"],
}
62 changes: 0 additions & 62 deletions modules/audio/Android.mk

This file was deleted.

23 changes: 23 additions & 0 deletions modules/consumerir/Android.bp
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// Copyright (C) 2013 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

cc_library_shared {
name: "consumerir.default",
relative_install_path: "hw",
srcs: ["consumerir.c"],
shared_libs: [
"liblog",
"libcutils",
],
}
25 changes: 0 additions & 25 deletions modules/consumerir/Android.mk

This file was deleted.

20 changes: 20 additions & 0 deletions modules/fingerprint/Android.bp
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Copyright (C) 2013 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

cc_library_shared {
name: "fingerprint.default",
relative_install_path: "hw",
srcs: ["fingerprint.c"],
shared_libs: ["liblog"],
}
25 changes: 0 additions & 25 deletions modules/fingerprint/Android.mk

This file was deleted.

32 changes: 32 additions & 0 deletions modules/local_time/Android.bp
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// Copyright (C) 2011 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// The default local time HAL module. The default module simply uses the
// system's clock_gettime(CLOCK_MONOTONIC) and does not support HW slewing.
// Devices which use the default implementation should take care to ensure that
// the oscillator backing the CLOCK_MONOTONIC implementation is phase locked to
// the audio and video output hardware. This default implementation is loaded
// if no other device specific modules are present. The exact load order can be
// seen in libhardware/hardware.c
//
// The format of the name is local_time.<hardware>.so
cc_library_shared {
name: "local_time.default",
relative_install_path: "hw",
srcs: ["local_time_hw.c"],
shared_libs: [
"liblog",
"libcutils",
],
}
34 changes: 0 additions & 34 deletions modules/local_time/Android.mk

This file was deleted.

23 changes: 23 additions & 0 deletions modules/nfc-nci/Android.bp
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// Copyright (C) 2011 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

cc_library_shared {
name: "nfc_nci.default",
relative_install_path: "hw",
srcs: ["nfc_nci_example.c"],
shared_libs: [
"liblog",
"libcutils",
],
}
25 changes: 0 additions & 25 deletions modules/nfc-nci/Android.mk

This file was deleted.

Loading

0 comments on commit f51bf92

Please sign in to comment.