summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorGerhard Sittig <gerhard.sittig@gmx.net>2020-02-22 09:52:39 +0100
committerGerhard Sittig <gerhard.sittig@gmx.net>2020-07-18 15:32:52 +0200
commit650f19467d6e0f864df9960d8696148e90d85b79 (patch)
treef740177dc2646aba70d38cbc31e270942a15321b /Makefile.am
parentab88bae1c7b966e686b313625dd799a522e2093e (diff)
downloadlibsigrokdecode-650f19467d6e0f864df9960d8696148e90d85b79.tar.gz
libsigrokdecode-650f19467d6e0f864df9960d8696148e90d85b79.zip
irmp: hook up IRMP to the build, create a separate shared object
Add the irmp/ subdirectory to the automake build instructions. Make the feature optional, provide an enable/disable switch (on by default). It's an essential implementation detail that the irmp.c file is required to build, but is not a compile unit of its own. It's yet to be seen how to most appropriately declare the dependencies of libirmp_la (can get refined in future commits). Create a separate shared object from the IRMP source, which shall result in a stable filename for the DLL/.so lookup. Decoder library code would not know the application's executable name, neither is anonymous symbol lookup "in the current process" portable across supported platforms. The configure.ac macros were modelled after the autobook DLL section. https://www.sourceware.org/autobook/autobook/autobook_137.html Symbol export is simple because the library gets implemented and built here, but is not used from C language code in this project. That's why we don't do the full dance of symbol import which would be needed on Windows.
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am13
1 files changed, 13 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
index 97e5228..9e15c30 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -54,6 +54,19 @@ pkginclude_HEADERS = libsigrokdecode.h
nodist_pkginclude_HEADERS = version.h
noinst_HEADERS = libsigrokdecode-internal.h
+if WITH_IRMP
+lib_LTLIBRARIES += libirmp.la
+libirmp_la_SOURCES = \
+ irmp/irmp-main-sharedlib.c \
+ irmp/irmp-main-sharedlib.h \
+ irmp/irmp.h \
+ irmp/irmpconfig.h \
+ irmp/irmpsystem.h \
+ irmp/irmpprotocols.h
+noinst_HEADERS += irmp/irmp.c
+libirmp_la_LDFLAGS = -no-undefined -version-info 0:0:0
+endif
+
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libsigrokdecode.pc