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.
This commit is contained in:
Ell 2018-04-08 03:59:49 -04:00
parent 06950be7f0
commit 6ebc3f1b09
11 changed files with 105 additions and 14 deletions

View file

@ -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)