Commit 6ebc3f1b authored by Ell's avatar Ell

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.
parent 06950be7
......@@ -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)
......@@ -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 = \
......
......@@ -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 = \
......
......@@ -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 = \
......
......@@ -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 = \
......
......@@ -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)
......
......@@ -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)
......
......@@ -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) \
......
......@@ -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)
......
......@@ -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
......
......@@ -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 \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment