diff options
author | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2021-03-02 18:28:19 +0100 |
---|---|---|
committer | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2021-03-02 18:38:51 +0100 |
commit | 255e6e2a1fc2392fd9db9d2064048b37f48f9e0d (patch) | |
tree | f27acd0d22d46cbef4441921aa2fafe1ee21aa02 | |
parent | df4191021fa6c14df857dadf2c0ac0d208a62564 (diff) | |
download | hardware_replicant_libsamsung-ipc-history/03-03-2021-replicant-11-i9300-modem.tar.gz hardware_replicant_libsamsung-ipc-history/03-03-2021-replicant-11-i9300-modem.tar.bz2 hardware_replicant_libsamsung-ipc-history/03-03-2021-replicant-11-i9300-modem.zip |
[test] Link test against libsamsung-ipc insteadhistory/03-03-2021-replicant-11-i9300-modem
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
-rw-r--r-- | samsung-ipc/Makefile.am | 31 | ||||
-rw-r--r-- | samsung-ipc/common/Makefile.am | 33 | ||||
-rw-r--r-- | samsung-ipc/devices/Makefile.am | 50 | ||||
-rw-r--r-- | samsung-ipc/modems/Makefile.am | 26 | ||||
-rw-r--r-- | samsung-ipc/partitions/Makefile.am | 8 | ||||
-rw-r--r-- | samsung-ipc/tests/Makefile.am | 30 |
6 files changed, 66 insertions, 112 deletions
diff --git a/samsung-ipc/Makefile.am b/samsung-ipc/Makefile.am index f613f75..ed6331f 100644 --- a/samsung-ipc/Makefile.am +++ b/samsung-ipc/Makefile.am @@ -14,19 +14,26 @@ lib_LTLIBRARIES = \ libsamsung-ipc.la \ $(NULL) -# This defines libsamsung_ipc_la_SOURCES so we can reuse it in -# samsung-ipc/test/Makefile.am -include common/Makefile.am +libsamsung_ipc_la_SOURCES = \ + ipc.c \ + ipc.h \ + ipc_utils.c \ + utils.c \ + call.c \ + sms.c \ + sec.c \ + net.c \ + misc.c \ + svc.c \ + gprs.c \ + rfs.c \ + gen.c \ + $(NULL) + +include devices/Makefile.am +include modems/Makefile.am +include partitions/Makefile.am libsamsung_ipc_la_LIBADD = \ $(OPENSSL_LIBS) \ $(NULL) - -# As we reuse $(libsamsung_ipc_la_SOURCES) in samsung-ipc/common/Makefile.am, -# we need to tell the autotools to separate the libsamsung-ipc and -# libsamsung-ipc-test .o, otherwise libsamsung-ipc' .o will be linked -# directoy in libsamsung-ipc-test. -# As they need to be compiled with different options, this is an issue. -# Without that we might have errors like this one during autogen.sh: -# error: object 'ipc.$(OBJEXT)' created both with libtool and without -libsamsung_ipc_la_CPPFLAGS = ${AM_CPPFLAGS} diff --git a/samsung-ipc/common/Makefile.am b/samsung-ipc/common/Makefile.am deleted file mode 100644 index 631c31e..0000000 --- a/samsung-ipc/common/Makefile.am +++ /dev/null @@ -1,33 +0,0 @@ -# To be able to test internal functions of libsamsung-ipc we need to give -# access to them to a test program (libsamsung-ipc-test). To do that, we -# simply re-included all the library source code inside that test program. -# -# To achieve that, This Makefile.am is included by both samsung-ipc/Makefile.am -# which has rules to build the libsamsung-ipc library and -# samsung-ipc/test/Makefile.am which has rules to build the test utility -# (libsamsung-ipc-test). -# -# This way both Makefile.am have access to libsamsung_ipc_la_SOURCES but -# only samsung-ipc/Makefile.am uses it to build the library. - -libsamsung_ipc_la_SOURCES = $(NULL) - -libsamsung_ipc_la_SOURCES += \ - $(top_srcdir)/samsung-ipc/ipc.c \ - $(top_srcdir)/samsung-ipc/ipc.h \ - $(top_srcdir)/samsung-ipc/ipc_utils.c \ - $(top_srcdir)/samsung-ipc/utils.c \ - $(top_srcdir)/samsung-ipc/call.c \ - $(top_srcdir)/samsung-ipc/sms.c \ - $(top_srcdir)/samsung-ipc/sec.c \ - $(top_srcdir)/samsung-ipc/net.c \ - $(top_srcdir)/samsung-ipc/misc.c \ - $(top_srcdir)/samsung-ipc/svc.c \ - $(top_srcdir)/samsung-ipc/gprs.c \ - $(top_srcdir)/samsung-ipc/rfs.c \ - $(top_srcdir)/samsung-ipc/gen.c \ - $(NULL) - -include $(top_srcdir)/samsung-ipc/devices/Makefile.am -include $(top_srcdir)/samsung-ipc/modems/Makefile.am -include $(top_srcdir)/samsung-ipc/partitions/Makefile.am diff --git a/samsung-ipc/devices/Makefile.am b/samsung-ipc/devices/Makefile.am index ef6d379..ad3c7ba 100644 --- a/samsung-ipc/devices/Makefile.am +++ b/samsung-ipc/devices/Makefile.am @@ -1,27 +1,27 @@ libsamsung_ipc_la_SOURCES += \ - $(top_srcdir)/samsung-ipc/devices/ipc_devices.c \ - $(top_srcdir)/samsung-ipc/devices/ipc_devices.h \ - $(top_srcdir)/samsung-ipc/devices/crespo/crespo.c \ - $(top_srcdir)/samsung-ipc/devices/crespo/crespo.h \ - $(top_srcdir)/samsung-ipc/devices/crespo/crespo_modem_ctl.h \ - $(top_srcdir)/samsung-ipc/devices/aries/aries.c \ - $(top_srcdir)/samsung-ipc/devices/aries/aries.h \ - $(top_srcdir)/samsung-ipc/devices/aries/onedram.h \ - $(top_srcdir)/samsung-ipc/devices/aries/phonet.h \ - $(top_srcdir)/samsung-ipc/devices/galaxys2/galaxys2.c \ - $(top_srcdir)/samsung-ipc/devices/galaxys2/galaxys2.h \ - $(top_srcdir)/samsung-ipc/devices/maguro/maguro.c \ - $(top_srcdir)/samsung-ipc/devices/maguro/maguro.h \ - $(top_srcdir)/samsung-ipc/devices/piranha/piranha.c \ - $(top_srcdir)/samsung-ipc/devices/piranha/piranha.h \ - $(top_srcdir)/samsung-ipc/devices/i9300/i9300.c \ - $(top_srcdir)/samsung-ipc/devices/i9300/i9300.h \ - $(top_srcdir)/samsung-ipc/devices/n7100/n7100.c \ - $(top_srcdir)/samsung-ipc/devices/n7100/n7100.h \ - $(top_srcdir)/samsung-ipc/devices/n5100/n5100.c \ - $(top_srcdir)/samsung-ipc/devices/n5100/n5100.h \ - $(top_srcdir)/samsung-ipc/devices/herolte/herolte.c \ - $(top_srcdir)/samsung-ipc/devices/herolte/herolte.h \ - $(top_srcdir)/samsung-ipc/devices/generic/generic.c \ - $(top_srcdir)/samsung-ipc/devices/generic/generic.h \ + devices/ipc_devices.c \ + devices/ipc_devices.h \ + devices/crespo/crespo.c \ + devices/crespo/crespo.h \ + devices/crespo/crespo_modem_ctl.h \ + devices/aries/aries.c \ + devices/aries/aries.h \ + devices/aries/onedram.h \ + devices/aries/phonet.h \ + devices/galaxys2/galaxys2.c \ + devices/galaxys2/galaxys2.h \ + devices/maguro/maguro.c \ + devices/maguro/maguro.h \ + devices/piranha/piranha.c \ + devices/piranha/piranha.h \ + devices/i9300/i9300.c \ + devices/i9300/i9300.h \ + devices/n7100/n7100.c \ + devices/n7100/n7100.h \ + devices/n5100/n5100.c \ + devices/n5100/n5100.h \ + devices/herolte/herolte.c \ + devices/herolte/herolte.h \ + devices/generic/generic.c \ + devices/generic/generic.h \ $(NULL) diff --git a/samsung-ipc/modems/Makefile.am b/samsung-ipc/modems/Makefile.am index 52b85e3..f59258a 100644 --- a/samsung-ipc/modems/Makefile.am +++ b/samsung-ipc/modems/Makefile.am @@ -1,15 +1,15 @@ libsamsung_ipc_la_SOURCES += \ - $(top_srcdir)/samsung-ipc/modems/xmm616/xmm616.c \ - $(top_srcdir)/samsung-ipc/modems/xmm616/xmm616.h \ - $(top_srcdir)/samsung-ipc/modems/xmm626/xmm626.c \ - $(top_srcdir)/samsung-ipc/modems/xmm626/xmm626.h \ - $(top_srcdir)/samsung-ipc/modems/xmm626/xmm626_hsic.c \ - $(top_srcdir)/samsung-ipc/modems/xmm626/xmm626_hsic.h \ - $(top_srcdir)/samsung-ipc/modems/xmm626/xmm626_kernel_smdk4412.c \ - $(top_srcdir)/samsung-ipc/modems/xmm626/xmm626_kernel_smdk4412.h \ - $(top_srcdir)/samsung-ipc/modems/xmm626/xmm626_mipi.c \ - $(top_srcdir)/samsung-ipc/modems/xmm626/xmm626_mipi.h \ - $(top_srcdir)/samsung-ipc/modems/xmm626/xmm626_modem_if.h \ - $(top_srcdir)/samsung-ipc/modems/xmm626/xmm626_modem_link_device_hsic.h \ - $(top_srcdir)/samsung-ipc/modems/xmm626/xmm626_modem_prj.h \ + modems/xmm616/xmm616.c \ + modems/xmm616/xmm616.h \ + modems/xmm626/xmm626.c \ + modems/xmm626/xmm626.h \ + modems/xmm626/xmm626_hsic.c \ + modems/xmm626/xmm626_hsic.h \ + modems/xmm626/xmm626_kernel_smdk4412.c \ + modems/xmm626/xmm626_kernel_smdk4412.h \ + modems/xmm626/xmm626_mipi.c \ + modems/xmm626/xmm626_mipi.h \ + modems/xmm626/xmm626_modem_if.h \ + modems/xmm626/xmm626_modem_link_device_hsic.h \ + modems/xmm626/xmm626_modem_prj.h \ $(NULL) diff --git a/samsung-ipc/partitions/Makefile.am b/samsung-ipc/partitions/Makefile.am index 7402c54..5248869 100644 --- a/samsung-ipc/partitions/Makefile.am +++ b/samsung-ipc/partitions/Makefile.am @@ -1,6 +1,6 @@ libsamsung_ipc_la_SOURCES += \ - $(top_srcdir)/samsung-ipc/partitions/android/android.c \ - $(top_srcdir)/samsung-ipc/partitions/android/android.h \ - $(top_srcdir)/samsung-ipc/partitions/toc/toc.c \ - $(top_srcdir)/samsung-ipc/partitions/toc/toc.h \ + partitions/android/android.c \ + partitions/android/android.h \ + partitions/toc/toc.c \ + partitions/toc/toc.h \ $(NULL) diff --git a/samsung-ipc/tests/Makefile.am b/samsung-ipc/tests/Makefile.am index 38580c1..d049c74 100644 --- a/samsung-ipc/tests/Makefile.am +++ b/samsung-ipc/tests/Makefile.am @@ -1,9 +1,5 @@ NULL = -# This defines libsamsung_ipc_la_SOURCES so it can be shared between -# samsung-ipc/Makefile.am (for the libsamsung-ipc library) and this Makefile.am. -include $(top_srcdir)/samsung-ipc/common/Makefile.am - AM_CFLAGS = \ -I$(top_srcdir)/include \ -I$(top_srcdir)/samsung-ipc \ @@ -14,33 +10,17 @@ if WANT_DEBUG AM_CFLAGS += -ggdb -O0 -DDEBUG endif -bin_PROGRAMS = \ - libsamsung-ipc-test \ - $(NULL) +bin_PROGRAMS = libsamsung-ipc-test libsamsung_ipc_test_SOURCES = \ - $(top_srcdir)/samsung-ipc/tests/main.c \ - $(top_srcdir)/samsung-ipc/tests/partitions/android.c \ - $(top_srcdir)/samsung-ipc/tests/partitions/android.h \ - $(NULL) - -libsamsung_ipc_test_SOURCES += $(libsamsung_ipc_la_SOURCES) - -libsamsung_ipc_test_LDADD = \ - $(OPENSSL_LIBS) \ + main.c \ + partitions/android.c \ + partitions/android.h \ $(NULL) +libsamsung_ipc_test_LDADD = $(top_builddir)/samsung-ipc/libsamsung-ipc.la libsamsung_ipc_test_LDFLAGS = -# As we reuse $(libsamsung_ipc_la_SOURCES) in the libsamsung-ipc-test test -# program, we need to tell the autotools to separate the libsamsung-ipc and -# libsamsung-ipc-test .o, otherwise libsamsung-ipc' .o will be linked -# directoy in libsamsung-ipc-test. -# As they need to be compiled with different options, this is an issue. -# Without that we might have errors like this one during autogen.sh: -# error: object 'ipc.$(OBJEXT)' created both with libtool and without -libsamsung_ipc_test_CPPFLAGS = ${AM_CPPFLAGS} - # TODO: Find a way to make test more modular and represent each run of # libsamsung-ipc-test in TEST while having it implemented in a single # python file |