[gimp] Makefiles: don't use -xobjective-c when linking files on Mac
- From: N/A <ell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] Makefiles: don't use -xobjective-c when linking files on Mac
- Date: Sun, 8 Apr 2018 08:04:18 +0000 (UTC)
commit 6ebc3f1b090194e02b6e5f6d4fd20e4f856a861f
Author: Ell <ell_se yahoo com>
Date: Sun Apr 8 03:59:49 2018 -0400
Makefiles: don't use -xobjective-c when linking files on Mac
Last commit caused -xobjective-c to be passed during linking on
Mac, causing object files to be treated as source files. Add a
-xnone flag to AM_LDFLAGS, canceling the effect of -xobjective-c.
Additinally, add a -xobjective-c++ flag to AM_CXXFLAGS, so that we
can use Objective-C in C++ files on Mac, if we ever need to.
app-tools/Makefile.am | 8 ++++++++
app/core/Makefile.am | 8 ++++++++
app/display/Makefile.am | 8 ++++++++
app/gui/Makefile.am | 8 ++++++++
app/widgets/Makefile.am | 8 ++++++++
libgimp/Makefile.am | 14 ++++++++++++--
libgimpbase/Makefile.am | 11 ++++++++++-
libgimpthumb/Makefile.am | 11 ++++++++++-
libgimpwidgets/Makefile.am | 11 ++++++++++-
plug-ins/script-fu/Makefile.am | 24 +++++++++++++++---------
tools/Makefile.am | 8 ++++++++
11 files changed, 105 insertions(+), 14 deletions(-)
---
diff --git a/app-tools/Makefile.am b/app-tools/Makefile.am
index 25fa220..d0f6e94 100644
--- a/app-tools/Makefile.am
+++ b/app-tools/Makefile.am
@@ -7,6 +7,8 @@ libappwidgets = $(top_builddir)/app/widgets/libappwidgets.a
if PLATFORM_OSX
xobjective_c = "-xobjective-c"
+xobjective_cxx = "-xobjective-c++"
+xnone = "-xnone"
endif
if OS_WIN32
@@ -71,3 +73,9 @@ AM_CPPFLAGS = \
AM_CFLAGS = \
$(xobjective_c)
+
+AM_CXXFLAGS = \
+ $(xobjective_cxx)
+
+AM_LDFLAGS = \
+ $(xnone)
diff --git a/app/core/Makefile.am b/app/core/Makefile.am
index a994d37..7338113 100644
--- a/app/core/Makefile.am
+++ b/app/core/Makefile.am
@@ -2,6 +2,8 @@
if PLATFORM_OSX
xobjective_c = "-xobjective-c"
+xobjective_cxx = "-xobjective-c++"
+xnone = "-xnone"
endif
AM_CPPFLAGS = \
@@ -23,6 +25,12 @@ AM_CPPFLAGS = \
AM_CFLAGS = \
$(xobjective_c)
+AM_CXXFLAGS = \
+ $(xobjective_cxx)
+
+AM_LDFLAGS = \
+ $(xnone)
+
noinst_LIBRARIES = libappcore.a
libappcore_a_sources = \
diff --git a/app/display/Makefile.am b/app/display/Makefile.am
index 5af95dd..e4f9b48 100644
--- a/app/display/Makefile.am
+++ b/app/display/Makefile.am
@@ -2,6 +2,8 @@
if PLATFORM_OSX
xobjective_c = "-xobjective-c"
+xobjective_cxx = "-xobjective-c++"
+xnone = "-xnone"
endif
AM_CPPFLAGS = \
@@ -17,6 +19,12 @@ AM_CPPFLAGS = \
AM_CFLAGS = \
$(xobjective_c)
+AM_CXXFLAGS = \
+ $(xobjective_cxx)
+
+AM_LDFLAGS = \
+ $(xnone)
+
noinst_LIBRARIES = libappdisplay.a
libappdisplay_a_sources = \
diff --git a/app/gui/Makefile.am b/app/gui/Makefile.am
index 52d0233..50def4f 100644
--- a/app/gui/Makefile.am
+++ b/app/gui/Makefile.am
@@ -2,6 +2,8 @@
if PLATFORM_OSX
xobjective_c = "-xobjective-c"
+xobjective_cxx = "-xobjective-c++"
+xnone = "-xnone"
endif
AM_CPPFLAGS = \
@@ -21,6 +23,12 @@ AM_CPPFLAGS = \
AM_CFLAGS = \
$(xobjective_c)
+AM_CXXFLAGS = \
+ $(xobjective_cxx)
+
+AM_LDFLAGS = \
+ $(xnone)
+
noinst_LIBRARIES = libappgui.a
libappgui_a_sources = \
diff --git a/app/widgets/Makefile.am b/app/widgets/Makefile.am
index 2594dc0..1066b88 100644
--- a/app/widgets/Makefile.am
+++ b/app/widgets/Makefile.am
@@ -2,6 +2,8 @@
if PLATFORM_OSX
xobjective_c = "-xobjective-c"
+xobjective_cxx = "-xobjective-c++"
+xnone = "-xnone"
endif
AM_CPPFLAGS = \
@@ -19,6 +21,12 @@ AM_CPPFLAGS = \
AM_CFLAGS = \
$(xobjective_c)
+AM_CXXFLAGS = \
+ $(xobjective_cxx)
+
+AM_LDFLAGS = \
+ $(xnone)
+
noinst_LIBRARIES = libappwidgets.a
libappwidgets_a_sources = \
diff --git a/libgimp/Makefile.am b/libgimp/Makefile.am
index 9817e8f..88ef23a 100644
--- a/libgimp/Makefile.am
+++ b/libgimp/Makefile.am
@@ -13,6 +13,8 @@ endif
if PLATFORM_OSX
xobjective_c = "-xobjective-c"
+xobjective_cxx = "-xobjective-c++"
+xnone = "-xnone"
framework_cocoa = -framework Cocoa
endif
@@ -80,6 +82,12 @@ AM_CPPFLAGS = \
AM_CFLAGS = \
$(xobjective_c)
+AM_CXXFLAGS = \
+ $(xobjective_cxx)
+
+AM_LDFLAGS = \
+ $(xnone)
+
lib_LTLIBRARIES = libgimp-@GIMP_API_VERSION@.la libgimpui-@GIMP_API_VERSION@.la
PDB_WRAPPERS_C = \
@@ -395,7 +403,8 @@ libgimp_@GIMP_API_VERSION@_la_LDFLAGS = \
-version-info $(LT_VERSION_INFO) \
$(no_undefined) \
$(libgimp_export_symbols) \
- $(framework_cocoa)
+ $(framework_cocoa) \
+ $(xnone)
EXTRA_libgimp_@GIMP_API_VERSION@_la_DEPENDENCIES = $(gimp_def)
@@ -413,7 +422,8 @@ libgimpui_@GIMP_API_VERSION@_la_LDFLAGS = \
-version-info $(LT_VERSION_INFO) \
$(no_undefined) \
$(libgimpui_export_symbols) \
- $(framework_cocoa)
+ $(framework_cocoa) \
+ $(xnone)
EXTRA_libgimpui_@GIMP_API_VERSION@_la_DEPENDENCIES = $(gimpui_def)
diff --git a/libgimpbase/Makefile.am b/libgimpbase/Makefile.am
index 3825eb9..2b735f9 100644
--- a/libgimpbase/Makefile.am
+++ b/libgimpbase/Makefile.am
@@ -6,6 +6,8 @@ endif
if PLATFORM_OSX
xobjective_c = "-xobjective-c"
+xobjective_cxx = "-xobjective-c++"
+xnone = "-xnone"
framework_cocoa = -framework Cocoa
endif
@@ -69,10 +71,16 @@ AM_CPPFLAGS = \
AM_CFLAGS = \
$(xobjective_c)
+AM_CXXFLAGS = \
+ $(xobjective_cxx)
+
AM_CCASFLAGS = \
-I$(top_builddir) \
-I$(top_srcdir)
+AM_LDFLAGS = \
+ $(xnone)
+
EXTRA_DIST = \
gimpbase.def
@@ -165,7 +173,8 @@ libgimpbase_@GIMP_API_VERSION@_la_LDFLAGS = \
-version-info $(LT_VERSION_INFO) \
$(no_undefined) \
$(libgimpbase_export_symbols) \
- $(framework_cocoa)
+ $(framework_cocoa) \
+ $(xnone)
EXTRA_libgimpbase_@GIMP_API_VERSION@_la_DEPENDENCIES = $(gimpbase_def)
diff --git a/libgimpthumb/Makefile.am b/libgimpthumb/Makefile.am
index d7782d4..33eea1d 100644
--- a/libgimpthumb/Makefile.am
+++ b/libgimpthumb/Makefile.am
@@ -6,6 +6,8 @@ endif
if PLATFORM_OSX
xobjective_c = "-xobjective-c"
+xobjective_cxx = "-xobjective-c++"
+xnone = "-xnone"
framework_cocoa = -framework Cocoa
endif
@@ -55,6 +57,12 @@ AM_CPPFLAGS = \
AM_CFLAGS = \
$(xobjective_c)
+AM_CXXFLAGS = \
+ $(xobjective_cxx)
+
+AM_LDFLAGS = \
+ $(xnone)
+
EXTRA_DIST = \
gimpthumb.def
@@ -84,7 +92,8 @@ libgimpthumb_@GIMP_API_VERSION@_la_LDFLAGS = \
-version-info $(LT_VERSION_INFO) \
$(no_undefined) \
$(libgimpthumb_export_symbols) \
- $(framework_cocoa)
+ $(framework_cocoa) \
+ $(xnone)
libgimpthumb_@GIMP_API_VERSION@_la_LIBADD = \
$(GDK_PIXBUF_LIBS) \
diff --git a/libgimpwidgets/Makefile.am b/libgimpwidgets/Makefile.am
index 52ea5a2..02f8ca6 100644
--- a/libgimpwidgets/Makefile.am
+++ b/libgimpwidgets/Makefile.am
@@ -13,6 +13,8 @@ endif
if PLATFORM_OSX
xobjective_c = "-xobjective-c"
+xobjective_cxx = "-xobjective-c++"
+xnone = "-xnone"
framework_cocoa = -framework Cocoa
endif
@@ -63,6 +65,12 @@ AM_CPPFLAGS = \
AM_CFLAGS = \
$(xobjective_c)
+AM_CXXFLAGS = \
+ $(xobjective_cxx)
+
+AM_LDFLAGS = \
+ $(xnone)
+
lib_LTLIBRARIES = libgimpwidgets-@GIMP_API_VERSION@.la
libgimpwidgets_sources = \
@@ -270,7 +278,8 @@ libgimpwidgets_@GIMP_API_VERSION@_la_LDFLAGS = \
-version-info $(LT_VERSION_INFO) \
$(no_undefined) \
$(libgimpwidgets_export_symbols) \
- $(framework_cocoa)
+ $(framework_cocoa) \
+ $(xnone)
EXTRA_libgimpwidgets_@GIMP_API_VERSION@_la_DEPENDENCIES = $(gimpwidgets_def)
diff --git a/plug-ins/script-fu/Makefile.am b/plug-ins/script-fu/Makefile.am
index 70874e3..4db7705 100644
--- a/plug-ins/script-fu/Makefile.am
+++ b/plug-ins/script-fu/Makefile.am
@@ -2,6 +2,8 @@
if PLATFORM_OSX
xobjective_c = "-xobjective-c"
+xobjective_cxx = "-xobjective-c++"
+xnone = "-xnone"
framework_cocoa = -framework Cocoa
endif
@@ -28,21 +30,25 @@ include $(top_srcdir)/build/windows/gimprc-plug-ins.rule
script_fu_RC = script-fu.rc.o
endif
-AM_CFLAGS = \
+AM_CPPFLAGS = \
+ -I$(top_srcdir) \
+ $(GTK_CFLAGS) \
+ $(GEGL_CFLAGS) \
+ -I$(includedir) \
-DSTANDALONE=0 \
-DUSE_INTERFACE=1 \
- -DUSE_STRLWR=0 \
+ -DUSE_STRLWR=0
+
+AM_CFLAGS = \
$(xobjective_c)
-AM_CPPFLAGS = \
- -I$(top_srcdir) \
- $(GTK_CFLAGS) \
- $(GEGL_CFLAGS) \
- -I$(includedir)
+AM_CXXFLAGS = \
+ $(xobjective_cxx)
AM_LDFLAGS = \
- $(mwindows) \
- $(framework_cocoa)
+ $(mwindows) \
+ $(framework_cocoa) \
+ $(xnone)
SUBDIRS = tinyscheme ftx scripts
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 31d2750..fd62fc2 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -6,6 +6,8 @@ libgimpbase = $(top_builddir)/libgimpbase/libgimpbase-$(GIMP_API_VERSION).la
if PLATFORM_OSX
xobjective_c = "-xobjective-c"
+xobjective_cxx = "-xobjective-c++"
+xnone = "-xnone"
endif
if OS_WIN32
@@ -92,6 +94,12 @@ AM_CPPFLAGS = \
AM_CFLAGS = \
$(xobjective_c)
+AM_CXXFLAGS = \
+ $(xobjective_cxx)
+
+AM_LDFLAGS = \
+ $(xnone)
+
EXTRA_DIST = \
defcheck.py \
gimp-mkenums \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]