2002-12-30 16:31:36 +00:00
|
|
|
# -*-makefile-*-
|
2001-12-08 17:04:19 +00:00
|
|
|
# library-combo.make
|
1997-09-16 01:07:48 +00:00
|
|
|
#
|
2001-12-08 17:04:19 +00:00
|
|
|
# Determine which runtime, foundation and gui library to use.
|
1997-09-16 01:07:48 +00:00
|
|
|
#
|
2001-12-08 17:04:19 +00:00
|
|
|
# Copyright (C) 1997, 2001 Free Software Foundation, Inc.
|
1997-09-16 01:07:48 +00:00
|
|
|
#
|
|
|
|
# Author: Scott Christley <scottc@net-community.com>
|
2001-12-08 17:04:19 +00:00
|
|
|
# Author: Nicola Pero <n.pero@mi.flashnet.it>
|
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
|
|
|
|
1997-09-18 01:36:07 +00:00
|
|
|
OBJC_LDFLAGS =
|
2009-03-30 07:52:37 +00:00
|
|
|
OBJC_LIBS =
|
|
|
|
|
1997-09-18 01:36:07 +00:00
|
|
|
#
|
1997-10-02 00:41:03 +00:00
|
|
|
# Set the appropriate ObjC runtime library and other information
|
1997-09-18 01:36:07 +00:00
|
|
|
#
|
2009-03-30 23:05:16 +00:00
|
|
|
# PS: OBJC_LIB_FLAG is set by config.make.
|
1997-10-07 23:27:51 +00:00
|
|
|
ifeq ($(OBJC_RUNTIME_LIB), gnu)
|
2000-12-05 16:11:55 +00:00
|
|
|
OBJC_LDFLAGS =
|
|
|
|
OBJC_LIB_DIR =
|
2009-03-30 07:52:37 +00:00
|
|
|
OBJC_LIBS = $(OBJC_LIB_FLAG)
|
2018-07-10 09:46:40 +00:00
|
|
|
ifeq ($(CLANG_CC), yes)
|
|
|
|
RUNTIME_FLAG = -fobjc-runtime=gcc
|
|
|
|
else
|
|
|
|
RUNTIME_FLAG =
|
|
|
|
endif
|
2000-12-05 16:11:55 +00:00
|
|
|
RUNTIME_DEFINE = -DGNU_RUNTIME=1
|
1997-10-02 00:41:03 +00:00
|
|
|
endif
|
|
|
|
|
2015-05-24 19:32:18 +00:00
|
|
|
ifeq ($(OBJC_RUNTIME_LIB), ng)
|
|
|
|
OBJC_LDFLAGS =
|
|
|
|
OBJC_LIB_DIR =
|
2018-07-09 14:17:49 +00:00
|
|
|
OBJC_LIBS = $(OBJC_LIB_FLAG)
|
|
|
|
ifeq ($(RUNTIME_VERSION),)
|
2019-12-03 21:47:54 +00:00
|
|
|
ifneq ($(DEFAULT_OBJC_RUNTIME_ABI),)
|
|
|
|
RUNTIME_VERSION=$(DEFAULT_OBJC_RUNTIME_ABI)
|
|
|
|
else
|
|
|
|
RUNTIME_VERSION=gnustep-1.8
|
|
|
|
endif
|
2018-07-09 14:17:49 +00:00
|
|
|
endif
|
|
|
|
RUNTIME_FLAG = -fobjc-runtime=$(RUNTIME_VERSION) -fblocks
|
2015-08-16 10:07:45 +00:00
|
|
|
RUNTIME_DEFINE = -DGNUSTEP_RUNTIME=1 -D_NONFRAGILE_ABI=1
|
2015-05-24 19:32:18 +00:00
|
|
|
endif
|
|
|
|
|
1997-10-02 00:41:03 +00:00
|
|
|
ifeq ($(OBJC_RUNTIME_LIB), nx)
|
2002-12-30 16:31:36 +00:00
|
|
|
RUNTIME_FLAG = -fnext-runtime
|
2000-12-05 16:11:55 +00:00
|
|
|
RUNTIME_DEFINE = -DNeXT_RUNTIME=1
|
2002-12-30 16:31:36 +00:00
|
|
|
ifeq ($(FOUNDATION_LIB), gnu)
|
2009-03-30 07:52:37 +00:00
|
|
|
OBJC_LIBS = $(OBJC_LIB_FLAG)
|
2001-09-11 21:52:35 +00:00
|
|
|
endif
|
1997-10-02 00:41:03 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(OBJC_RUNTIME_LIB), sun)
|
2000-12-05 16:11:55 +00:00
|
|
|
RUNTIME_DEFINE = -DSun_RUNTIME=1
|
1997-09-18 01:36:07 +00:00
|
|
|
endif
|
|
|
|
|
2002-12-30 16:31:36 +00:00
|
|
|
ifeq ($(OBJC_RUNTIME_LIB), apple)
|
|
|
|
RUNTIME_FLAG = -fnext-runtime
|
|
|
|
RUNTIME_DEFINE = -DNeXT_RUNTIME=1
|
2012-02-21 13:53:02 +00:00
|
|
|
OBJC_LIBS = $(OBJC_LIB_FLAG)
|
2002-12-30 16:31:36 +00:00
|
|
|
endif
|
|
|
|
|
1997-09-18 01:36:07 +00:00
|
|
|
FND_LDFLAGS =
|
|
|
|
FND_LIBS =
|
|
|
|
#
|
|
|
|
# Set the appropriate Foundation library
|
|
|
|
#
|
2016-03-02 12:05:34 +00:00
|
|
|
ifeq ($(FOUNDATION_LIB), gnu)
|
2002-11-15 20:14:59 +00:00
|
|
|
FOUNDATION_LIBRARY_NAME = gnustep-base
|
|
|
|
FOUNDATION_LIBRARY_DEFINE = -DGNUSTEP_BASE_LIBRARY=1
|
|
|
|
endif
|
2001-01-29 19:33:34 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Third-party foundations not using make package
|
|
|
|
# Our own foundation will install a base.make file into
|
|
|
|
# $GNUSTEP_MAKEFILES/Additional/ to set the needed flags
|
|
|
|
#
|
2002-12-30 16:31:36 +00:00
|
|
|
ifeq ($(FOUNDATION_LIB), nx)
|
2002-12-14 01:43:54 +00:00
|
|
|
# -framework Foundation is used both to find headers, and to link
|
|
|
|
INTERNAL_OBJCFLAGS += -framework Foundation
|
|
|
|
FND_LIBS = -framework Foundation
|
2001-01-29 19:33:34 +00:00
|
|
|
FND_DEFINE = -DNeXT_Foundation_LIBRARY=1
|
2002-12-20 16:31:37 +00:00
|
|
|
LIBRARIES_DEPEND_UPON += -framework Foundation
|
|
|
|
BUNDLE_LIBS += -framework Foundation
|
2001-01-29 19:33:34 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(FOUNDATION_LIB), sun)
|
|
|
|
FND_DEFINE = -DSun_Foundation_LIBRARY=1
|
1997-09-18 01:36:07 +00:00
|
|
|
endif
|
|
|
|
|
2002-12-30 16:31:36 +00:00
|
|
|
ifeq ($(FOUNDATION_LIB), apple)
|
2003-11-03 22:40:14 +00:00
|
|
|
# -framework Foundation is used only to link
|
2002-12-30 16:31:36 +00:00
|
|
|
FND_LIBS = -framework Foundation
|
|
|
|
FND_DEFINE = -DNeXT_Foundation_LIBRARY=1
|
|
|
|
LIBRARIES_DEPEND_UPON += -framework Foundation
|
|
|
|
endif
|
|
|
|
|
2001-01-29 19:33:34 +00:00
|
|
|
#
|
|
|
|
# FIXME - Ask Helge to move this inside his libFoundation, and have
|
|
|
|
# it installed as a $(GNUSTEP_MAKEFILES)/Additional/libFoundation.make
|
|
|
|
#
|
2016-03-02 12:05:34 +00:00
|
|
|
ifeq ($(FOUNDATION_LIB), fd)
|
2000-12-05 16:11:55 +00:00
|
|
|
-include $(GNUSTEP_MAKEFILES)/libFoundation.make
|
|
|
|
|
|
|
|
FND_DEFINE = -DLIB_FOUNDATION_LIBRARY=1
|
|
|
|
FND_LIBS = -lFoundation
|
|
|
|
|
|
|
|
ifeq ($(gc), yes)
|
|
|
|
ifeq ($(LIBFOUNDATION_WITH_GC), yes)
|
|
|
|
ifeq ($(leak), yes)
|
|
|
|
AUXILIARY_CPPFLAGS += -DLIB_FOUNDATION_LEAK_GC=1
|
|
|
|
else
|
|
|
|
AUXILIARY_CPPFLAGS += -DLIB_FOUNDATION_BOEHM_GC=1
|
|
|
|
endif
|
2000-06-13 15:14:23 +00:00
|
|
|
endif
|
1998-05-28 06:56:11 +00:00
|
|
|
endif
|
|
|
|
|
1997-09-18 01:36:07 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
GUI_LDFLAGS =
|
|
|
|
GUI_LIBS =
|
|
|
|
#
|
2001-01-29 19:33:34 +00:00
|
|
|
# Third-party GUI libraries - our own sets its flags into
|
|
|
|
# $(GNUSTEP_MAKEFILES)/Additional/gui.make
|
1997-09-18 01:36:07 +00:00
|
|
|
#
|
2002-12-30 16:31:36 +00:00
|
|
|
ifeq ($(GUI_LIB), nx)
|
|
|
|
GUI_DEFINE = -DNeXT_GUI_LIBRARY=1
|
2003-11-03 22:40:14 +00:00
|
|
|
# -framework AppKit is used both to find headers, and to link
|
2002-12-30 16:31:36 +00:00
|
|
|
INTERNAL_OBJCFLAGS += -framework AppKit
|
|
|
|
GUI_LIBS = -framework AppKit
|
|
|
|
LIBRARIES_DEPEND_UPON += -framework AppKit
|
|
|
|
BUNDLE_LIBS += -framework AppKit
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(GUI_LIB), apple)
|
2000-12-05 16:11:55 +00:00
|
|
|
GUI_DEFINE = -DNeXT_GUI_LIBRARY=1
|
2003-11-03 22:40:14 +00:00
|
|
|
# -framework AppKit is used only to link
|
2002-12-14 01:43:54 +00:00
|
|
|
GUI_LIBS = -framework AppKit
|
2002-12-20 16:31:37 +00:00
|
|
|
LIBRARIES_DEPEND_UPON += -framework AppKit
|
1997-09-26 01:16:38 +00:00
|
|
|
endif
|
|
|
|
|
2001-01-08 21:45:31 +00:00
|
|
|
SYSTEM_INCLUDES = $(CONFIG_SYSTEM_INCL)
|
2003-09-29 16:46:50 +00:00
|
|
|
SYSTEM_LDFLAGS = $(LDFLAGS)
|
2003-10-10 02:52:45 +00:00
|
|
|
SYSTEM_LIB_DIR = $(CONFIG_SYSTEM_LIB_DIR)
|
1997-09-18 01:36:07 +00:00
|
|
|
SYSTEM_LIBS =
|