From 7f7af82d3331d8fafd68d30e4224a9ca16ff0be6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= <sergio@serjux.com>
Date: Sat, 18 Sep 2021 17:35:08 +0100
Subject: [PATCH 1/3] Build projectM_qt shared lib instead static lib

i.e. build libprojectM_qt.la instead libprojectM_qt.a
---
 src/projectM-jack/Makefile.am       |  2 +-
 src/projectM-pulseaudio/Makefile.am |  2 +-
 src/projectM-qt/Makefile.am         | 12 ++++++++----
 3 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/src/projectM-jack/Makefile.am b/src/projectM-jack/Makefile.am
index bceef621..9fa35f8c 100644
--- a/src/projectM-jack/Makefile.am
+++ b/src/projectM-jack/Makefile.am
@@ -25,7 +25,7 @@ ${QT_CXXFLAGS} \
 bin_PROGRAMS = projectM-jack
 projectM_jack_SOURCES = qprojectM-jack.cpp ConfigFile.cpp ${EXTRA_SRCS}
 projectM_jack_LDADD = \
-  ../projectM-qt/libprojectM_qt.a \
+  ../projectM-qt/libprojectM_qt.la \
   ${jack_LIBS} \
   ${QT_LIBS} \
   ../libprojectM/libprojectM.la
diff --git a/src/projectM-pulseaudio/Makefile.am b/src/projectM-pulseaudio/Makefile.am
index abddad8e..bb6b9493 100644
--- a/src/projectM-pulseaudio/Makefile.am
+++ b/src/projectM-pulseaudio/Makefile.am
@@ -48,7 +48,7 @@ nodist_projectM_pulseaudio_SOURCES = \
 
 projectM_pulseaudio_LDADD = \
 	${libpulse_LIBS} \
-	../projectM-qt/libprojectM_qt.a \
+	../projectM-qt/libprojectM_qt.la \
 	../libprojectM/libprojectM.la \
 	${QT_LIBS}
 
diff --git a/src/projectM-qt/Makefile.am b/src/projectM-qt/Makefile.am
index 757ebde5..3ae83258 100644
--- a/src/projectM-qt/Makefile.am
+++ b/src/projectM-qt/Makefile.am
@@ -41,9 +41,7 @@ BUILT_SOURCES =               \
     ui_qpreseteditordialog.h \
     ui_qprojectmconfigdialog.h
 
-noinst_LIBRARIES = libprojectM_qt.a
-
-libprojectM_qt_a_SOURCES = \
+libprojectM_qt_la_SOURCES = \
 	qprojectm_mainwindow.cpp \
 	configfile.hpp configfile.cpp \
 	qplaylistfiledialog.cpp \
@@ -60,7 +60,7 @@ libprojectM_qt_a_SOURCES = \
 	application.qrc \
 	images/*
 
-nodist_libprojectM_qt_a_SOURCES = \
+nodist_libprojectM_qt_la_SOURCES = \
 	application_qrc.cpp \
 	$(nodist_projectM_qt_moc_sources)
 
@@ -77,6 +75,12 @@ AM_CFLAGS = ${my_CFLAGS} \
 	-ffunction-sections \
 	-fdata-sections
 
+lib_LTLIBRARIES = libprojectM_qt.la
+
+# link flags
+libprojectM_qt_la_LDFLAGS = $(CG_LDFLAGS) -no-undefined -version-info 4:1:1
+
+
 CLEANFILES = \
 	application_qrc.cpp \
 	${BUILT_SOURCES} \
-- 
2.31.1
--- src/projectM-qt/Makefile.am.orig	2021-02-20 19:40:39.000000000 +0000
+++ src/projectM-qt/Makefile.am	2021-09-18 22:50:21.479573506 +0100
