1997-09-16 01:07:48 +00:00
|
|
|
#
|
|
|
|
# target.make
|
|
|
|
#
|
1997-10-17 00:55:41 +00:00
|
|
|
# Determine target specific settings
|
1997-09-16 01:07:48 +00:00
|
|
|
#
|
|
|
|
# Copyright (C) 1997 Free Software Foundation, Inc.
|
|
|
|
#
|
|
|
|
# Author: Scott Christley <scottc@net-community.com>
|
1997-10-06 03:58:06 +00:00
|
|
|
# Author: Ovidiu Predescu <ovidiu@net-community.com>
|
1997-09-16 01:07:48 +00:00
|
|
|
#
|
|
|
|
# This file is part of the GNUstep Makefile Package.
|
|
|
|
#
|
|
|
|
# This library is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of the GNU General Public License
|
2007-10-30 14:18:41 +00:00
|
|
|
# as published by the Free Software Foundation; either version 3
|
1997-09-16 01:07:48 +00:00
|
|
|
# of the License, or (at your option) any later version.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public
|
2007-07-13 10:11:48 +00:00
|
|
|
# License along with this library; see the file COPYING.
|
1997-09-16 01:07:48 +00:00
|
|
|
# If not, write to the Free Software Foundation,
|
2005-05-22 03:20:14 +00:00
|
|
|
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
1997-09-16 01:07:48 +00:00
|
|
|
|
2002-09-12 13:59:04 +00:00
|
|
|
# This file should not contain any conditional based on the value of
|
|
|
|
# the 'shared' variable, because we have not set it up yet when this
|
|
|
|
# file is processed!
|
|
|
|
|
1997-09-18 01:36:07 +00:00
|
|
|
#
|
|
|
|
# Host and target specific settings
|
|
|
|
#
|
1997-09-25 01:23:17 +00:00
|
|
|
ifeq ($(findstring solaris, $(GNUSTEP_TARGET_OS)), solaris)
|
1997-09-18 01:36:07 +00:00
|
|
|
X_INCLUDES := $(X_INCLUDES)/X11
|
|
|
|
endif
|
1997-09-16 01:07:48 +00:00
|
|
|
|
1997-09-18 01:36:07 +00:00
|
|
|
#
|
|
|
|
# Target specific libraries
|
|
|
|
#
|
2003-07-22 03:03:27 +00:00
|
|
|
TARGET_SYSTEM_LIBS = $(CONFIG_SYSTEM_LIBS) -lm
|
2011-10-15 15:40:01 +00:00
|
|
|
|
|
|
|
# All code we build needs to be thread-safe nowadays
|
|
|
|
INTERNAL_CFLAGS = -pthread
|
|
|
|
INTERNAL_OBJCFLAGS = -pthread
|
2013-03-16 05:29:52 +00:00
|
|
|
ifeq ($(findstring android, $(GNUSTEP_TARGET_OS)), android)
|
|
|
|
INTERNAL_LDFLAGS =
|
|
|
|
else
|
|
|
|
INTERNAL_LDFLAGS = -pthread
|
|
|
|
endif
|
2011-10-15 15:40:01 +00:00
|
|
|
|
2003-07-22 03:03:27 +00:00
|
|
|
ifneq ("$(objc_threaded)","")
|
|
|
|
AUXILIARY_OBJC_LIBS += $(objc_threaded)
|
2011-10-15 15:40:01 +00:00
|
|
|
ifeq ($(shared), no)
|
|
|
|
TARGET_SYSTEM_LIBS += $(objc_threaded)
|
|
|
|
endif
|
2003-07-22 03:03:27 +00:00
|
|
|
endif
|
2001-04-10 03:19:42 +00:00
|
|
|
|
2000-06-13 15:14:23 +00:00
|
|
|
ifeq ($(findstring mingw32, $(GNUSTEP_TARGET_OS)), mingw32)
|
2005-03-01 04:54:48 +00:00
|
|
|
TARGET_SYSTEM_LIBS = $(CONFIG_SYSTEM_LIBS) \
|
2002-02-25 18:16:12 +00:00
|
|
|
-lws2_32 -ladvapi32 -lcomctl32 -luser32 -lcomdlg32 \
|
2000-06-13 15:14:23 +00:00
|
|
|
-lmpr -lnetapi32 -lm -I. # the -I is a dummy to avoid -lm^M
|
2001-04-10 03:19:42 +00:00
|
|
|
endif
|
1997-09-25 01:23:17 +00:00
|
|
|
ifeq ($(findstring solaris, $(GNUSTEP_TARGET_OS)), solaris)
|
2005-03-01 04:54:48 +00:00
|
|
|
TARGET_SYSTEM_LIBS = $(CONFIG_SYSTEM_LIBS) -lsocket -lnsl -lm
|
1998-03-25 19:05:30 +00:00
|
|
|
endif
|
1998-10-16 10:58:38 +00:00
|
|
|
ifeq ($(findstring sysv4.2, $(GNUSTEP_TARGET_OS)), sysv4.2)
|
2005-03-01 04:54:48 +00:00
|
|
|
TARGET_SYSTEM_LIBS = $(CONFIG_SYSTEM_LIBS) -lsocket -lnsl -lm
|
1999-01-28 10:54:52 +00:00
|
|
|
endif
|
1997-09-23 01:27:32 +00:00
|
|
|
|
|
|
|
#
|
1997-09-30 21:54:33 +00:00
|
|
|
# Specific settings for building shared libraries, static libraries,
|
|
|
|
# and bundles on various systems
|
1997-09-23 01:27:32 +00:00
|
|
|
#
|
2002-10-30 13:20:26 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# For each target, a few target-specific variables need to be set.
|
|
|
|
#
|
|
|
|
# The first one is SHARED_LIB_LINK_CMD - which should be set to the
|
|
|
|
# command(s) to use to link a shared library on that platform. Please
|
2009-03-24 23:08:59 +00:00
|
|
|
# note that the variables (stuff like $(LD)) in it are not expanded
|
2002-10-30 13:20:26 +00:00
|
|
|
# until SHARED_LIB_LINK_CMD is actually used (STATIC_LIB_LINK_CMD is
|
|
|
|
# the equivalent variable, used for static libraries).
|
|
|
|
#
|
|
|
|
# SHARED_LIB_LINK_CMD will be used to link standard shared libraries,
|
|
|
|
# and frameworks. It should use the following variables (which are set
|
|
|
|
# by library.make or framework.make before executing
|
|
|
|
# SHARED_LIB_LINK_CMD) to refer to what it needs to link (please note
|
|
|
|
# that STATIC_LIB_LINK_CMD will also use these variables with similar
|
|
|
|
# meanings; but not all of them, as noted):
|
|
|
|
#
|
|
|
|
# LIB_LINK_OBJ_DIR: where the newly created library should be.
|
|
|
|
# Usually GNUSTEP_OBJ_DIR for libraries, and FRAMEWORK_LIBRARY_DIR_NAME
|
|
|
|
# for frameworks.
|
|
|
|
# LIB_LINK_VERSION_FILE: the final file to create, having full
|
|
|
|
# version information: typically `libgnustep-base.so.1.5.3' for shared
|
2005-03-01 04:54:48 +00:00
|
|
|
# libraries, and `libgnustep-base.a' for static libraries. For DLL
|
|
|
|
# libraries, this is the import library libgnustep-base.dll.a. The
|
|
|
|
# reason we use the import library is because that is the code which
|
|
|
|
# needs to be installed in the library path. So by setting
|
|
|
|
# LIB_LINK_VERSION_FILE to the import library, the standard code to
|
|
|
|
# install it in the library path will work for Windows. The DLL
|
|
|
|
# library instead needs to be installed in the PATH, so we have separate
|
|
|
|
# code for that one.
|
2002-10-30 13:20:26 +00:00
|
|
|
# LIB_LINK_SONAME_FILE: this is only used for shared libraries; it
|
|
|
|
# should be passed in the -Wl,-soname argument of most linkers when
|
|
|
|
# building the LIB_LINK_VERSION_FILE. Typically `libgnustep-base.so.1'
|
2004-03-04 11:52:30 +00:00
|
|
|
# (but might also be `libgnustep-base.so.1.0' if INTERFACE_VERSION
|
|
|
|
# has been manually changed when using library.make). On many
|
|
|
|
# platforms, it's appropriate/standard to also create this file as
|
|
|
|
# a symlink to LIB_LINK_VERSION_FILE. If LIB_LINK_VERSION_FILE is
|
|
|
|
# the same as LIB_LINK_SONAME_FILE, then the symlink should not be
|
|
|
|
# created.
|
2002-10-30 13:20:26 +00:00
|
|
|
# LIB_LINK_FILE: this is only used for shared libraries; it should
|
|
|
|
# be created as a symlink to LIB_LINK_VERSION_FILE (or to
|
|
|
|
# LIB_LINK_SONAME_FILE if it's created on that platform).
|
|
|
|
# Typically `libgnustep-base.so'.
|
2002-12-25 02:00:42 +00:00
|
|
|
# LIB_LINK_INSTALL_NAME: on some platforms, when a shared library is
|
|
|
|
# linked, a default install name of the library is hardcoded into
|
|
|
|
# the library. This is that name.
|
2005-03-01 04:54:48 +00:00
|
|
|
# LIB_LINK_DLL_FILE: on Windows, this is the DLL that gets created
|
|
|
|
# and installed in the Tools/ directory (eg, gnustep-base.dll).
|
|
|
|
# Please note that while this is the main file you need to use the
|
|
|
|
# library at runtime, on Windows we treat this as a side-effect of
|
|
|
|
# the compilation; the compilation target for make is
|
|
|
|
# LIB_LINK_VERSION_FILE, which is the import library.
|
|
|
|
|
2002-10-30 13:20:26 +00:00
|
|
|
# AFTER_INSTALL_SHARED_LIB_CMD provides commands to be executed after
|
|
|
|
# installation (at least for libraries, not for frameworks at the
|
|
|
|
# moment), and is supposed to setup symlinks properly in the
|
|
|
|
# installation directory. It uses the same variables, except for
|
|
|
|
# LIB_LINK_INSTALL_DIR which is the full final path to where the
|
|
|
|
# library (and symlinks) is going to be installed.
|
|
|
|
#
|
|
|
|
# AFTER_INSTALL_STATIC_LIB_CMD is similar.
|
|
|
|
#
|
|
|
|
|
2004-06-19 11:55:45 +00:00
|
|
|
# For frameworks on unusual platforms, you might also need to set
|
|
|
|
# EXTRACT_CLASS_NAMES_COMMAND. This should be a command which is
|
|
|
|
# evaluated on $(object_file) and returns a list of classes
|
|
|
|
# implemented in the object_file. Our default command is the
|
|
|
|
# following (you can override it with another one in your target's
|
|
|
|
# section if you need), which runs 'nm' on the object file, and
|
|
|
|
# retrieve all symbols of the form __objc_class_name_NSObject which
|
|
|
|
# are not 'U' (undefined) ... an __objc_class_name_NSObject is defined
|
|
|
|
# in the module implementing the class, and referenced by all other
|
|
|
|
# modules needing to use the class. So if we have an
|
|
|
|
# __objc_class_name_XXX which is not 'U' (which would be a reference
|
|
|
|
# to a class implemented elsewhere), it must be a class implemented in
|
|
|
|
# this module.
|
|
|
|
#
|
|
|
|
# The 'sed' command parses a set of lines, and extracts lines starting
|
|
|
|
# with __objc_class_name_XXXX Y, where XXXX is a string of characters
|
2010-07-26 14:02:29 +00:00
|
|
|
# from A-Za-z0-9_. and Y is not 'U'. It then replaces the whole line
|
2004-06-19 11:55:45 +00:00
|
|
|
# with XXXX, and prints the result. '-n' disables automatic printing
|
|
|
|
# for portability, so we are sure we only print what we want on all
|
|
|
|
# platforms.
|
2015-06-09 08:39:35 +00:00
|
|
|
EXTRACT_CLASS_NAMES_COMMAND = $(NM) -Pg $$object_file | sed -n -e '/^__objc_class_name_[A-Za-z0-9_.]* [^U]/ {s/^__objc_class_name_\([A-Za-z0-9_.]*\) [^U].*/\1/p;}'
|
2004-06-19 11:55:45 +00:00
|
|
|
|
2002-10-30 13:20:26 +00:00
|
|
|
#
|
|
|
|
# This is the generic version - if the target is not in the following list,
|
|
|
|
# this setup will be used. It the target does not override variables here
|
|
|
|
# with its own version, these generic definitions will be used.
|
|
|
|
#
|
1997-09-23 01:27:32 +00:00
|
|
|
HAVE_SHARED_LIBS = no
|
1997-09-26 01:16:38 +00:00
|
|
|
STATIC_LIB_LINK_CMD = \
|
2002-10-30 13:20:26 +00:00
|
|
|
$(AR) $(ARFLAGS) $(AROUT)$(LIB_LINK_OBJ_DIR)/$(LIB_LINK_VERSION_FILE) $^;\
|
|
|
|
$(RANLIB) $(LIB_LINK_OBJ_DIR)/$(LIB_LINK_VERSION_FILE)
|
2002-10-30 12:42:22 +00:00
|
|
|
AFTER_INSTALL_STATIC_LIB_CMD = \
|
2002-10-30 13:20:26 +00:00
|
|
|
(cd $(LIB_LINK_INSTALL_DIR); \
|
|
|
|
$(RANLIB) $(LIB_LINK_VERSION_FILE))
|
1997-09-23 01:27:32 +00:00
|
|
|
SHARED_LIB_LINK_CMD =
|
2011-10-15 15:40:01 +00:00
|
|
|
SHARED_CFLAGS = -pthread
|
1999-03-22 04:38:14 +00:00
|
|
|
SHARED_LIBEXT =
|
2002-10-30 12:42:22 +00:00
|
|
|
AFTER_INSTALL_SHARED_LIB_CMD = \
|
2002-10-30 13:20:26 +00:00
|
|
|
(cd $(LIB_LINK_INSTALL_DIR); \
|
2004-11-04 08:45:18 +00:00
|
|
|
$(RM_LN_S) $(LIB_LINK_FILE); \
|
2002-10-30 13:20:26 +00:00
|
|
|
$(LN_S) $(LIB_LINK_VERSION_FILE) $(LIB_LINK_FILE))
|
2001-12-12 18:06:08 +00:00
|
|
|
AFTER_INSTALL_SHARED_LIB_CHOWN = \
|
2002-10-30 13:20:26 +00:00
|
|
|
(cd $(LIB_LINK_INSTALL_DIR); \
|
|
|
|
chown $(CHOWN_TO) $(LIB_LINK_FILE))
|
1997-09-30 21:54:33 +00:00
|
|
|
HAVE_BUNDLES = no
|
2005-09-18 20:05:09 +00:00
|
|
|
BUNDLE_LINK_CMD = $(BUNDLE_LD) $(BUNDLE_LDFLAGS) $(ALL_LDFLAGS) \
|
|
|
|
-o $(LDOUT)$(BUNDLE_FILE) $(OBJ_FILES_TO_LINK) \
|
2008-02-19 10:49:20 +00:00
|
|
|
$(ALL_LIB_DIRS) $(BUNDLE_LIBS)
|
1997-09-26 01:16:38 +00:00
|
|
|
|
1998-01-11 21:59:31 +00:00
|
|
|
####################################################
|
|
|
|
#
|
|
|
|
# Start of system specific settings
|
|
|
|
#
|
|
|
|
####################################################
|
1997-09-23 01:27:32 +00:00
|
|
|
|
2011-10-15 15:40:01 +00:00
|
|
|
|
2000-06-13 15:14:23 +00:00
|
|
|
####################################################
|
|
|
|
#
|
|
|
|
# MacOSX-Server 1.0
|
|
|
|
#
|
|
|
|
ifeq ($(findstring rhapsody5, $(GNUSTEP_TARGET_OS)), rhapsody5)
|
2002-12-30 16:32:28 +00:00
|
|
|
ifeq ($(OBJC_RUNTIME_LIB), apple)
|
2000-06-13 15:14:23 +00:00
|
|
|
HAVE_BUNDLES = yes
|
|
|
|
endif
|
|
|
|
|
|
|
|
HAVE_SHARED_LIBS = yes
|
|
|
|
SHARED_LIBEXT = .dylib
|
|
|
|
|
2002-12-30 16:32:28 +00:00
|
|
|
ifeq ($(FOUNDATION_LIB), apple)
|
2000-06-13 15:14:23 +00:00
|
|
|
# Use the NeXT compiler
|
|
|
|
CC = cc
|
|
|
|
OBJC_COMPILER = NeXT
|
|
|
|
ifneq ($(arch),)
|
|
|
|
ARCH_FLAGS = $(foreach a, $(arch), -arch $(a))
|
|
|
|
INTERNAL_OBJCFLAGS += $(ARCH_FLAGS)
|
|
|
|
INTERNAL_CFLAGS += $(ARCH_FLAGS)
|
|
|
|
INTERNAL_LDFLAGS += $(ARCH_FLAGS)
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq ($(OBJC_COMPILER), NeXT)
|
|
|
|
SHARED_LIB_LINK_CMD = \
|
2009-03-24 23:08:59 +00:00
|
|
|
$(LD) $(SHARED_LD_PREFLAGS) \
|
2000-06-13 15:14:23 +00:00
|
|
|
-dynamiclib $(ARCH_FLAGS) -dynamic \
|
|
|
|
-compatibility_version 1 -current_version 1 \
|
2007-02-14 04:00:19 +00:00
|
|
|
-install_name $(GNUSTEP_LIBRARIES)/$(GNUSTEP_TARGET_LDIR)/$(LIB_LINK_FILE) \
|
2003-11-08 21:54:42 +00:00
|
|
|
$(ALL_LDFLAGS) -o $@ \
|
2000-06-13 15:14:23 +00:00
|
|
|
-framework Foundation \
|
|
|
|
-framework System \
|
2002-01-29 13:44:43 +00:00
|
|
|
$(INTERNAL_LIBRARIES_DEPEND_UPON) $(LIBRARIES_FOUNDATION_DEPEND_UPON) \
|
2006-10-02 16:57:29 +00:00
|
|
|
-lobjc -lgcc $^ $(SHARED_LD_POSTFLAGS) \
|
|
|
|
&& (cd $(LIB_LINK_OBJ_DIR); $(RM_LN_S) $(LIB_LINK_FILE); \
|
2002-10-30 13:20:26 +00:00
|
|
|
$(LN_S) $(LIB_LINK_VERSION_FILE) $(LIB_LINK_FILE))
|
2000-06-13 15:14:23 +00:00
|
|
|
else # OBJC_COMPILER=NeXT
|
|
|
|
SHARED_LIB_LINK_CMD = \
|
2009-03-24 23:08:59 +00:00
|
|
|
$(LD) $(SHARED_LD_PREFLAGS) \
|
2000-06-13 15:14:23 +00:00
|
|
|
-dynamiclib $(ARCH_FLAGS) -dynamic \
|
|
|
|
-compatibility_version 1 -current_version 1 \
|
|
|
|
-read_only_relocs warning -undefined warning \
|
2007-02-14 04:00:19 +00:00
|
|
|
-install_name $(GNUSTEP_LIBRARIES)/$(GNUSTEP_TARGET_LDIR)/$(LIB_LINK_FILE) \
|
2003-11-08 21:54:42 +00:00
|
|
|
$(ALL_LDFLAGS) -o $@ \
|
2002-01-29 13:44:43 +00:00
|
|
|
$(INTERNAL_LIBRARIES_DEPEND_UPON) $(LIBRARIES_FOUNDATION_DEPEND_UPON) \
|
2000-06-13 15:14:23 +00:00
|
|
|
-framework Foundation \
|
2006-10-02 16:57:29 +00:00
|
|
|
$^ $(SHARED_LD_POSTFLAGS) \
|
|
|
|
&& (cd $(LIB_LINK_OBJ_DIR); $(RM_LN_S) $(LIB_LINK_FILE); \
|
2002-10-30 13:20:26 +00:00
|
|
|
$(LN_S) $(LIB_LINK_VERSION_FILE) $(LIB_LINK_FILE))
|
2000-06-13 15:14:23 +00:00
|
|
|
endif # OBJC_COMPILER
|
|
|
|
|
|
|
|
OBJ_MERGE_CMD = \
|
2011-04-11 20:23:50 +00:00
|
|
|
$(LD) -nostdlib $(OBJ_MERGE_CMD_FLAG) -d $(ALL_LDFLAGS) -o $(GNUSTEP_OBJ_DIR)/$(SUBPROJECT_PRODUCT) $^ ;
|
2000-06-13 15:14:23 +00:00
|
|
|
|
|
|
|
STATIC_LIB_LINK_CMD = \
|
2003-11-08 21:54:42 +00:00
|
|
|
/usr/bin/libtool $(STATIC_LD_PREFLAGS) -static $(ARCH_FLAGS) $(ALL_LDFLAGS) -o $@ $^ \
|
2000-06-13 15:14:23 +00:00
|
|
|
$(STATIC_LD_POSTFLAGS)
|
|
|
|
|
|
|
|
# This doesn't work with 4.1, what about others?
|
|
|
|
#ADDITIONAL_LDFLAGS += -Wl,-read_only_relocs,suppress
|
|
|
|
|
2002-10-30 12:42:22 +00:00
|
|
|
AFTER_INSTALL_STATIC_LIB_CMD =
|
2000-06-13 15:14:23 +00:00
|
|
|
|
|
|
|
SHARED_CFLAGS += -dynamic
|
|
|
|
SHARED_LIBEXT = .dylib
|
|
|
|
|
2009-03-24 23:08:59 +00:00
|
|
|
BUNDLE_LD = $(LD)
|
2000-06-13 15:14:23 +00:00
|
|
|
BUNDLE_LDFLAGS += -bundle -undefined suppress $(ARCH_FLAGS)
|
|
|
|
endif
|
|
|
|
#
|
|
|
|
# end MacOSX-Server 1.0
|
|
|
|
#
|
|
|
|
####################################################
|
|
|
|
|
2001-04-10 03:19:42 +00:00
|
|
|
####################################################
|
|
|
|
#
|
2005-12-06 10:54:03 +00:00
|
|
|
# MacOSX, darwin
|
2001-04-10 03:19:42 +00:00
|
|
|
#
|
2002-12-10 16:48:02 +00:00
|
|
|
ifeq ($(findstring darwin, $(GNUSTEP_TARGET_OS)), darwin)
|
2002-12-30 16:32:28 +00:00
|
|
|
ifeq ($(OBJC_RUNTIME_LIB), apple)
|
2001-12-26 23:13:25 +00:00
|
|
|
HAVE_BUNDLES = yes
|
2002-11-30 04:41:09 +00:00
|
|
|
# Set flags to ignore the MacOSX headers
|
2002-12-30 16:32:28 +00:00
|
|
|
ifneq ($(FOUNDATION_LIB), apple)
|
2002-11-30 04:41:09 +00:00
|
|
|
INTERNAL_OBJCFLAGS += -no-cpp-precomp -nostdinc -I/usr/include
|
|
|
|
endif
|
2001-04-10 03:19:42 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
HAVE_SHARED_LIBS = yes
|
|
|
|
SHARED_LIBEXT = .dylib
|
|
|
|
|
2004-06-19 11:55:45 +00:00
|
|
|
# The output of nm is slightly different on Darwin, it doesn't support -P
|
2015-06-09 08:39:35 +00:00
|
|
|
EXTRACT_CLASS_NAMES_COMMAND = $(NM) -g $$object_file | sed -n -e '/[^U] ___objc_class_name_/ {s/[0-9a-f]* [^U] ___objc_class_name_//p;}'
|
2004-06-19 11:55:45 +00:00
|
|
|
|
2004-01-15 17:20:20 +00:00
|
|
|
ifeq ($(FOUNDATION_LIB), apple)
|
2001-04-10 03:19:42 +00:00
|
|
|
ifneq ($(arch),)
|
|
|
|
ARCH_FLAGS = $(foreach a, $(arch), -arch $(a))
|
|
|
|
INTERNAL_OBJCFLAGS += $(ARCH_FLAGS)
|
|
|
|
INTERNAL_CFLAGS += $(ARCH_FLAGS)
|
|
|
|
INTERNAL_LDFLAGS += $(ARCH_FLAGS)
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2002-12-31 04:16:16 +00:00
|
|
|
# The developer should set this explicitly
|
|
|
|
#DYLIB_COMPATIBILITY_VERSION = -compatibility_version $(VERSION)
|
|
|
|
DYLIB_CURRENT_VERSION = -current_version $(VERSION)
|
2001-04-10 03:19:42 +00:00
|
|
|
|
2002-11-30 04:41:09 +00:00
|
|
|
# Remove empty dirs from the compiler/linker flags (ie, remove -Idir and
|
|
|
|
# -Ldir flags where dir is empty).
|
|
|
|
REMOVE_EMPTY_DIRS = yes
|
|
|
|
|
2002-12-30 16:32:28 +00:00
|
|
|
ifeq ($(FOUNDATION_LIB), apple)
|
2001-04-10 03:19:42 +00:00
|
|
|
DYLIB_DEF_FRAMEWORKS += -framework Foundation
|
|
|
|
endif
|
|
|
|
|
2011-11-21 09:12:32 +00:00
|
|
|
DYLIB_EXTRA_FLAGS += -undefined dynamic_lookup
|
|
|
|
# Useful optimization flag: -Wl,-single_module. This flag only
|
|
|
|
# works starting with 10.3 and is the default since 10.5.
|
|
|
|
ifeq ($(findstring darwin7, $(GNUSTEP_TARGET_OS)), darwin7)
|
|
|
|
DYLIB_EXTRA_FLAGS += -Wl,-single_module
|
|
|
|
endif
|
|
|
|
ifeq ($(findstring darwin8, $(GNUSTEP_TARGET_OS)), darwin8)
|
|
|
|
DYLIB_EXTRA_FLAGS += -Wl,-single_module
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
2007-02-16 16:40:13 +00:00
|
|
|
ifeq ($(OBJC_RUNTIME_LIB), gnu)
|
2011-04-12 09:32:40 +00:00
|
|
|
# GNU runtime
|
2004-12-10 10:47:59 +00:00
|
|
|
|
2011-04-30 07:43:56 +00:00
|
|
|
# Make sure that the compiler includes the right Objective-C runtime headers
|
|
|
|
# when compiling plain C source files. When compiling Objective-C source files
|
|
|
|
# the necessary directory is implicitly added by the -fgnu-runtime option, but
|
|
|
|
# this option is ignored when compiling plain C files.
|
|
|
|
ifneq ($(strip $(CC_GNURUNTIME)),)
|
|
|
|
INTERNAL_CFLAGS += -isystem $(CC_GNURUNTIME)
|
|
|
|
endif
|
2011-04-12 16:51:34 +00:00
|
|
|
|
2005-09-22 22:07:57 +00:00
|
|
|
SHARED_LD_PREFLAGS += -Wl,-noall_load -read_only_relocs warning $(CC_LDFLAGS)
|
2005-12-06 10:54:03 +00:00
|
|
|
ifeq ($(findstring darwin8, $(GNUSTEP_TARGET_OS)), darwin8)
|
|
|
|
BUNDLE_LIBS += -lSystemStubs
|
|
|
|
endif
|
2001-04-10 03:19:42 +00:00
|
|
|
SHARED_LIB_LINK_CMD = \
|
2009-03-24 23:08:59 +00:00
|
|
|
$(LD) \
|
2002-11-30 04:41:09 +00:00
|
|
|
$(SHARED_LD_PREFLAGS) \
|
2005-04-20 03:01:09 +00:00
|
|
|
$(ARCH_FLAGS) -dynamic -dynamiclib \
|
2001-04-10 03:19:42 +00:00
|
|
|
$(DYLIB_COMPATIBILITY_VERSION) \
|
|
|
|
$(DYLIB_CURRENT_VERSION) \
|
2002-12-25 02:00:42 +00:00
|
|
|
-install_name $(LIB_LINK_INSTALL_NAME) \
|
2011-11-21 09:12:32 +00:00
|
|
|
$(DYLIB_EXTRA_FLAGS) \
|
2003-11-08 21:54:42 +00:00
|
|
|
$(ALL_LDFLAGS) -o $@ \
|
2001-04-10 03:19:42 +00:00
|
|
|
$(DYLIB_DEF_FRAMEWORKS) \
|
2003-02-14 19:47:12 +00:00
|
|
|
$^ $(INTERNAL_LIBRARIES_DEPEND_UPON) $(LIBRARIES_FOUNDATION_DEPEND_UPON) \
|
2006-10-02 16:57:29 +00:00
|
|
|
$(SHARED_LD_POSTFLAGS) \
|
|
|
|
&& (cd $(LIB_LINK_OBJ_DIR); \
|
2004-11-04 08:45:18 +00:00
|
|
|
$(RM_LN_S) $(LIB_LINK_FILE); \
|
2004-01-12 12:40:00 +00:00
|
|
|
if [ "$(LIB_LINK_SONAME_FILE)" != "$(LIB_LINK_VERSION_FILE)" ]; then\
|
2004-11-04 08:45:18 +00:00
|
|
|
$(RM_LN_S) $(LIB_LINK_SONAME_FILE);\
|
2004-01-12 12:40:00 +00:00
|
|
|
$(LN_S) $(LIB_LINK_VERSION_FILE) $(LIB_LINK_SONAME_FILE); \
|
|
|
|
fi; \
|
2002-10-30 13:20:26 +00:00
|
|
|
$(LN_S) $(LIB_LINK_VERSION_FILE) $(LIB_LINK_FILE))
|
2001-04-10 03:19:42 +00:00
|
|
|
|
2009-03-24 23:08:59 +00:00
|
|
|
BUNDLE_LD = $(LD)
|
2007-02-16 16:40:13 +00:00
|
|
|
BUNDLE_LDFLAGS += -fgnu-runtime -bundle
|
2011-11-21 09:12:32 +00:00
|
|
|
BUNDLE_LDFLAGS += -undefined dynamic_lookup
|
2001-04-10 03:19:42 +00:00
|
|
|
|
2002-11-30 04:41:09 +00:00
|
|
|
else
|
2011-04-12 09:32:40 +00:00
|
|
|
# Apple runtime
|
2002-11-30 04:41:09 +00:00
|
|
|
|
2001-04-10 03:19:42 +00:00
|
|
|
SHARED_LIB_LINK_CMD = \
|
2009-03-24 23:08:59 +00:00
|
|
|
$(LD) $(SHARED_LD_PREFLAGS) \
|
2004-09-07 10:53:51 +00:00
|
|
|
-dynamiclib $(ARCH_FLAGS) \
|
2001-04-10 03:19:42 +00:00
|
|
|
$(DYLIB_COMPATIBILITY_VERSION) \
|
|
|
|
$(DYLIB_CURRENT_VERSION) \
|
2002-12-25 02:00:42 +00:00
|
|
|
-install_name $(LIB_LINK_INSTALL_NAME) \
|
2001-04-10 03:19:42 +00:00
|
|
|
$(DYLIB_EXTRA_FLAGS) \
|
2003-11-08 21:54:42 +00:00
|
|
|
$(ALL_LDFLAGS) -o $@ \
|
2002-01-29 13:44:43 +00:00
|
|
|
$(INTERNAL_LIBRARIES_DEPEND_UPON) $(LIBRARIES_FOUNDATION_DEPEND_UPON) \
|
2006-10-02 16:57:29 +00:00
|
|
|
$^ $(SHARED_LD_POSTFLAGS) \
|
|
|
|
&& (cd $(LIB_LINK_OBJ_DIR); \
|
2004-11-04 08:45:18 +00:00
|
|
|
$(RM_LN_S) $(LIB_LINK_FILE); \
|
2004-01-12 12:40:00 +00:00
|
|
|
if [ "$(LIB_LINK_SONAME_FILE)" != "$(LIB_LINK_VERSION_FILE)" ]; then\
|
2004-11-04 08:45:18 +00:00
|
|
|
$(RM_LN_S) $(LIB_LINK_SONAME_FILE);\
|
2004-01-12 12:40:00 +00:00
|
|
|
$(LN_S) $(LIB_LINK_VERSION_FILE) $(LIB_LINK_SONAME_FILE); \
|
|
|
|
fi; \
|
2002-10-30 13:20:26 +00:00
|
|
|
$(LN_S) $(LIB_LINK_VERSION_FILE) $(LIB_LINK_FILE))
|
2002-11-30 04:41:09 +00:00
|
|
|
|
|
|
|
SHARED_CFLAGS += -dynamic
|
|
|
|
|
2009-03-24 23:08:59 +00:00
|
|
|
BUNDLE_LD = $(LD)
|
2002-11-30 04:41:09 +00:00
|
|
|
BUNDLE_LDFLAGS += -bundle -undefined error $(ARCH_FLAGS)
|
|
|
|
|
2004-01-15 17:20:20 +00:00
|
|
|
endif # CC_TYPE
|
2001-04-10 03:19:42 +00:00
|
|
|
|
2002-12-31 04:16:16 +00:00
|
|
|
AFTER_INSTALL_SHARED_LIB_CMD = \
|
|
|
|
(cd $(LIB_LINK_INSTALL_DIR); \
|
2004-11-04 08:45:18 +00:00
|
|
|
$(RM_LN_S) $(LIB_LINK_FILE); \
|
2004-01-12 12:40:00 +00:00
|
|
|
if [ "$(LIB_LINK_SONAME_FILE)" != "$(LIB_LINK_VERSION_FILE)" ]; then\
|
2004-11-04 08:45:18 +00:00
|
|
|
$(RM_LN_S) $(LIB_LINK_SONAME_FILE);\
|
2004-01-12 12:40:00 +00:00
|
|
|
$(LN_S) $(LIB_LINK_VERSION_FILE) $(LIB_LINK_SONAME_FILE); \
|
|
|
|
fi; \
|
2003-06-04 03:11:31 +00:00
|
|
|
$(LN_S) $(LIB_LINK_VERSION_FILE) $(LIB_LINK_FILE) )
|
2002-12-31 04:16:16 +00:00
|
|
|
|
2001-04-10 03:19:42 +00:00
|
|
|
OBJ_MERGE_CMD = \
|
2013-12-07 17:37:58 +00:00
|
|
|
$(LD) -nostdlib -keep_private_externs $(OBJ_MERGE_CMD_FLAG) $(ALL_LDFLAGS) -o $(GNUSTEP_OBJ_DIR)/$(SUBPROJECT_PRODUCT) $^ ;
|
2001-04-10 03:19:42 +00:00
|
|
|
|
|
|
|
STATIC_LIB_LINK_CMD = \
|
2003-11-08 21:54:42 +00:00
|
|
|
/usr/bin/libtool $(STATIC_LD_PREFLAGS) -static $(ARCH_FLAGS) $(ALL_LDFLAGS) -o $@ $^ \
|
2001-04-10 03:19:42 +00:00
|
|
|
$(STATIC_LD_POSTFLAGS)
|
|
|
|
|
2002-11-30 04:41:09 +00:00
|
|
|
AFTER_INSTALL_STATIC_LIB_CMD = \
|
|
|
|
(cd $(LIB_LINK_INSTALL_DIR); \
|
|
|
|
$(RANLIB) $(LIB_LINK_VERSION_FILE))
|
2001-04-10 03:19:42 +00:00
|
|
|
|
2002-11-30 04:41:09 +00:00
|
|
|
SHARED_CFLAGS += -fno-common
|
2001-04-10 03:19:42 +00:00
|
|
|
|
|
|
|
endif
|
|
|
|
#
|
2005-12-06 10:54:03 +00:00
|
|
|
# end MacOSX, darwin
|
2001-04-10 03:19:42 +00:00
|
|
|
#
|
|
|
|
####################################################
|
2001-12-03 11:49:42 +00:00
|
|
|
|
1998-01-11 21:59:31 +00:00
|
|
|
####################################################
|
1997-09-23 01:27:32 +00:00
|
|
|
#
|
|
|
|
# OpenStep 4.x
|
|
|
|
#
|
|
|
|
ifeq ($(GNUSTEP_TARGET_OS), nextstep4)
|
2002-12-30 16:32:28 +00:00
|
|
|
ifeq ($(OBJC_RUNTIME_LIB), nx)
|
|
|
|
HAVE_BUNDLES = yes
|
2002-03-01 04:09:23 +00:00
|
|
|
OBJC_COMPILER = NeXT
|
1997-10-25 03:53:00 +00:00
|
|
|
endif
|
|
|
|
|
2002-12-30 16:32:28 +00:00
|
|
|
HAVE_SHARED_LIBS = yes
|
1997-10-07 23:27:51 +00:00
|
|
|
|
2002-12-30 16:32:28 +00:00
|
|
|
ifeq ($(FOUNDATION_LIB), nx)
|
1997-10-28 02:34:11 +00:00
|
|
|
# Use the NeXT compiler
|
|
|
|
CC = cc
|
|
|
|
ifneq ($(arch),)
|
|
|
|
ARCH_FLAGS = $(foreach a, $(arch), -arch $(a))
|
|
|
|
INTERNAL_OBJCFLAGS += $(ARCH_FLAGS)
|
|
|
|
INTERNAL_CFLAGS += $(ARCH_FLAGS)
|
|
|
|
INTERNAL_LDFLAGS += $(ARCH_FLAGS)
|
|
|
|
endif
|
1997-10-14 22:54:35 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq ($(OBJC_COMPILER), NeXT)
|
1997-09-23 01:27:32 +00:00
|
|
|
SHARED_LIB_LINK_CMD = \
|
2000-06-13 15:14:23 +00:00
|
|
|
/bin/libtool $(SHARED_LD_PREFLAGS) \
|
|
|
|
-dynamic -read_only_relocs suppress $(ARCH_FLAGS) \
|
2007-02-14 04:00:19 +00:00
|
|
|
-install_name $(GNUSTEP_LIBRARIES)/$(GNUSTEP_TARGET_LDIR)/$(LIB_LINK_FILE) \
|
2003-11-08 21:54:42 +00:00
|
|
|
$(ALL_LDFLAGS) -o $@ \
|
1998-01-11 21:59:31 +00:00
|
|
|
-framework System \
|
2002-01-29 13:44:43 +00:00
|
|
|
$(INTERNAL_LIBRARIES_DEPEND_UPON) $(LIBRARIES_FOUNDATION_DEPEND_UPON) \
|
2006-10-02 16:57:29 +00:00
|
|
|
-lobjc -lgcc $^ $(SHARED_LD_POSTFLAGS) \
|
|
|
|
&& (cd $(LIB_LINK_OBJ_DIR); $(RM_LN_S) $(LIB_LINK_FILE); \
|
2002-10-30 13:20:26 +00:00
|
|
|
$(LN_S) $(LIB_LINK_VERSION_FILE) $(LIB_LINK_FILE))
|
1998-01-11 21:59:31 +00:00
|
|
|
else
|
|
|
|
SHARED_LIB_LINK_CMD = \
|
2000-06-13 15:14:23 +00:00
|
|
|
/bin/libtool $(SHARED_LD_PREFLAGS) \
|
|
|
|
-dynamic -read_only_relocs suppress $(ARCH_FLAGS) \
|
2007-02-14 04:00:19 +00:00
|
|
|
-install_name $(GNUSTEP_LIBRARIES)/$(GNUSTEP_TARGET_LDIR)/$(LIB_LINK_FILE) \
|
2003-11-08 21:54:42 +00:00
|
|
|
$(ALL_LDFLAGS) $@ \
|
1998-01-11 21:59:31 +00:00
|
|
|
-framework System \
|
2002-01-29 13:44:43 +00:00
|
|
|
$(INTERNAL_LIBRARIES_DEPEND_UPON) \
|
2000-06-13 15:14:23 +00:00
|
|
|
$(LIBRARIES_FOUNDATION_DEPEND_UPON) $^ \
|
2006-10-02 16:57:29 +00:00
|
|
|
$(SHARED_LD_POSTFLAGS) \
|
|
|
|
&& (cd $(LIB_LINK_OBJ_DIR); $(RM_LN_S) $(LIB_LINK_FILE); \
|
2002-10-30 13:20:26 +00:00
|
|
|
$(LN_S) $(LIB_LINK_VERSION_FILE) $(LIB_LINK_FILE))
|
1998-01-11 21:59:31 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
STATIC_LIB_LINK_CMD = \
|
2003-11-08 21:54:42 +00:00
|
|
|
/bin/libtool $(STATIC_LD_PREFLAGS) -static $(ARCH_FLAGS) $(ALL_LDFLAGS) -o $@ $^ \
|
2000-06-13 15:14:23 +00:00
|
|
|
$(STATIC_LD_POSTFLAGS)
|
1998-01-11 21:59:31 +00:00
|
|
|
|
1998-05-13 20:56:38 +00:00
|
|
|
# This doesn't work with 4.1, what about others?
|
|
|
|
#ADDITIONAL_LDFLAGS += -Wl,-read_only_relocs,suppress
|
1998-01-11 21:59:31 +00:00
|
|
|
|
2002-10-30 12:42:22 +00:00
|
|
|
AFTER_INSTALL_STATIC_LIB_CMD =
|
1998-01-11 21:59:31 +00:00
|
|
|
|
|
|
|
SHARED_CFLAGS += -dynamic
|
|
|
|
SHARED_LIBEXT = .a
|
|
|
|
|
2010-08-14 00:06:33 +00:00
|
|
|
# TODO: this should this be BUNDLE_LD = $(LD), and BUNDLE_LDFLAGS should use -Wl,-r instead of -r.
|
|
|
|
# Unfortunately I can't test this change. Can anyone confirm that all still works with this change ?
|
1998-01-11 21:59:31 +00:00
|
|
|
BUNDLE_LD = ld
|
|
|
|
BUNDLE_LDFLAGS += -r $(ARCH_FLAGS)
|
|
|
|
endif
|
|
|
|
#
|
|
|
|
# end OpenStep 4.x
|
|
|
|
#
|
|
|
|
####################################################
|
|
|
|
|
|
|
|
####################################################
|
|
|
|
#
|
|
|
|
# NEXTSTEP 3.x
|
|
|
|
#
|
|
|
|
ifeq ($(GNUSTEP_TARGET_OS), nextstep3)
|
2002-12-30 16:32:28 +00:00
|
|
|
ifeq ($(OBJC_RUNTIME_LIB), nx)
|
2002-03-01 04:09:23 +00:00
|
|
|
HAVE_BUNDLES = yes
|
|
|
|
OBJC_COMPILER = NeXT
|
1998-01-11 21:59:31 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
HAVE_SHARED_LIBS = yes
|
|
|
|
|
2002-12-30 16:32:28 +00:00
|
|
|
ifeq ($(FOUNDATION_LIB), nx)
|
1998-01-11 21:59:31 +00:00
|
|
|
# Use the NeXT compiler
|
|
|
|
CC = cc
|
|
|
|
ifneq ($(arch),)
|
|
|
|
ARCH_FLAGS = $(foreach a, $(arch), -arch $(a))
|
|
|
|
INTERNAL_OBJCFLAGS += $(ARCH_FLAGS)
|
|
|
|
INTERNAL_CFLAGS += $(ARCH_FLAGS)
|
|
|
|
INTERNAL_LDFLAGS += $(ARCH_FLAGS)
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq ($(OBJC_COMPILER), NeXT)
|
|
|
|
SHARED_LIB_LINK_CMD = \
|
2001-04-21 20:32:47 +00:00
|
|
|
/bin/libtool $(SHARED_LD_PREFLAGS) -dynamic -read_only_relocs suppress \
|
2003-11-08 21:54:42 +00:00
|
|
|
$(ARCH_FLAGS) $(ALL_LDFLAGS) -o $@ -framework System \
|
2002-01-29 13:44:43 +00:00
|
|
|
$(INTERNAL_LIBRARIES_DEPEND_UPON) -lobjc -lgcc -undefined warning $^ \
|
2006-10-02 16:57:29 +00:00
|
|
|
$(SHARED_LD_POSTFLAGS) \
|
|
|
|
&& (cd $(LIB_LINK_OBJ_DIR); $(RM_LN_S) $(LIB_LINK_FILE); \
|
2002-10-30 13:20:26 +00:00
|
|
|
$(LN_S) $(LIB_LINK_VERSION_FILE) $(LIB_LINK_FILE))
|
1997-10-14 22:54:35 +00:00
|
|
|
else
|
|
|
|
SHARED_LIB_LINK_CMD = \
|
2000-06-13 15:14:23 +00:00
|
|
|
/bin/libtool $(SHARED_LD_PREFLAGS) \
|
2003-11-08 21:54:42 +00:00
|
|
|
-dynamic -read_only_relocs suppress $(ARCH_FLAGS) $(ALL_LDFLAGS) -o $@ \
|
1997-10-14 22:54:35 +00:00
|
|
|
-framework System \
|
2002-01-29 13:44:43 +00:00
|
|
|
$(INTERNAL_LIBRARIES_DEPEND_UPON) $^ \
|
2006-10-02 16:57:29 +00:00
|
|
|
$(SHARED_LD_POSTFLAGS) \
|
|
|
|
&& (cd $(LIB_LINK_OBJ_DIR); $(RM_LN_S) $(LIB_LINK_FILE); \
|
2002-10-30 13:20:26 +00:00
|
|
|
$(LN_S) $(LIB_LINK_VERSION_FILE) $(LIB_LINK_FILE))
|
1997-10-14 22:54:35 +00:00
|
|
|
endif
|
1997-10-07 23:27:51 +00:00
|
|
|
|
|
|
|
STATIC_LIB_LINK_CMD = \
|
2000-06-13 15:14:23 +00:00
|
|
|
/bin/libtool $(STATIC_LD_PREFLAGS) \
|
2003-11-08 21:54:42 +00:00
|
|
|
-static $(ARCH_FLAGS) $(ALL_LDFLAGS) -o $@ $^ $(STATIC_LD_POSTFLAGS)
|
1997-10-02 00:41:03 +00:00
|
|
|
|
1997-10-07 23:27:51 +00:00
|
|
|
ADDITIONAL_LDFLAGS += -Wl,-read_only_relocs,suppress
|
1997-09-26 01:16:38 +00:00
|
|
|
|
2002-10-30 12:42:22 +00:00
|
|
|
AFTER_INSTALL_STATIC_LIB_CMD =
|
1997-09-23 01:27:32 +00:00
|
|
|
|
1997-09-30 21:54:33 +00:00
|
|
|
SHARED_CFLAGS += -dynamic
|
1997-10-05 06:28:05 +00:00
|
|
|
SHARED_LIBEXT = .a
|
|
|
|
|
2010-08-14 00:06:33 +00:00
|
|
|
# TODO: this should this be BUNDLE_LD = $(LD), and BUNDLE_LDFLAGS should use -Wl,-r instead of -r.
|
|
|
|
# Unfortunately I can't test this change. Can anyone confirm that all still works with this change ?
|
1997-10-25 03:53:00 +00:00
|
|
|
BUNDLE_LD = ld
|
1997-10-28 02:34:11 +00:00
|
|
|
BUNDLE_LDFLAGS += -r $(ARCH_FLAGS)
|
1997-09-23 01:27:32 +00:00
|
|
|
endif
|
1998-01-11 21:59:31 +00:00
|
|
|
#
|
|
|
|
# end NEXTSTEP 3.x
|
|
|
|
#
|
|
|
|
####################################################
|
1997-09-23 01:27:32 +00:00
|
|
|
|
1998-01-11 21:59:31 +00:00
|
|
|
####################################################
|
1997-09-23 01:27:32 +00:00
|
|
|
#
|
2004-04-20 09:43:51 +00:00
|
|
|
# Linux ELF or GNU/Hurd
|
1997-09-23 01:27:32 +00:00
|
|
|
#
|
2004-04-20 09:43:51 +00:00
|
|
|
# The following ifeq matches both 'linux-gnu' (which is GNU/Linux ELF)
|
|
|
|
# and 'gnu0.3' (I've been told GNUSTEP_TARGET_OS is 'gnu0.3' on
|
|
|
|
# GNU/Hurd at the moment). We want the same code in both cases.
|
|
|
|
ifeq ($(findstring gnu, $(GNUSTEP_TARGET_OS)), gnu)
|
1997-09-23 01:27:32 +00:00
|
|
|
HAVE_SHARED_LIBS = yes
|
|
|
|
SHARED_LIB_LINK_CMD = \
|
2009-03-24 23:08:59 +00:00
|
|
|
$(LD) $(SHARED_LD_PREFLAGS) -shared -Wl,-soname,$(LIB_LINK_SONAME_FILE) \
|
2003-11-08 21:54:42 +00:00
|
|
|
$(ALL_LDFLAGS) -o $(LIB_LINK_OBJ_DIR)/$(LIB_LINK_VERSION_FILE) $^ \
|
2002-01-29 13:44:43 +00:00
|
|
|
$(INTERNAL_LIBRARIES_DEPEND_UPON) \
|
2006-10-02 16:57:29 +00:00
|
|
|
$(SHARED_LD_POSTFLAGS) \
|
|
|
|
&& (cd $(LIB_LINK_OBJ_DIR); \
|
2004-11-04 08:45:18 +00:00
|
|
|
$(RM_LN_S) $(LIB_LINK_FILE); \
|
2004-01-12 12:40:00 +00:00
|
|
|
if [ "$(LIB_LINK_SONAME_FILE)" != "$(LIB_LINK_VERSION_FILE)" ]; then\
|
2004-11-04 08:45:18 +00:00
|
|
|
$(RM_LN_S) $(LIB_LINK_SONAME_FILE);\
|
2004-01-12 12:40:00 +00:00
|
|
|
$(LN_S) $(LIB_LINK_VERSION_FILE) $(LIB_LINK_SONAME_FILE); \
|
|
|
|
fi; \
|
2002-10-30 13:20:26 +00:00
|
|
|
$(LN_S) $(LIB_LINK_SONAME_FILE) $(LIB_LINK_FILE); \
|
1998-12-16 18:32:08 +00:00
|
|
|
)
|
2002-10-30 12:42:22 +00:00
|
|
|
AFTER_INSTALL_SHARED_LIB_CMD = \
|
2002-10-30 13:20:26 +00:00
|
|
|
(cd $(LIB_LINK_INSTALL_DIR); \
|
2004-11-04 08:45:18 +00:00
|
|
|
$(RM_LN_S) $(LIB_LINK_FILE); \
|
2004-01-12 12:40:00 +00:00
|
|
|
if [ "$(LIB_LINK_SONAME_FILE)" != "$(LIB_LINK_VERSION_FILE)" ]; then\
|
2004-11-04 08:45:18 +00:00
|
|
|
$(RM_LN_S) $(LIB_LINK_SONAME_FILE);\
|
2004-01-12 12:40:00 +00:00
|
|
|
$(LN_S) $(LIB_LINK_VERSION_FILE) $(LIB_LINK_SONAME_FILE); \
|
|
|
|
fi; \
|
2002-10-30 13:20:26 +00:00
|
|
|
$(LN_S) $(LIB_LINK_SONAME_FILE) $(LIB_LINK_FILE); \
|
1998-12-15 19:20:50 +00:00
|
|
|
)
|
2001-12-12 18:06:08 +00:00
|
|
|
AFTER_INSTALL_SHARED_LIB_CHOWN = \
|
2002-10-30 13:20:26 +00:00
|
|
|
(cd $(LIB_LINK_INSTALL_DIR); \
|
|
|
|
chown $(CHOWN_TO) $(LIB_LINK_SONAME_FILE); \
|
|
|
|
chown $(CHOWN_TO) $(LIB_LINK_FILE))
|
2000-06-13 15:14:23 +00:00
|
|
|
|
1999-02-19 21:47:15 +00:00
|
|
|
OBJ_MERGE_CMD = \
|
2011-04-11 20:23:50 +00:00
|
|
|
$(LD) -nostdlib $(OBJ_MERGE_CMD_FLAG) $(ALL_LDFLAGS) -o $(GNUSTEP_OBJ_DIR)/$(SUBPROJECT_PRODUCT) $^ ;
|
1997-09-23 01:27:32 +00:00
|
|
|
|
2000-06-13 15:14:23 +00:00
|
|
|
SHARED_CFLAGS += -fPIC
|
|
|
|
SHARED_LIBEXT = .so
|
1997-09-30 21:54:33 +00:00
|
|
|
|
2000-06-13 15:14:23 +00:00
|
|
|
HAVE_BUNDLES = yes
|
2009-03-24 23:08:59 +00:00
|
|
|
BUNDLE_LD = $(LD)
|
2000-06-13 15:14:23 +00:00
|
|
|
BUNDLE_LDFLAGS += -shared
|
1998-10-21 19:19:49 +00:00
|
|
|
ADDITIONAL_LDFLAGS += -rdynamic
|
2002-09-12 13:59:04 +00:00
|
|
|
STATIC_LDFLAGS += -static
|
1997-09-23 01:27:32 +00:00
|
|
|
endif
|
1998-01-11 21:59:31 +00:00
|
|
|
#
|
|
|
|
# end Linux ELF
|
|
|
|
#
|
|
|
|
####################################################
|
1997-09-23 01:27:32 +00:00
|
|
|
|
1998-12-07 16:23:04 +00:00
|
|
|
####################################################
|
|
|
|
#
|
1999-09-09 02:56:20 +00:00
|
|
|
# FreeBSD a.out (2.2.x)
|
1998-12-07 16:23:04 +00:00
|
|
|
#
|
2001-04-14 08:48:24 +00:00
|
|
|
ifeq ($(findstring freebsdaout, $(GNUSTEP_TARGET_OS)), freebsdaout)
|
|
|
|
freebsdaout = yes
|
2001-04-13 21:51:45 +00:00
|
|
|
|
1999-09-09 02:56:20 +00:00
|
|
|
HAVE_SHARED_LIBS = no
|
1998-12-07 16:23:04 +00:00
|
|
|
SHARED_LIB_LINK_CMD = \
|
2009-03-24 23:08:59 +00:00
|
|
|
$(LD) -shared -Wl,-soname,$(LIB_LINK_VERSION_FILE) \
|
2006-10-02 16:57:29 +00:00
|
|
|
$(ALL_LDFLAGS) -o $(LIB_LINK_OBJ_DIR)/$(LIB_LINK_VERSION_FILE) $^ /usr/lib/c++rt0.o \
|
|
|
|
&& (cd $(LIB_LINK_OBJ_DIR); \
|
2004-11-04 08:45:18 +00:00
|
|
|
$(RM_LN_S) $(LIB_LINK_FILE); \
|
2002-10-30 13:20:26 +00:00
|
|
|
$(LN_S) $(LIB_LINK_VERSION_FILE) $(LIB_LINK_FILE))
|
1998-12-07 16:23:04 +00:00
|
|
|
|
|
|
|
SHARED_CFLAGS += -fPIC
|
|
|
|
SHARED_LIBEXT = .so
|
|
|
|
|
|
|
|
HAVE_BUNDLES = yes
|
2009-03-24 23:08:59 +00:00
|
|
|
BUNDLE_LD = $(LD)
|
1998-12-07 16:23:04 +00:00
|
|
|
BUNDLE_LDFLAGS += -shared
|
|
|
|
ADDITIONAL_LDFLAGS += -rdynamic
|
2002-09-12 13:59:04 +00:00
|
|
|
STATIC_LDFLAGS += -static
|
1998-12-07 16:23:04 +00:00
|
|
|
endif
|
|
|
|
#
|
1999-09-09 02:56:20 +00:00
|
|
|
# end FreeBSD A.out
|
1998-12-07 16:23:04 +00:00
|
|
|
#
|
|
|
|
####################################################
|
|
|
|
|
1999-02-06 19:24:23 +00:00
|
|
|
####################################################
|
|
|
|
#
|
1999-09-09 02:56:20 +00:00
|
|
|
# FreeBSD ELF
|
1999-02-06 19:24:23 +00:00
|
|
|
#
|
2001-04-13 21:51:45 +00:00
|
|
|
ifeq ($(findstring freebsd, $(GNUSTEP_TARGET_OS)), freebsd)
|
2001-04-14 08:48:24 +00:00
|
|
|
ifneq ($(freebsdaout), yes)
|
1999-09-09 02:56:20 +00:00
|
|
|
HAVE_SHARED_LIBS = yes
|
1999-02-06 19:24:23 +00:00
|
|
|
SHARED_LIB_LINK_CMD = \
|
2009-03-24 23:08:59 +00:00
|
|
|
$(LD) -shared -Wl,-soname,$(LIB_LINK_SONAME_FILE) \
|
2003-11-08 21:54:42 +00:00
|
|
|
$(ALL_LDFLAGS) -o $(LIB_LINK_OBJ_DIR)/$(LIB_LINK_VERSION_FILE) $^ \
|
2002-01-29 13:44:43 +00:00
|
|
|
$(INTERNAL_LIBRARIES_DEPEND_UPON) \
|
2006-10-02 16:57:29 +00:00
|
|
|
$(SHARED_LD_POSTFLAGS) \
|
|
|
|
&& (cd $(LIB_LINK_OBJ_DIR); \
|
2004-11-04 08:45:18 +00:00
|
|
|
$(RM_LN_S) $(LIB_LINK_FILE); \
|
2004-01-12 12:40:00 +00:00
|
|
|
if [ "$(LIB_LINK_SONAME_FILE)" != "$(LIB_LINK_VERSION_FILE)" ]; then\
|
2004-11-04 08:45:18 +00:00
|
|
|
$(RM_LN_S) $(LIB_LINK_SONAME_FILE);\
|
2004-01-12 12:40:00 +00:00
|
|
|
$(LN_S) $(LIB_LINK_VERSION_FILE) $(LIB_LINK_SONAME_FILE); \
|
|
|
|
fi; \
|
2002-10-30 13:20:26 +00:00
|
|
|
$(LN_S) $(LIB_LINK_SONAME_FILE) $(LIB_LINK_FILE))
|
2002-10-30 12:42:22 +00:00
|
|
|
AFTER_INSTALL_SHARED_LIB_CMD = \
|
2002-10-30 13:20:26 +00:00
|
|
|
(cd $(LIB_LINK_INSTALL_DIR); \
|
2004-11-04 08:45:18 +00:00
|
|
|
$(RM_LN_S) $(LIB_LINK_FILE); \
|
2004-01-12 12:40:00 +00:00
|
|
|
if [ "$(LIB_LINK_SONAME_FILE)" != "$(LIB_LINK_VERSION_FILE)" ]; then\
|
2004-11-04 08:45:18 +00:00
|
|
|
$(RM_LN_S) $(LIB_LINK_SONAME_FILE);\
|
2004-01-12 12:40:00 +00:00
|
|
|
$(LN_S) $(LIB_LINK_VERSION_FILE) $(LIB_LINK_SONAME_FILE); \
|
|
|
|
fi; \
|
2002-10-30 13:20:26 +00:00
|
|
|
$(LN_S) $(LIB_LINK_SONAME_FILE) $(LIB_LINK_FILE); \
|
2001-05-05 21:50:17 +00:00
|
|
|
)
|
2001-12-12 18:06:08 +00:00
|
|
|
AFTER_INSTALL_SHARED_LIB_CHOWN = \
|
2002-10-30 13:20:26 +00:00
|
|
|
(cd $(LIB_LINK_INSTALL_DIR); \
|
|
|
|
chown $(CHOWN_TO) $(LIB_LINK_SONAME_FILE); \
|
|
|
|
chown $(CHOWN_TO) $(LIB_LINK_FILE))
|
1999-09-09 02:56:20 +00:00
|
|
|
OBJ_MERGE_CMD = \
|
2011-04-11 20:23:50 +00:00
|
|
|
$(LD) -nostdlib $(OBJ_MERGE_CMD_FLAG) $(ALL_LDFLAGS) -o $(GNUSTEP_OBJ_DIR)/$(SUBPROJECT_PRODUCT) $^ ;
|
1999-02-06 19:24:23 +00:00
|
|
|
|
|
|
|
SHARED_CFLAGS += -fPIC
|
|
|
|
SHARED_LIBEXT = .so
|
|
|
|
|
|
|
|
HAVE_BUNDLES = yes
|
2009-03-24 23:08:59 +00:00
|
|
|
BUNDLE_LD = $(LD)
|
1999-02-06 19:24:23 +00:00
|
|
|
BUNDLE_LDFLAGS += -shared
|
|
|
|
ADDITIONAL_LDFLAGS += -rdynamic
|
2002-09-12 13:59:04 +00:00
|
|
|
STATIC_LDFLAGS += -static
|
2005-07-12 14:23:38 +00:00
|
|
|
|
1999-02-06 19:24:23 +00:00
|
|
|
endif
|
2001-04-13 21:51:45 +00:00
|
|
|
endif
|
1999-02-06 19:24:23 +00:00
|
|
|
#
|
1999-09-09 02:56:20 +00:00
|
|
|
# end FreeBSD
|
1999-02-06 19:24:23 +00:00
|
|
|
#
|
|
|
|
####################################################
|
|
|
|
|
1998-11-03 15:05:04 +00:00
|
|
|
####################################################
|
|
|
|
#
|
2005-10-17 20:31:39 +00:00
|
|
|
# NetBSD (ELF)
|
1998-11-03 15:05:04 +00:00
|
|
|
#
|
|
|
|
ifeq ($(findstring netbsd, $(GNUSTEP_TARGET_OS)), netbsd)
|
2002-08-09 10:03:06 +00:00
|
|
|
HAVE_SHARED_LIBS = yes
|
|
|
|
SHARED_LD_POSTFLAGS = -Wl,-R/usr/pkg/lib -L/usr/pkg/lib
|
2000-03-08 18:28:32 +00:00
|
|
|
SHARED_LIB_LINK_CMD = \
|
2009-03-24 23:08:59 +00:00
|
|
|
$(LD) -shared -Wl,-soname,$(LIB_LINK_VERSION_FILE) \
|
2003-11-08 21:54:42 +00:00
|
|
|
$(ALL_LDFLAGS) -o $(LIB_LINK_OBJ_DIR)/$(LIB_LINK_VERSION_FILE) \
|
2002-08-09 10:03:06 +00:00
|
|
|
$^ $(INTERNAL_LIBRARIES_DEPEND_UPON) \
|
2006-10-02 16:57:29 +00:00
|
|
|
$(SHARED_LD_POSTFLAGS) \
|
|
|
|
&& (cd $(LIB_LINK_OBJ_DIR); \
|
2004-11-04 08:45:18 +00:00
|
|
|
$(RM_LN_S) $(LIB_LINK_FILE); \
|
2002-10-30 13:20:26 +00:00
|
|
|
$(LN_S) $(LIB_LINK_VERSION_FILE) $(LIB_LINK_FILE))
|
2000-03-08 18:28:32 +00:00
|
|
|
OBJ_MERGE_CMD = \
|
2011-04-11 20:23:50 +00:00
|
|
|
$(LD) -nostdlib $(OBJ_MERGE_CMD_FLAG) $(ALL_LDFLAGS) -o $(GNUSTEP_OBJ_DIR)/$(SUBPROJECT_PRODUCT) $^ ;
|
2000-03-08 18:28:32 +00:00
|
|
|
|
|
|
|
SHARED_CFLAGS += -fPIC
|
|
|
|
SHARED_LIBEXT = .so
|
|
|
|
|
|
|
|
HAVE_BUNDLES = yes
|
2009-03-24 23:08:59 +00:00
|
|
|
BUNDLE_LD = $(LD)
|
2000-03-08 18:28:32 +00:00
|
|
|
BUNDLE_LDFLAGS += -shared
|
2003-07-06 02:36:44 +00:00
|
|
|
ADDITIONAL_LDFLAGS += -rdynamic -Wl,-R/usr/pkg/lib -L/usr/pkg/lib -Wl,-R/usr/X11R6/lib -L/usr/X11R6/lib
|
2002-08-09 10:03:06 +00:00
|
|
|
ADDITIONAL_INCLUDE_DIRS += -I/usr/pkg/include
|
2002-09-12 13:59:04 +00:00
|
|
|
STATIC_LDFLAGS += -static
|
2000-03-08 18:28:32 +00:00
|
|
|
endif
|
|
|
|
#
|
|
|
|
# end NetBSD
|
|
|
|
#
|
|
|
|
####################################################
|
|
|
|
|
2006-08-21 19:05:13 +00:00
|
|
|
####################################################
|
|
|
|
#
|
|
|
|
# DragonFly
|
|
|
|
#
|
|
|
|
ifeq ($(findstring dragonfly, $(GNUSTEP_TARGET_OS)), dragonfly)
|
|
|
|
HAVE_SHARED_LIBS = yes
|
|
|
|
SHARED_LD_POSTFLAGS = -Wl,-R/usr/pkg/lib -L/usr/pkg/lib
|
|
|
|
SHARED_LIB_LINK_CMD = \
|
2009-03-24 23:08:59 +00:00
|
|
|
$(LD) -shared -Wl,-soname,$(LIB_LINK_VERSION_FILE) \
|
2006-08-21 19:05:13 +00:00
|
|
|
$(ALL_LDFLAGS) -o $(LIB_LINK_OBJ_DIR)/$(LIB_LINK_VERSION_FILE) \
|
|
|
|
$^ $(INTERNAL_LIBRARIES_DEPEND_UPON) \
|
2006-10-02 16:57:29 +00:00
|
|
|
$(SHARED_LD_POSTFLAGS) \
|
|
|
|
&& (cd $(LIB_LINK_OBJ_DIR); \
|
2006-08-21 19:05:13 +00:00
|
|
|
$(RM_LN_S) $(LIB_LINK_FILE); \
|
|
|
|
$(LN_S) $(LIB_LINK_VERSION_FILE) $(LIB_LINK_FILE))
|
|
|
|
OBJ_MERGE_CMD = \
|
2011-04-11 20:23:50 +00:00
|
|
|
$(LD) -nostdlib $(OBJ_MERGE_CMD_FLAG) $(ALL_LDFLAGS) -o $(GNUSTEP_OBJ_DIR)/$(SUBPROJECT_PRODUCT) $^ ;
|
2006-08-21 19:05:13 +00:00
|
|
|
|
|
|
|
SHARED_CFLAGS += -fPIC
|
|
|
|
SHARED_LIBEXT = .so
|
|
|
|
|
|
|
|
HAVE_BUNDLES = yes
|
2009-03-24 23:08:59 +00:00
|
|
|
BUNDLE_LD = $(LD)
|
2006-08-21 19:05:13 +00:00
|
|
|
BUNDLE_LDFLAGS += -shared
|
|
|
|
ADDITIONAL_LDFLAGS += -rdynamic -Wl,-R/usr/pkg/lib -L/usr/pkg/lib -Wl,-R/usr/X11R6/lib -L/usr/X11R6/lib
|
|
|
|
ADDITIONAL_INCLUDE_DIRS += -I/usr/pkg/include
|
|
|
|
STATIC_LDFLAGS += -static
|
|
|
|
endif
|
|
|
|
#
|
|
|
|
# end DragonFly
|
|
|
|
#
|
|
|
|
####################################################
|
|
|
|
|
1999-02-02 00:08:58 +00:00
|
|
|
####################################################
|
|
|
|
#
|
2003-06-07 03:39:31 +00:00
|
|
|
# OpenBSD 3.x (though set for 3.3)
|
1999-02-02 00:08:58 +00:00
|
|
|
#
|
|
|
|
ifeq ($(findstring openbsd, $(GNUSTEP_TARGET_OS)), openbsd)
|
2003-06-18 22:08:30 +00:00
|
|
|
HAVE_SHARED_LIBS = yes
|
2003-06-16 02:44:23 +00:00
|
|
|
SHARED_LIB_LINK_CMD = \
|
2009-03-24 23:08:59 +00:00
|
|
|
$(LD) -shared -Wl,-soname,$(LIB_LINK_SONAME_FILE) \
|
2003-11-08 21:54:42 +00:00
|
|
|
$(ALL_LDFLAGS) -o $(LIB_LINK_OBJ_DIR)/$(LIB_LINK_VERSION_FILE) $^ \
|
2003-06-16 02:44:23 +00:00
|
|
|
$(INTERNAL_LIBRARIES_DEPEND_UPON) \
|
2006-10-02 16:57:29 +00:00
|
|
|
$(SHARED_LD_POSTFLAGS) \
|
|
|
|
&& (cd $(LIB_LINK_OBJ_DIR); \
|
2004-11-04 08:45:18 +00:00
|
|
|
$(RM_LN_S) $(LIB_LINK_FILE); \
|
2004-01-12 12:40:00 +00:00
|
|
|
if [ "$(LIB_LINK_SONAME_FILE)" != "$(LIB_LINK_VERSION_FILE)" ]; then\
|
2004-11-04 08:45:18 +00:00
|
|
|
$(RM_LN_S) $(LIB_LINK_SONAME_FILE);\
|
2004-01-12 12:40:00 +00:00
|
|
|
$(LN_S) $(LIB_LINK_VERSION_FILE) $(LIB_LINK_SONAME_FILE); \
|
|
|
|
fi; \
|
2003-06-16 02:44:23 +00:00
|
|
|
$(LN_S) $(LIB_LINK_SONAME_FILE) $(LIB_LINK_FILE))
|
|
|
|
AFTER_INSTALL_SHARED_LIB_CMD = \
|
|
|
|
(cd $(LIB_LINK_INSTALL_DIR); \
|
2004-11-04 08:45:18 +00:00
|
|
|
$(RM_LN_S) $(LIB_LINK_FILE); \
|
2004-01-12 12:40:00 +00:00
|
|
|
if [ "$(LIB_LINK_SONAME_FILE)" != "$(LIB_LINK_VERSION_FILE)" ]; then\
|
2004-11-04 08:45:18 +00:00
|
|
|
$(RM_LN_S) $(LIB_LINK_SONAME_FILE);\
|
2004-01-12 12:40:00 +00:00
|
|
|
$(LN_S) $(LIB_LINK_VERSION_FILE) $(LIB_LINK_SONAME_FILE); \
|
|
|
|
fi; \
|
2003-06-16 02:44:23 +00:00
|
|
|
$(LN_S) $(LIB_LINK_SONAME_FILE) $(LIB_LINK_FILE); \
|
|
|
|
)
|
1999-02-02 00:08:58 +00:00
|
|
|
|
2003-06-07 03:39:31 +00:00
|
|
|
OBJ_MERGE_CMD = \
|
2011-04-11 20:23:50 +00:00
|
|
|
$(LD) -nostdlib $(OBJ_MERGE_CMD_FLAG) $(ALL_LDFLAGS) -o $(GNUSTEP_OBJ_DIR)/$(SUBPROJECT_PRODUCT) $^ ;
|
2003-06-07 03:39:31 +00:00
|
|
|
|
2003-06-18 22:08:30 +00:00
|
|
|
SHARED_CFLAGS += -fPIC
|
1999-02-02 00:08:58 +00:00
|
|
|
SHARED_LIBEXT = .so
|
|
|
|
|
2003-06-18 22:08:30 +00:00
|
|
|
HAVE_BUNDLES = yes
|
2009-03-24 23:08:59 +00:00
|
|
|
BUNDLE_LD = $(LD)
|
2003-07-30 10:28:40 +00:00
|
|
|
BUNDLE_LDFLAGS += -shared -fPIC
|
2006-03-28 05:26:05 +00:00
|
|
|
ADDITIONAL_LDFLAGS += -Wl,-E
|
2002-09-12 13:59:04 +00:00
|
|
|
STATIC_LDFLAGS += -static
|
2006-03-09 19:10:59 +00:00
|
|
|
|
|
|
|
# nm on OpenBSD is rather like on Darwin
|
2015-06-09 08:39:35 +00:00
|
|
|
EXTRACT_CLASS_NAMES_COMMAND = $(NM) -g $$object_file | sed -n -e '/[^U] __objc_class_name_/ {s/[0-9a-f]* [^U] __objc_class_name_//p;}'
|
1999-02-02 00:08:58 +00:00
|
|
|
endif
|
|
|
|
#
|
2003-07-30 10:28:40 +00:00
|
|
|
# end OpenBSD 3.x
|
1999-02-02 00:08:58 +00:00
|
|
|
#
|
|
|
|
####################################################
|
|
|
|
|
1999-09-09 02:56:20 +00:00
|
|
|
####################################################
|
|
|
|
#
|
|
|
|
# OSF
|
|
|
|
#
|
|
|
|
ifeq ($(findstring osf, $(GNUSTEP_TARGET_OS)), osf)
|
1999-10-18 02:52:31 +00:00
|
|
|
HAVE_SHARED_LIBS = yes
|
1999-09-09 02:56:20 +00:00
|
|
|
SHARED_LIB_LINK_CMD = \
|
2009-03-24 23:08:59 +00:00
|
|
|
$(LD) -shared -Wl,-soname,$(LIB_LINK_VERSION_FILE) \
|
2006-10-02 16:57:29 +00:00
|
|
|
$(ALL_LDFLAGS) -o $(LIB_LINK_OBJ_DIR)/$(LIB_LINK_VERSION_FILE) $^ \
|
|
|
|
&& (cd $(LIB_LINK_OBJ_DIR); \
|
2004-11-04 08:45:18 +00:00
|
|
|
$(RM_LN_S) $(LIB_LINK_FILE); \
|
2002-10-30 13:20:26 +00:00
|
|
|
$(LN_S) $(LIB_LINK_VERSION_FILE) $(LIB_LINK_FILE))
|
1999-09-09 02:56:20 +00:00
|
|
|
OBJ_MERGE_CMD = \
|
2011-04-11 20:23:50 +00:00
|
|
|
$(LD) -nostdlib $(OBJ_MERGE_CMD_FLAG) $(ALL_LDFLAGS) -o $(GNUSTEP_OBJ_DIR)/$(SUBPROJECT_PRODUCT) $^ ;
|
1999-09-09 02:56:20 +00:00
|
|
|
|
|
|
|
SHARED_CFLAGS += -fPIC
|
|
|
|
SHARED_LIBEXT = .so
|
|
|
|
|
|
|
|
HAVE_BUNDLES = yes
|
2009-03-24 23:08:59 +00:00
|
|
|
BUNDLE_LD = $(LD)
|
1999-09-09 02:56:20 +00:00
|
|
|
BUNDLE_LDFLAGS += -shared
|
|
|
|
ADDITIONAL_LDFLAGS += -rdynamic
|
2002-09-12 13:59:04 +00:00
|
|
|
STATIC_LDFLAGS += -static
|
1999-09-09 02:56:20 +00:00
|
|
|
# Newer gcc's don't define this in Objective-C programs:
|
1999-10-14 15:12:02 +00:00
|
|
|
AUXILIARY_CPPFLAGS += -D__LANGUAGES_C__
|
1999-09-09 02:56:20 +00:00
|
|
|
endif
|
|
|
|
#
|
|
|
|
# end OSF
|
|
|
|
#
|
|
|
|
####################################################
|
|
|
|
|
1999-02-15 20:59:19 +00:00
|
|
|
####################################################
|
|
|
|
#
|
|
|
|
# IRIX
|
|
|
|
#
|
|
|
|
ifeq ($(findstring irix, $(GNUSTEP_TARGET_OS)), irix)
|
2002-07-29 19:37:40 +00:00
|
|
|
HAVE_SHARED_LIBS = yes
|
2002-12-10 16:48:02 +00:00
|
|
|
|
1999-02-15 20:59:19 +00:00
|
|
|
SHARED_LIB_LINK_CMD = \
|
2009-03-24 23:08:59 +00:00
|
|
|
$(LD) $(SHARED_LD_PREFLAGS) -shared -Wl,-soname,$(LIB_LINK_SONAME_FILE) \
|
2003-11-08 21:54:42 +00:00
|
|
|
$(ALL_LDFLAGS) -o $(LIB_LINK_OBJ_DIR)/$(LIB_LINK_VERSION_FILE) $^ \
|
2002-12-10 16:48:02 +00:00
|
|
|
-Wl,-rpath,$(LIB_LINK_INSTALL_DIR) \
|
|
|
|
$(INTERNAL_LIBRARIES_DEPEND_UPON) \
|
2006-10-02 16:57:29 +00:00
|
|
|
$(SHARED_LD_POSTFLAGS) \
|
|
|
|
&& (cd $(LIB_LINK_OBJ_DIR); \
|
2004-11-04 08:45:18 +00:00
|
|
|
$(RM_LN_S) $(LIB_LINK_FILE); \
|
2004-01-12 12:40:00 +00:00
|
|
|
if [ "$(LIB_LINK_SONAME_FILE)" != "$(LIB_LINK_VERSION_FILE)" ]; then\
|
2004-11-04 08:45:18 +00:00
|
|
|
$(RM_LN_S) $(LIB_LINK_SONAME_FILE);\
|
2004-01-12 12:40:00 +00:00
|
|
|
$(LN_S) $(LIB_LINK_VERSION_FILE) $(LIB_LINK_SONAME_FILE); \
|
|
|
|
fi; \
|
2002-12-10 16:48:02 +00:00
|
|
|
$(LN_S) $(LIB_LINK_SONAME_FILE) $(LIB_LINK_FILE); \
|
|
|
|
)
|
|
|
|
AFTER_INSTALL_SHARED_LIB_CMD = \
|
|
|
|
(cd $(LIB_LINK_INSTALL_DIR); \
|
2004-11-04 08:45:18 +00:00
|
|
|
$(RM_LN_S) $(LIB_LINK_FILE); \
|
2004-01-12 12:40:00 +00:00
|
|
|
if [ "$(LIB_LINK_SONAME_FILE)" != "$(LIB_LINK_VERSION_FILE)" ]; then\
|
2004-11-04 08:45:18 +00:00
|
|
|
$(RM_LN_S) $(LIB_LINK_SONAME_FILE);\
|
2004-01-12 12:40:00 +00:00
|
|
|
$(LN_S) $(LIB_LINK_VERSION_FILE) $(LIB_LINK_SONAME_FILE); \
|
|
|
|
fi; \
|
2002-12-10 16:48:02 +00:00
|
|
|
$(LN_S) $(LIB_LINK_SONAME_FILE) $(LIB_LINK_FILE); \
|
|
|
|
)
|
|
|
|
AFTER_INSTALL_SHARED_LIB_CHOWN = \
|
|
|
|
(cd $(LIB_LINK_INSTALL_DIR); \
|
|
|
|
chown $(CHOWN_TO) $(LIB_LINK_SONAME_FILE); \
|
|
|
|
chown $(CHOWN_TO) $(LIB_LINK_FILE))
|
1999-02-15 20:59:19 +00:00
|
|
|
|
2010-08-14 00:06:33 +00:00
|
|
|
SHARED_CFLAGS += -fPIC
|
2002-07-29 19:37:40 +00:00
|
|
|
SHARED_LIBEXT = .so
|
|
|
|
|
|
|
|
OBJ_MERGE_CMD = \
|
2011-04-11 20:23:50 +00:00
|
|
|
$(LD) $(OBJ_MERGE_CMD_FLAG) $(ALL_LDFLAGS) -o $(GNUSTEP_OBJ_DIR)/$(SUBPROJECT_PRODUCT) $^ ;
|
2002-12-10 16:48:02 +00:00
|
|
|
|
|
|
|
ADDITIONAL_LDFLAGS +=
|
|
|
|
STATIC_LDFLAGS +=
|
1999-02-15 20:59:19 +00:00
|
|
|
|
|
|
|
HAVE_BUNDLES = yes
|
2009-03-24 23:08:59 +00:00
|
|
|
BUNDLE_LD = $(LD)
|
2002-07-29 19:37:40 +00:00
|
|
|
BUNDLE_LDFLAGS += -shared
|
1999-02-15 20:59:19 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
# end IRIX
|
|
|
|
#
|
|
|
|
####################################################
|
|
|
|
|
2000-06-13 15:14:23 +00:00
|
|
|
####################################################
|
|
|
|
#
|
|
|
|
# Mingw32
|
|
|
|
#
|
|
|
|
ifeq ($(findstring mingw32, $(GNUSTEP_TARGET_OS)), mingw32)
|
2002-03-10 10:03:19 +00:00
|
|
|
shared = yes
|
2000-06-13 15:14:23 +00:00
|
|
|
HAVE_SHARED_LIBS = yes
|
2010-03-06 21:13:58 +00:00
|
|
|
|
2011-10-19 14:36:26 +00:00
|
|
|
# There's some sort of gcc bug that -pthread doesn't work on windows
|
|
|
|
# so we need to reset the variables which use it.
|
|
|
|
INTERNAL_CFLAGS =
|
|
|
|
INTERNAL_OBJCFLAGS =
|
|
|
|
INTERNAL_LDFLAGS =
|
|
|
|
SHARED_CFLAGS =
|
|
|
|
|
2005-03-01 04:54:48 +00:00
|
|
|
# This command links the library, generates automatically the list of
|
2010-03-06 21:13:58 +00:00
|
|
|
# symbols to export, creates the DLL (eg, obj/gnustep-base-1_13.dll)
|
|
|
|
# and the import library (eg, obj/libgnustep-base.dll.a). We pass
|
|
|
|
# --export-all-symbols to make sure it is always used. Otherwise,
|
|
|
|
# while it is the default, it might silently get disabled if a symbol
|
|
|
|
# gets manually exported (eg, because a header of a library we include
|
|
|
|
# exports a symbol by mistake).
|
2015-12-09 19:29:00 +00:00
|
|
|
ifneq ($(CC),clang)
|
2005-03-01 04:54:48 +00:00
|
|
|
SHARED_LIB_LINK_CMD = \
|
2009-03-24 23:08:59 +00:00
|
|
|
$(LD) $(SHARED_LD_PREFLAGS) -shared \
|
2006-03-07 20:21:29 +00:00
|
|
|
-Wl,--enable-auto-image-base \
|
2010-03-06 21:13:58 +00:00
|
|
|
-Wl,--export-all-symbols \
|
2006-03-07 20:21:29 +00:00
|
|
|
-Wl,--out-implib,$(LIB_LINK_OBJ_DIR)/$(LIB_LINK_VERSION_FILE) \
|
2005-03-01 04:54:48 +00:00
|
|
|
$(ALL_LDFLAGS) -o $(LIB_LINK_OBJ_DIR)/$(LIB_LINK_DLL_FILE) $^ \
|
|
|
|
$(INTERNAL_LIBRARIES_DEPEND_UPON) \
|
|
|
|
$(SHARED_LD_POSTFLAGS)
|
2015-12-09 19:29:00 +00:00
|
|
|
else
|
|
|
|
SHARED_LIB_LINK_CMD = \
|
|
|
|
$(LD) $(SHARED_LD_PREFLAGS) -shared \
|
|
|
|
-Wl,--enable-auto-image-base \
|
|
|
|
-Wl,--export-all-symbols \
|
|
|
|
-Wl,--out-implib,$(LIB_LINK_OBJ_DIR)/$(LIB_LINK_VERSION_FILE) \
|
|
|
|
-o $(LIB_LINK_OBJ_DIR)/$(LIB_LINK_DLL_FILE) \
|
|
|
|
-Wl,--whole-archive $^ $(ALL_LDFLAGS) -Wl,--no-whole-archive \
|
|
|
|
$(INTERNAL_LIBRARIES_DEPEND_UPON) \
|
|
|
|
$(SHARED_LD_POSTFLAGS)
|
|
|
|
endif
|
2005-03-01 04:54:48 +00:00
|
|
|
|
|
|
|
AFTER_INSTALL_SHARED_LIB_CMD =
|
|
|
|
AFTER_INSTALL_SHARED_LIB_CHOWN =
|
|
|
|
|
2000-06-13 15:14:23 +00:00
|
|
|
BUILD_DLL = yes
|
2005-03-01 04:54:48 +00:00
|
|
|
LIBEXT = .a
|
2005-03-21 22:05:16 +00:00
|
|
|
# Technically, in this Unix-inspired building system, a DLL is
|
|
|
|
# composed of a .dll file which goes in the executable path and is the
|
|
|
|
# one which is loaded at runtime, and a .dll.a file which goes in the
|
|
|
|
# library path and which is linked into the application in order to
|
|
|
|
# enable it use the .dll. Anything in gnustep-make which is looking
|
|
|
|
# for shared libs should detect / look for the .dll.a as that's what
|
|
|
|
# we link applications against.
|
|
|
|
SHARED_LIBEXT = .dll.a
|
2000-06-13 15:14:23 +00:00
|
|
|
DLL_LIBEXT = .dll
|
|
|
|
#SHARED_CFLAGS +=
|
|
|
|
|
2015-12-09 19:29:00 +00:00
|
|
|
ifneq ($(CC),clang)
|
2000-06-13 15:14:23 +00:00
|
|
|
OBJ_MERGE_CMD = \
|
2011-04-11 20:23:50 +00:00
|
|
|
$(LD) -nostdlib $(OBJ_MERGE_CMD_FLAG) $(ALL_LDFLAGS) -o $(GNUSTEP_OBJ_DIR)/$(SUBPROJECT_PRODUCT) $^ ;
|
2015-12-09 19:29:00 +00:00
|
|
|
else
|
|
|
|
OBJ_MERGE_CMD = \
|
|
|
|
ar cr $(GNUSTEP_OBJ_DIR)/$(SUBPROJECT_PRODUCT) $^ ;
|
|
|
|
endif
|
2000-06-13 15:14:23 +00:00
|
|
|
|
|
|
|
HAVE_BUNDLES = yes
|
2009-03-24 23:08:59 +00:00
|
|
|
BUNDLE_LD = $(LD)
|
2015-12-09 19:29:00 +00:00
|
|
|
|
|
|
|
ifeq ($(CC),clang)
|
|
|
|
BUNDLE_LDFLAGS += -shared -Wl,--export-all-symbols \
|
|
|
|
-Wl,--enable-auto-import \
|
|
|
|
-Wl,--enable-auto-image-base \
|
|
|
|
-Wl,--whole-archive
|
|
|
|
BUNDLE_LIBFLAGS += -Wl,--no-whole-archive
|
|
|
|
BUNDLE_LINK_CMD = \
|
|
|
|
$(BUNDLE_LD) $(BUNDLE_LDFLAGS) $(ALL_LDFLAGS) \
|
|
|
|
-o $(LDOUT)$(BUNDLE_FILE) \
|
|
|
|
$(OBJ_FILES_TO_LINK) \
|
|
|
|
$(BUNDLE_LIBFLAGS) $(ALL_LIB_DIRS) $(BUNDLE_LIBS)
|
|
|
|
else
|
|
|
|
BUNDLE_LDFLAGS += -shared -Wl,--enable-auto-image-base
|
|
|
|
endif
|
|
|
|
|
2005-10-23 08:10:34 +00:00
|
|
|
ADDITIONAL_LDFLAGS += -Wl,--enable-auto-import
|
2013-12-06 03:51:54 +00:00
|
|
|
ADDITIONAL_FLAGS += -fno-omit-frame-pointer
|
2005-07-13 14:56:18 +00:00
|
|
|
|
|
|
|
# On Mingw32, it looks like the class name symbols start with '___' rather
|
|
|
|
# than '__'
|
2015-06-09 08:39:35 +00:00
|
|
|
EXTRACT_CLASS_NAMES_COMMAND = $(NM) -Pg $$object_file | sed -n -e '/^___objc_class_name_[A-Za-z0-9_.]* [^U]/ {s/^___objc_class_name_\([A-Za-z0-9_.]*\) [^U].*/\1/p;}'
|
2005-07-13 14:56:18 +00:00
|
|
|
|
2000-06-13 15:14:23 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
# end Mingw32
|
|
|
|
#
|
|
|
|
####################################################
|
|
|
|
|
2000-06-22 02:55:28 +00:00
|
|
|
####################################################
|
|
|
|
#
|
|
|
|
# Cygwin
|
|
|
|
#
|
|
|
|
ifeq ($(findstring cygwin, $(GNUSTEP_TARGET_OS)), cygwin)
|
2002-03-10 10:03:19 +00:00
|
|
|
shared = yes
|
2000-06-22 02:55:28 +00:00
|
|
|
HAVE_SHARED_LIBS = yes
|
2011-10-19 14:36:26 +00:00
|
|
|
|
|
|
|
# There's some sort of gcc bug that -pthread doesn't work on windows
|
|
|
|
# so we need to reset the variables which use it.
|
|
|
|
INTERNAL_CFLAGS =
|
|
|
|
INTERNAL_OBJCFLAGS =
|
|
|
|
INTERNAL_LDFLAGS =
|
|
|
|
SHARED_CFLAGS =
|
|
|
|
|
2005-09-18 20:05:09 +00:00
|
|
|
# This command links the library, generates automatically the list of
|
|
|
|
# symbols to export, creates the DLL (eg, obj/gnustep-base.dll) and
|
|
|
|
# the import library
|
|
|
|
SHARED_LIB_LINK_CMD = \
|
2009-03-24 23:08:59 +00:00
|
|
|
$(LD) $(SHARED_LD_PREFLAGS) -shared -o $(LIB_LINK_OBJ_DIR)/$(LIB_LINK_DLL_FILE) \
|
2009-08-15 21:59:04 +00:00
|
|
|
-Wl,--enable-auto-image-base \
|
2005-10-07 02:39:08 +00:00
|
|
|
-Wl,--out-implib=$(LIB_LINK_OBJ_DIR)/$(LIB_LINK_VERSION_FILE) \
|
2005-09-18 20:05:09 +00:00
|
|
|
-Wl,--export-all-symbols \
|
|
|
|
-Wl,--enable-auto-import \
|
|
|
|
-Wl,--whole-archive $(OBJ_FILES_TO_LINK) $(ALL_LDFLAGS) \
|
|
|
|
-Wl,--no-whole-archive $(INTERNAL_LIBRARIES_DEPEND_UPON) $(TARGET_SYSTEM_LIBS)\
|
|
|
|
$(SHARED_LD_POSTFLAGS)
|
2011-04-12 09:32:40 +00:00
|
|
|
|
2005-09-18 20:05:09 +00:00
|
|
|
AFTER_INSTALL_SHARED_LIB_CMD =
|
|
|
|
AFTER_INSTALL_SHARED_LIB_CHOWN =
|
|
|
|
SHARED_LIBEXT = .dll.a
|
|
|
|
|
2000-06-22 02:55:28 +00:00
|
|
|
BUILD_DLL = yes
|
2005-09-18 20:05:09 +00:00
|
|
|
CYGWIN_DLL_SUPPORT = yes
|
2005-09-29 04:25:01 +00:00
|
|
|
#SHARED_LIBEXT = .a
|
2009-08-15 21:59:04 +00:00
|
|
|
DLL_PREFIX = cyg
|
2000-06-22 02:55:28 +00:00
|
|
|
DLL_LIBEXT = .dll
|
2005-09-18 20:05:09 +00:00
|
|
|
CYGWIN_LD_FLAGS = -Wl,--export-all-symbols -Wl,--enable-auto-import
|
2000-06-22 02:55:28 +00:00
|
|
|
#SHARED_CFLAGS +=
|
|
|
|
|
|
|
|
OBJ_MERGE_CMD = \
|
2011-04-11 20:23:50 +00:00
|
|
|
$(LD) -nostdlib $(OBJ_MERGE_CMD_FLAG) $(ALL_LDFLAGS) $(CYGWIN_LD_FLAGS) -o $(GNUSTEP_OBJ_DIR)/$(SUBPROJECT_PRODUCT) $^ ;
|
2000-06-22 02:55:28 +00:00
|
|
|
|
|
|
|
HAVE_BUNDLES = yes
|
2009-03-24 23:08:59 +00:00
|
|
|
BUNDLE_LD = $(LD)
|
2005-09-18 20:05:09 +00:00
|
|
|
BUNDLE_LDFLAGS += -shared -Wl,--export-all-symbols \
|
|
|
|
-Wl,--enable-auto-import \
|
2009-08-15 21:59:04 +00:00
|
|
|
-Wl,--enable-auto-image-base \
|
2005-09-18 20:05:09 +00:00
|
|
|
-Wl,--whole-archive
|
2009-08-15 21:59:04 +00:00
|
|
|
BUNDLE_LIBFLAGS += -Wl,--no-whole-archive
|
2005-09-18 20:05:09 +00:00
|
|
|
BUNDLE_LINK_CMD = \
|
|
|
|
$(BUNDLE_LD) $(BUNDLE_LDFLAGS) $(ALL_LDFLAGS) \
|
|
|
|
-o $(LDOUT)$(BUNDLE_FILE) \
|
|
|
|
$(OBJ_FILES_TO_LINK) \
|
2009-08-15 21:59:04 +00:00
|
|
|
$(BUNDLE_LIBFLAGS) $(ALL_LIB_DIRS) $(BUNDLE_LIBS)
|
2000-06-22 02:55:28 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
# end Cygwin
|
|
|
|
#
|
|
|
|
####################################################
|
|
|
|
|
|
|
|
|
1998-01-11 21:59:31 +00:00
|
|
|
####################################################
|
1997-09-23 01:27:32 +00:00
|
|
|
#
|
|
|
|
# Solaris
|
|
|
|
#
|
|
|
|
ifeq ($(findstring solaris, $(GNUSTEP_TARGET_OS)), solaris)
|
2006-11-16 15:39:05 +00:00
|
|
|
ifeq ($(SOLARIS_SHARED), yes)
|
|
|
|
GCC_LINK_FLAG=-shared
|
2006-10-26 11:22:00 +00:00
|
|
|
else
|
2006-11-16 15:39:05 +00:00
|
|
|
GCC_LINK_FLAG=-G
|
2006-10-26 11:22:00 +00:00
|
|
|
endif
|
1997-09-23 01:27:32 +00:00
|
|
|
HAVE_SHARED_LIBS = yes
|
|
|
|
SHARED_LIB_LINK_CMD = \
|
2009-03-24 23:08:59 +00:00
|
|
|
$(LD) $(SHARED_LD_PREFLAGS) $(GCC_LINK_FLAG) \
|
2006-10-26 11:22:00 +00:00
|
|
|
-Wl,-h,$(LIB_LINK_SONAME_FILE) \
|
2003-11-08 21:54:42 +00:00
|
|
|
$(ALL_LDFLAGS) -o $(LIB_LINK_OBJ_DIR)/$(LIB_LINK_VERSION_FILE) $^ \
|
2002-01-29 13:44:43 +00:00
|
|
|
$(INTERNAL_LIBRARIES_DEPEND_UPON) \
|
2006-10-02 16:57:29 +00:00
|
|
|
$(SHARED_LD_POSTFLAGS) \
|
|
|
|
&& (cd $(LIB_LINK_OBJ_DIR); \
|
2004-11-04 08:45:18 +00:00
|
|
|
$(RM_LN_S) $(LIB_LINK_FILE); \
|
2004-01-12 12:40:00 +00:00
|
|
|
if [ "$(LIB_LINK_SONAME_FILE)" != "$(LIB_LINK_VERSION_FILE)" ]; then\
|
2004-11-04 08:45:18 +00:00
|
|
|
$(RM_LN_S) $(LIB_LINK_SONAME_FILE);\
|
2004-01-12 12:40:00 +00:00
|
|
|
$(LN_S) $(LIB_LINK_VERSION_FILE) $(LIB_LINK_SONAME_FILE); \
|
|
|
|
fi; \
|
2002-10-30 13:20:26 +00:00
|
|
|
$(LN_S) $(LIB_LINK_SONAME_FILE) $(LIB_LINK_FILE); \
|
1998-12-21 21:30:13 +00:00
|
|
|
)
|
2002-10-30 12:42:22 +00:00
|
|
|
AFTER_INSTALL_SHARED_LIB_CMD = \
|
2002-10-30 13:20:26 +00:00
|
|
|
(cd $(LIB_LINK_INSTALL_DIR); \
|
2004-11-04 08:45:18 +00:00
|
|
|
$(RM_LN_S) $(LIB_LINK_FILE); \
|
2004-01-12 12:40:00 +00:00
|
|
|
if [ "$(LIB_LINK_SONAME_FILE)" != "$(LIB_LINK_VERSION_FILE)" ]; then\
|
2004-11-04 08:45:18 +00:00
|
|
|
$(RM_LN_S) $(LIB_LINK_SONAME_FILE);\
|
2004-01-12 12:40:00 +00:00
|
|
|
$(LN_S) $(LIB_LINK_VERSION_FILE) $(LIB_LINK_SONAME_FILE); \
|
|
|
|
fi; \
|
2002-10-30 13:20:26 +00:00
|
|
|
$(LN_S) $(LIB_LINK_SONAME_FILE) $(LIB_LINK_FILE); \
|
1998-12-21 21:30:13 +00:00
|
|
|
)
|
2001-12-12 18:06:08 +00:00
|
|
|
AFTER_INSTALL_SHARED_LIB_CHOWN = \
|
2002-10-30 13:20:26 +00:00
|
|
|
(cd $(LIB_LINK_INSTALL_DIR); \
|
|
|
|
chown $(CHOWN_TO) $(LIB_LINK_SONAME_FILE); \
|
|
|
|
chown $(CHOWN_TO) $(LIB_LINK_FILE))
|
2000-06-13 15:14:23 +00:00
|
|
|
|
|
|
|
OBJ_MERGE_CMD = \
|
2011-04-11 20:23:50 +00:00
|
|
|
$(LD) -nostdlib $(OBJ_MERGE_CMD_FLAG) $(ALL_LDFLAGS) -o $(GNUSTEP_OBJ_DIR)/$(SUBPROJECT_PRODUCT) $^ ;
|
1999-09-09 02:56:20 +00:00
|
|
|
|
2010-10-20 21:43:50 +00:00
|
|
|
SHARED_CFLAGS += -fpic -fPIC -std=gnu99
|
1997-09-25 01:23:17 +00:00
|
|
|
SHARED_LIBEXT = .so
|
1997-09-30 21:54:33 +00:00
|
|
|
|
|
|
|
HAVE_BUNDLES = yes
|
2009-03-24 23:08:59 +00:00
|
|
|
BUNDLE_LD = $(LD)
|
2001-10-25 02:34:37 +00:00
|
|
|
BUNDLE_LDFLAGS = -shared -mimpure-text
|
2010-08-14 00:06:33 +00:00
|
|
|
#BUNDLE_LDFLAGS = -nodefaultlibs -Xlinker -Wl,-r
|
1997-09-23 01:27:32 +00:00
|
|
|
endif
|
1998-01-30 23:59:17 +00:00
|
|
|
|
1998-01-11 21:59:31 +00:00
|
|
|
# end Solaris
|
|
|
|
#
|
|
|
|
####################################################
|
1998-03-25 19:05:30 +00:00
|
|
|
|
1998-05-28 06:56:11 +00:00
|
|
|
|
1998-06-12 08:30:59 +00:00
|
|
|
####################################################
|
|
|
|
#
|
|
|
|
# Unixware
|
|
|
|
#
|
|
|
|
ifeq ($(findstring sysv4.2, $(GNUSTEP_TARGET_OS)), sysv4.2)
|
|
|
|
HAVE_SHARED_LIBS = yes
|
|
|
|
SHARED_LIB_LINK_CMD = \
|
2009-03-24 23:08:59 +00:00
|
|
|
$(LD) $(SHARED_LD_PREFLAGS) -shared $(ALL_LDFLAGS) -o $(LIB_LINK_VERSION_FILE) $^ \
|
2000-10-28 21:58:48 +00:00
|
|
|
$(SHARED_LD_POSTFLAGS);\
|
2006-10-02 16:57:29 +00:00
|
|
|
&& (mv $(LIB_LINK_VERSION_FILE) $(LIB_LINK_OBJ_DIR);\
|
|
|
|
cd $(LIB_LINK_OBJ_DIR); \
|
2004-11-04 08:45:18 +00:00
|
|
|
$(RM_LN_S) $(LIB_LINK_FILE); \
|
2002-10-30 13:20:26 +00:00
|
|
|
$(LN_S) $(LIB_LINK_VERSION_FILE) $(LIB_LINK_FILE))
|
1998-06-12 08:30:59 +00:00
|
|
|
|
|
|
|
SHARED_CFLAGS += -fpic -fPIC
|
|
|
|
SHARED_LIBEXT = .so
|
|
|
|
|
|
|
|
HAVE_BUNDLES = yes
|
2009-03-24 23:08:59 +00:00
|
|
|
BUNDLE_LD = $(LD)
|
1998-06-12 08:30:59 +00:00
|
|
|
#BUNDLE_LDFLAGS += -shared -mimpure-text
|
2010-08-14 00:06:33 +00:00
|
|
|
BUNDLE_LDFLAGS += -nodefaultlibs -Xlinker -Wl,-r
|
1998-06-12 08:30:59 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
# end Unixware
|
|
|
|
#
|
|
|
|
####################################################
|
|
|
|
|
|
|
|
|
1998-03-25 19:05:30 +00:00
|
|
|
####################################################
|
|
|
|
#
|
|
|
|
# HP-UX
|
|
|
|
#
|
|
|
|
ifeq ($(findstring hpux, $(GNUSTEP_TARGET_OS)), hpux)
|
|
|
|
HAVE_SHARED_LIBS = yes
|
|
|
|
SHARED_LIB_LINK_CMD = \
|
2009-03-24 23:08:59 +00:00
|
|
|
$(LD) $(SHARED_LD_PREFLAGS) \
|
2000-06-13 15:14:23 +00:00
|
|
|
-v $(SHARED_CFLAGS) -shared \
|
2008-01-17 02:12:12 +00:00
|
|
|
$(ALL_LDFLAGS) -o $(LIB_LINK_OBJ_DIR)/$(LIB_LINK_VERSION_FILE) $^ \
|
2000-06-13 15:14:23 +00:00
|
|
|
$(SHARED_LD_POSTFLAGS) ;\
|
2008-01-17 02:12:12 +00:00
|
|
|
&& (cd $(LIB_LINK_OBJ_DIR); \
|
2004-11-04 08:45:18 +00:00
|
|
|
$(RM_LN_S) $(LIB_LINK_FILE); \
|
2002-10-30 13:20:26 +00:00
|
|
|
$(LN_S) $(LIB_LINK_VERSION_FILE) $(LIB_LINK_FILE))
|
1998-03-25 19:05:30 +00:00
|
|
|
|
2008-01-17 02:12:12 +00:00
|
|
|
OBJ_MERGE_CMD = \
|
2011-04-11 20:23:50 +00:00
|
|
|
$(LD) -nostdlib $(OBJ_MERGE_CMD_FLAG) $(ALL_LDFLAGS) -o $(GNUSTEP_OBJ_DIR)/$(SUBPROJECT_PRODUCT) $^ ;
|
2008-01-17 02:12:12 +00:00
|
|
|
|
1999-04-23 02:54:45 +00:00
|
|
|
ifeq ($(CC), cc)
|
|
|
|
SHARED_CFLAGS += +z
|
|
|
|
else
|
|
|
|
SHARED_CFLAGS += -fPIC
|
|
|
|
endif
|
2002-01-04 10:14:58 +00:00
|
|
|
|
|
|
|
ifeq ($(GNUSTEP_HOST_CPU), ia64)
|
|
|
|
SHARED_LIBEXT = .so
|
|
|
|
else
|
1998-03-25 19:05:30 +00:00
|
|
|
SHARED_LIBEXT = .sl
|
2002-01-04 10:14:58 +00:00
|
|
|
endif
|
1998-03-25 19:05:30 +00:00
|
|
|
|
|
|
|
HAVE_BUNDLES = yes
|
2009-03-24 23:08:59 +00:00
|
|
|
BUNDLE_LD = $(LD)
|
2010-08-14 00:06:33 +00:00
|
|
|
BUNDLE_LDFLAGS += -nodefaultlibs -Xlinker -Wl,-r
|
2000-04-06 14:53:43 +00:00
|
|
|
ADDITIONAL_LDFLAGS += -Xlinker +s
|
2002-09-12 13:59:04 +00:00
|
|
|
STATIC_LDFLAGS += -static
|
1998-03-25 19:05:30 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
# end HP-UX
|
|
|
|
#
|
|
|
|
####################################################
|
2012-09-01 20:20:54 +00:00
|
|
|
|
|
|
|
####################################################
|
|
|
|
#
|
|
|
|
# QNX Neutrino ELF
|
|
|
|
#
|
|
|
|
# QNX does pretty straight-forward binutils based linking.
|
|
|
|
|
|
|
|
ifeq ($(findstring nto-qnx, $(GNUSTEP_TARGET_OS)), nto-qnx)
|
|
|
|
HAVE_SHARED_LIBS = yes
|
|
|
|
SHARED_LIB_LINK_CMD = \
|
|
|
|
$(LD) $(SHARED_LD_PREFLAGS) -shared -Wl,-soname,$(LIB_LINK_SONAME_FILE) \
|
|
|
|
$(ALL_LDFLAGS) -o $(LIB_LINK_OBJ_DIR)/$(LIB_LINK_VERSION_FILE) $^ \
|
|
|
|
$(INTERNAL_LIBRARIES_DEPEND_UPON) \
|
|
|
|
$(SHARED_LD_POSTFLAGS) \
|
|
|
|
&& (cd $(LIB_LINK_OBJ_DIR); \
|
|
|
|
$(RM_LN_S) $(LIB_LINK_FILE); \
|
|
|
|
if [ "$(LIB_LINK_SONAME_FILE)" != "$(LIB_LINK_VERSION_FILE)" ]; then\
|
|
|
|
$(RM_LN_S) $(LIB_LINK_SONAME_FILE);\
|
|
|
|
$(LN_S) $(LIB_LINK_VERSION_FILE) $(LIB_LINK_SONAME_FILE); \
|
|
|
|
fi; \
|
|
|
|
$(LN_S) $(LIB_LINK_SONAME_FILE) $(LIB_LINK_FILE); \
|
|
|
|
)
|
|
|
|
AFTER_INSTALL_SHARED_LIB_CMD = \
|
|
|
|
(cd $(LIB_LINK_INSTALL_DIR); \
|
|
|
|
$(RM_LN_S) $(LIB_LINK_FILE); \
|
|
|
|
if [ "$(LIB_LINK_SONAME_FILE)" != "$(LIB_LINK_VERSION_FILE)" ]; then\
|
|
|
|
$(RM_LN_S) $(LIB_LINK_SONAME_FILE);\
|
|
|
|
$(LN_S) $(LIB_LINK_VERSION_FILE) $(LIB_LINK_SONAME_FILE); \
|
|
|
|
fi; \
|
|
|
|
$(LN_S) $(LIB_LINK_SONAME_FILE) $(LIB_LINK_FILE); \
|
|
|
|
)
|
|
|
|
AFTER_INSTALL_SHARED_LIB_CHOWN = \
|
|
|
|
(cd $(LIB_LINK_INSTALL_DIR); \
|
|
|
|
chown $(CHOWN_TO) $(LIB_LINK_SONAME_FILE); \
|
|
|
|
chown $(CHOWN_TO) $(LIB_LINK_FILE))
|
|
|
|
|
|
|
|
OBJ_MERGE_CMD = \
|
|
|
|
$(LD) -nostdlib $(OBJ_MERGE_CMD_FLAG) $(ALL_LDFLAGS) -o $(GNUSTEP_OBJ_DIR)/$(SUBPROJECT_PRODUCT) $^ ;
|
|
|
|
|
|
|
|
SHARED_CFLAGS += -fPIC
|
|
|
|
SHARED_LIBEXT = .so
|
|
|
|
|
|
|
|
HAVE_BUNDLES = yes
|
|
|
|
BUNDLE_LD = $(LD)
|
|
|
|
BUNDLE_LDFLAGS += -shared
|
|
|
|
ADDITIONAL_LDFLAGS += -rdynamic
|
|
|
|
STATIC_LDFLAGS += -static
|
|
|
|
endif
|
|
|
|
#
|
|
|
|
# end QNX Neutrino ELF
|
|
|
|
#
|
|
|
|
####################################################
|
2013-03-16 05:29:52 +00:00
|
|
|
|
|
|
|
####################################################
|
|
|
|
#
|
|
|
|
# Linux Android
|
|
|
|
#
|
|
|
|
ifeq ($(findstring android, $(GNUSTEP_TARGET_OS)), android)
|
|
|
|
HAVE_SHARED_LIBS = yes
|
|
|
|
SHARED_LIB_LINK_CMD = \
|
|
|
|
$(LD) $(SHARED_LD_PREFLAGS) -shared -Wl,-soname,$(LIBRARY_FILE) \
|
|
|
|
$(ALL_LDFLAGS) -o $(LIB_LINK_OBJ_DIR)/$(LIB_LINK_VERSION_FILE) $^ \
|
|
|
|
$(INTERNAL_LIBRARIES_DEPEND_UPON) \
|
|
|
|
$(SHARED_LD_POSTFLAGS) \
|
|
|
|
&& (cd $(LIB_LINK_OBJ_DIR); \
|
|
|
|
$(RM_LN_S) $(LIB_LINK_FILE); \
|
|
|
|
if [ "$(LIB_LINK_SONAME_FILE)" != "$(LIB_LINK_VERSION_FILE)" ]; then\
|
|
|
|
$(RM_LN_S) $(LIB_LINK_SONAME_FILE);\
|
|
|
|
$(LN_S) $(LIB_LINK_VERSION_FILE) $(LIB_LINK_SONAME_FILE); \
|
|
|
|
fi; \
|
|
|
|
$(LN_S) $(LIB_LINK_SONAME_FILE) $(LIB_LINK_FILE); \
|
|
|
|
)
|
|
|
|
AFTER_INSTALL_SHARED_LIB_CMD = \
|
|
|
|
(cd $(LIB_LINK_INSTALL_DIR); \
|
|
|
|
$(RM_LN_S) $(LIB_LINK_FILE); \
|
|
|
|
if [ "$(LIB_LINK_SONAME_FILE)" != "$(LIB_LINK_VERSION_FILE)" ]; then\
|
|
|
|
$(RM_LN_S) $(LIB_LINK_SONAME_FILE);\
|
|
|
|
$(LN_S) $(LIB_LINK_VERSION_FILE) $(LIB_LINK_SONAME_FILE); \
|
|
|
|
fi; \
|
|
|
|
$(LN_S) $(LIB_LINK_SONAME_FILE) $(LIB_LINK_FILE); \
|
|
|
|
)
|
|
|
|
AFTER_INSTALL_SHARED_LIB_CHOWN = \
|
|
|
|
(cd $(LIB_LINK_INSTALL_DIR); \
|
|
|
|
chown $(CHOWN_TO) $(LIB_LINK_SONAME_FILE); \
|
|
|
|
chown $(CHOWN_TO) $(LIB_LINK_FILE))
|
|
|
|
|
|
|
|
OBJ_MERGE_CMD = \
|
|
|
|
$(LD) -nostdlib $(OBJ_MERGE_CMD_FLAG) $(ALL_LDFLAGS) -o $(GNUSTEP_OBJ_DIR)/$(SUBPROJECT_PRODUCT) $^ ;
|
|
|
|
|
|
|
|
SHARED_CFLAGS += -fPIC
|
|
|
|
SHARED_LIBEXT = .so
|
|
|
|
|
|
|
|
HAVE_BUNDLES = yes
|
|
|
|
BUNDLE_LD = $(LD)
|
|
|
|
BUNDLE_LDFLAGS += -shared
|
|
|
|
ADDITIONAL_LDFLAGS += -rdynamic
|
|
|
|
STATIC_LDFLAGS += -static
|
|
|
|
endif
|
|
|
|
#
|
|
|
|
# end Linux Android
|
|
|
|
#
|
|
|
|
####################################################
|
|
|
|
|