+if HAVE_ELF_H
+libcommon_lgpl_la_SOURCES += \
+ lttng-elf.c lttng-elf.h
+endif
+
+libcommon_lgpl_la_LIBADD = \
+ $(top_builddir)/src/common/config/libconfig.la \
+ $(top_builddir)/src/common/hashtable/libhashtable-lgpl.la
+
+# The libpath static archive contains GPLv2 compatible code. It is
+# meant to be used by GPL executables.
+
+libpath_la_SOURCES = \
+ path.c path.h
+
+# The libcommon-gpl static archive contains GPLv2 compatible code. It is
+# meant to be used by GPL executables.
+libcommon_gpl_la_SOURCES = \
+ common.h \
+ context.c context.h \
+ daemonize.c daemonize.h \
+ filter.c filter.h \
+ fs-handle.c fs-handle.h fs-handle-internal.h \
+ futex.c futex.h \
+ optional.h \
+ pipe.c pipe.h \
+ trace-chunk.c trace-chunk.h \
+ trace-chunk-registry.h \
+ uuid.c uuid.h \
+ waiter.c waiter.h
+
+libcommon_gpl_la_LIBADD = \
+ -lurcu -lurcu-common \
+ libcommon-lgpl.la \
+ libpath.la \
+ $(top_builddir)/src/common/hashtable/libhashtable-gpl.la \
+ $(top_builddir)/src/common/fd-tracker/libfd-tracker.la
+
+if BUILD_LIB_COMPAT
+SUBDIRS += compat
+libcommon_lgpl_la_LIBADD += \
+ $(top_builddir)/src/common/compat/libcompat.la
+endif