Files
gentoo/media-plugins/cmt-plugins/files/cmt-plugins-1.17-makefile.patch
Miroslav Šulc 2ff6692048 media-plugins/cmt-plugins: fixed clang compilation + linking in 1.17-r1
Closes: https://bugs.gentoo.org/740170
Package-Manager: Portage-3.0.5, Repoman-3.0.1
Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
2020-09-03 10:54:48 +02:00

35 lines
851 B
Diff

diff --git a/src/Makefile b/src/Makefile
index 159dd46..5c2c0f4 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -11,8 +11,6 @@ INSTALL_PLUGINS_DIR = /usr/lib/ladspa/
# GENERAL
#
-CFLAGS = $(INCLUDES) -Wall -Werror -O2 -fPIC
-CXXFLAGS = $(CFLAGS)
PLUGIN_LIB = ../plugins/cmt.so
###############################################################################
@@ -63,14 +61,18 @@ PLUGIN_OBJECTS = \
plugin: $(PLUGIN_LIB)
+%.o: %.cpp
+ $(CXX) $(INCLUDES) $(CFLAGS) -fPIC -c -o $*.o $*.cpp
+
+
targets: $(PLUGIN_LIB)
$(PLUGIN_LIB): $(PLUGIN_OBJECTS) gcc_exports.map
- $(CXX) -shared \
+ $(CXX) $(LDFLAGS) \
+ -shared \
$(CFLAGS) \
-fvisibility=hidden \
-fvisibility-inlines-hidden \
- -s \
-Wl,--version-script=gcc_exports.map \
-o $(PLUGIN_LIB) \
$(PLUGIN_OBJECTS)