[Replicant] [libsamsung-ipc] [PATCH 01/26] Android.mk: enable to build libsamsung-ipc for all devices
Denis 'GNUtoo' Carikli
GNUtoo at cyberdimension.org
Mon Mar 28 20:20:15 UTC 2022
For now -DIPC_DEVICE_NAME is only used to force to use a specific
device driver instead of trying to find out automatically which driver
to use. So with it all the drivers are still compiled in and there is
only one string that changes between builds with different
-DIPC_DEVICE_NAME.
There are some advantages in being able to not use -DIPC_DEVICE_NAME:
- If one day, only the relevant driver(s) are compiled with
-DIPC_DEVICE_NAME, we would still be able to compile-test all the
code by not setting -DIPC_DEVICE_NAME.
- Not hardcoding the device name would be a good step toward having
Android images that work on multiple devices.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo at cyberdimension.org>
---
Android.mk | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/Android.mk b/Android.mk
index 985b3b3..aef5ce8 100644
--- a/Android.mk
+++ b/Android.mk
@@ -113,9 +113,11 @@ libsamsung_ipc_local_c_includes := \
$(LOCAL_PATH)/samsung-ipc \
external/openssl/include
-libsamsung_local_cflags := \
- -DIPC_DEVICE_NAME=\"$(ipc_device_name)\" \
- -DDEBUG
+libsamsung_local_cflags := -DDEBUG
+
+ifneq ($(TARGET_DEVICE),)
+libsamsung_local_cflags += -DIPC_DEVICE_NAME=\"$(ipc_device_name)\"
+endif # ifneq ($(TARGET_DEVICE),)
libsamsung_ipc_local_shared_libraries := \
libutils \
--
2.35.1
More information about the Replicant
mailing list