[Replicant] [libsamsung-ipc] [PATCH 6/9] tools: Move ipc-modem in its own directory
Denis 'GNUtoo' Carikli
GNUtoo at cyberdimension.org
Mon May 23 16:56:14 UTC 2022
This enables to then split ipc-modem in several files in a clean way.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo at cyberdimension.org>
---
.gitignore | 2 +-
Android.mk | 4 ++--
Makefile.am | 1 +
configure.ac | 1 +
tools/Makefile.am | 7 +------
tools/ipc-modem/Makefile.am | 17 +++++++++++++++++
tools/{ => ipc-modem}/ipc-modem.c | 0
tools/{ => ipc-modem}/ipc-modem.h | 0
tools/{ => ipc-modem}/tests/ipc-modem.py | 0
9 files changed, 23 insertions(+), 9 deletions(-)
create mode 100644 tools/ipc-modem/Makefile.am
rename tools/{ => ipc-modem}/ipc-modem.c (100%)
rename tools/{ => ipc-modem}/ipc-modem.h (100%)
rename tools/{ => ipc-modem}/tests/ipc-modem.py (100%)
diff --git a/.gitignore b/.gitignore
index 5ff2f2b..06600b8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -47,7 +47,7 @@ INSTALL
*.pc
build
core
-ipc-modem
+tools/ipc-modem/ipc-modem
ipc-test
nv_data-imei
nv_data-md5
diff --git a/Android.mk b/Android.mk
index 1cb8b42..d383e84 100644
--- a/Android.mk
+++ b/Android.mk
@@ -170,7 +170,7 @@ include $(LOCAL_PATH)/android_versions.mk
LOCAL_MODULE := ipc-modem
LOCAL_MODULE_TAGS := optional
-LOCAL_SRC_FILES := tools/ipc-modem.c
+LOCAL_SRC_FILES := tools/ipc-modem/ipc-modem.c
LOCAL_C_INCLUDES := $(LOCAL_PATH)/include $(LOCAL_PATH)/tools/include/glibc
LOCAL_SHARED_LIBRARIES := libsamsung-ipc
@@ -186,7 +186,7 @@ include $(LOCAL_PATH)/android_versions.mk
LOCAL_MODULE := ipc-modem-static
LOCAL_MODULE_TAGS := optional
-LOCAL_SRC_FILES := tools/ipc-modem.c
+LOCAL_SRC_FILES := tools/ipc-modem/ipc-modem.c
LOCAL_C_INCLUDES := $(LOCAL_PATH)/include $(LOCAL_PATH)/tools/include/glibc
LOCAL_STATIC_LIBRARIES := libsamsung-ipc
diff --git a/Makefile.am b/Makefile.am
index 45669d8..0073e4c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -5,6 +5,7 @@ SUBDIRS = \
samsung-ipc/tests \
include \
tools \
+ tools/ipc-modem \
$(NULL)
pkgconfigdir = $(libdir)/pkgconfig
diff --git a/configure.ac b/configure.ac
index f55064c..1885f85 100644
--- a/configure.ac
+++ b/configure.ac
@@ -53,6 +53,7 @@ AC_CONFIG_FILES([
samsung-ipc/Makefile
samsung-ipc/tests/Makefile
tools/Makefile
+ tools/ipc-modem/Makefile
])
diff --git a/tools/Makefile.am b/tools/Makefile.am
index c1e8cc3..f0ed03b 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -5,7 +5,6 @@ AM_CFLAGS = \
$(NULL)
bin_PROGRAMS = \
- ipc-modem \
ipc-test \
nv_data-imei \
nv_data-md5 \
@@ -18,14 +17,10 @@ AM_TESTS_ENVIRONMENT = VALGRIND='$(VALGRIND)'; export VALGRIND;
endif
PY_LOG_COMPILER = $(PYTHON)
TEST_EXTENSIONS = .py
-TESTS = tests/ipc-modem.py \
+TESTS = \
tests/nv_data-imei.py \
tests/nv_data-md5.py
-ipc_modem_SOURCES = ipc-modem.c
-ipc_modem_LDADD = $(top_builddir)/samsung-ipc/libsamsung-ipc.la
-ipc_modem_LDFLAGS = -lpthread
-
ipc_test_SOURCES = ipc-test.c
ipc_test_LDADD = $(top_builddir)/samsung-ipc/libsamsung-ipc.la
ipc_test_LDFLAGS =
diff --git a/tools/ipc-modem/Makefile.am b/tools/ipc-modem/Makefile.am
new file mode 100644
index 0000000..092664a
--- /dev/null
+++ b/tools/ipc-modem/Makefile.am
@@ -0,0 +1,17 @@
+NULL =
+
+AM_CFLAGS = \
+ -I$(top_srcdir)/include \
+ $(NULL)
+
+bin_PROGRAMS = ipc-modem
+
+# TODO: Find a way to make test more modular and represent each run of the
+# ipc-modem in TEST while having it implemented in a single python file
+PY_LOG_COMPILER = $(PYTHON)
+TEST_EXTENSIONS = .py
+TESTS = tests/ipc-modem.py
+
+ipc_modem_SOURCES = ipc-modem.c
+ipc_modem_LDADD = $(top_builddir)/samsung-ipc/libsamsung-ipc.la
+ipc_modem_LDFLAGS = -lpthread
diff --git a/tools/ipc-modem.c b/tools/ipc-modem/ipc-modem.c
similarity index 100%
rename from tools/ipc-modem.c
rename to tools/ipc-modem/ipc-modem.c
diff --git a/tools/ipc-modem.h b/tools/ipc-modem/ipc-modem.h
similarity index 100%
rename from tools/ipc-modem.h
rename to tools/ipc-modem/ipc-modem.h
diff --git a/tools/tests/ipc-modem.py b/tools/ipc-modem/tests/ipc-modem.py
similarity index 100%
rename from tools/tests/ipc-modem.py
rename to tools/ipc-modem/tests/ipc-modem.py
--
2.36.0
More information about the Replicant
mailing list