diff options
author | Gerhard Sittig <gerhard.sittig@gmx.net> | 2020-02-22 09:52:39 +0100 |
---|---|---|
committer | Gerhard Sittig <gerhard.sittig@gmx.net> | 2020-07-18 15:32:52 +0200 |
commit | 650f19467d6e0f864df9960d8696148e90d85b79 (patch) | |
tree | f740177dc2646aba70d38cbc31e270942a15321b /Makefile.am | |
parent | ab88bae1c7b966e686b313625dd799a522e2093e (diff) | |
download | libsigrokdecode-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.am | 13 |
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 |