mirror of
https://github.com/gnustep/tools-make.git
synced 2025-04-23 22:33:28 +00:00
Implemented xxx_NEEDS_GUI to control if we should be linking against gnustep-gui or not
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@26099 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
0167c6961b
commit
bf5b212e0e
15 changed files with 169 additions and 68 deletions
52
ChangeLog
52
ChangeLog
|
@ -1,3 +1,55 @@
|
|||
2008-02-19 Nicola Pero <nicola.pero@meta-innovation.com>
|
||||
|
||||
Implemented new variable xxx_NEEDS_GUI that can be used to
|
||||
explicitly require linking/not linking against the gui library.
|
||||
If xxx_NEEDS_GUI is not specified, the default behaviour is the
|
||||
traditional one, which depends on the project type: applications,
|
||||
bundles, frameworks, palettes and libraries link against the gui
|
||||
library if available; all other projects don't.
|
||||
* Instance/rules.make (NEEDS_GUI): New variable. Set it from
|
||||
xxx_NEEDS_GUI or DEFAULT_NEEDS_GUI. (ALL_LIBS): New variable
|
||||
listing all libraries to link against. Set it using NEEDS_GUI to
|
||||
decide if we should link against the gui or not.
|
||||
|
||||
* Instance/application.make (DEFAULT_NEEDS_GUI): Set to YES.
|
||||
(ALL_GUI_LIBS): Variable removed. Use ALL_LIBS when linking
|
||||
instead.
|
||||
* Instance/bundle.make (DEFAULT_NEEDS_GUI): Set to YES.
|
||||
(BUNDLE_LIBS): When linking against all libs, use ALL_LIBS.
|
||||
(ALL_BUNDLE_LIBS): Variable removed.
|
||||
* Instance/ctool.make (ALL_TOOL_LIBS): Variable renamed to
|
||||
ALL_LIBS. Separated out ALL_LIB_DIRS for consistency with other
|
||||
project types.
|
||||
* Instance/framework.make (DEFAULT_NEEDS_GUI): Set to YES.
|
||||
(LIBRARIES_DEPEND_UPON): When linking against all libs, use
|
||||
ALL_LIBS.
|
||||
* Instance/gswapp.make (DEFAULT_NEEDS_GUI): Set to NO.
|
||||
(ALL_GSW_LIBS): Use ALL_LIBS. Separated ALL_LIB_DIRS; pass it on
|
||||
the command-line.
|
||||
* Instance/gswbundle.make (DEFAULT_NEEDS_GUI): Set to NO.
|
||||
Pass ALL_LIB_DIRS separately from ALL_GSWBUNDLE_LIBS on the
|
||||
linker command-line.
|
||||
* Instance/library.make (DEFAULT_NEEDS_GUI): Set to YES.
|
||||
(LIBRARIES_DEPEND_UPON): When linking against all libs, use
|
||||
ALL_LIBS.
|
||||
* Instance/objc.make (ALL_OBJC_LIBS): Do not include ALL_LIB_DIRS;
|
||||
pass that variable separately on the link command line for
|
||||
consistency with other project types.
|
||||
* Instance/palette.make (DEFAULT_NEEDS_GUI): Set to YES.
|
||||
(PALETTE_LIBS): When linking against all libs, use ALL_LIBS.
|
||||
(ALL_PALETTE_LIBS): Variable removed. Pass ALL_LIB_DIRS and
|
||||
PALETTE_LIBS directly on the linker command-line.
|
||||
* Instance/tool.make (DEFAULT_NEEDS_GUI): Set to NO.
|
||||
(ALL_TOOL_LIBS): Do not define; use directly ALL_LIB_DIRS
|
||||
and ALL_LIBS when linking.
|
||||
|
||||
* target.make (BUNDLE_LINK_CMD): Replaced ALL_BUNDLE_LIBS
|
||||
with BUNDLE_LIBS and added ALL_LIB_DIRS which is no longer
|
||||
included in BUNDLE_LIBS.
|
||||
|
||||
* Documentation/releasenotes.texi: Added xxx_NEEDS_GUI.
|
||||
* RELEASENOTES: Regenerated.
|
||||
|
||||
2008-01-19 Adam Fedor <fedor@gnu.org>
|
||||
|
||||
* Master/source-distribution.make: Check for version directory
|
||||
|
|
|
@ -17,6 +17,17 @@ in addition to GNUstep.sh, please source it in your shell init script
|
|||
before or after sourcing GNUstep.sh. The same applies to
|
||||
~/GNUstep/GNUstep.csh.
|
||||
|
||||
@item xxx_NEEDS_GUI
|
||||
This new variable can be used to specify that a project needs to be
|
||||
linked against the gui library (or not). If set to YES, the gui
|
||||
library will be linked; if set to NO, the gui library will not be
|
||||
linked. If unspecified, the behaviour depends on the project type
|
||||
(and is backwards-compatible): applications, bundles, frameworks,
|
||||
palettes and libraries link automatically against the gui library;
|
||||
other project types do not. It is recommended that you set
|
||||
xxx_NEEDS_GUI for all bundles, frameworks and libraries to clarify how
|
||||
the linking should be done.
|
||||
|
||||
@end table
|
||||
|
||||
@section Version 2.0.0
|
||||
|
|
|
@ -21,6 +21,9 @@
|
|||
# If not, write to the Free Software Foundation,
|
||||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
# Applications usually link against a gui library (if available).
|
||||
DEFAULT_NEEDS_GUI = YES
|
||||
|
||||
#
|
||||
# Include in the common makefile rules
|
||||
#
|
||||
|
@ -58,13 +61,6 @@ ifeq ($(APP_INSTALL_DIR),)
|
|||
APP_INSTALL_DIR = $(GNUSTEP_APPS)
|
||||
endif
|
||||
|
||||
ALL_GUI_LIBS = \
|
||||
$(ALL_LIB_DIRS) \
|
||||
$(ADDITIONAL_GUI_LIBS) $(AUXILIARY_GUI_LIBS) $(GUI_LIBS) \
|
||||
$(BACKEND_LIBS) $(ADDITIONAL_TOOL_LIBS) $(AUXILIARY_TOOL_LIBS) \
|
||||
$(FND_LIBS) $(ADDITIONAL_OBJC_LIBS) $(AUXILIARY_OBJC_LIBS) $(OBJC_LIBS) \
|
||||
$(SYSTEM_LIBS) $(TARGET_SYSTEM_LIBS)
|
||||
|
||||
APP_DIR_NAME = $(GNUSTEP_INSTANCE:=.$(APP_EXTENSION))
|
||||
APP_DIR = $(GNUSTEP_BUILD_DIR)/$(APP_DIR_NAME)
|
||||
|
||||
|
@ -124,7 +120,7 @@ endif
|
|||
|
||||
$(APP_FILE): $(OBJ_FILES_TO_LINK)
|
||||
$(ECHO_LINKING)$(LD) $(ALL_LDFLAGS) $(CC_LDFLAGS) -o $(LDOUT)$@ \
|
||||
$(OBJ_FILES_TO_LINK) $(ALL_GUI_LIBS)$(END_ECHO)
|
||||
$(OBJ_FILES_TO_LINK) $(ALL_LIB_DIRS) $(ALL_LIBS)$(END_ECHO)
|
||||
|
||||
#
|
||||
# Compilation targets
|
||||
|
|
|
@ -21,6 +21,10 @@
|
|||
# If not, write to the Free Software Foundation,
|
||||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
# Bundles usually link against a gui library (if available). If you
|
||||
# don't need a gui library, use xxx_NEEDS_GUI = NO.
|
||||
DEFAULT_NEEDS_GUI = YES
|
||||
|
||||
ifeq ($(RULES_MAKE_LOADED),)
|
||||
include $(GNUSTEP_MAKEFILES)/rules.make
|
||||
endif
|
||||
|
@ -71,18 +75,11 @@ ifeq ($(CC_BUNDLE), yes)
|
|||
endif
|
||||
|
||||
ifeq ($(LINK_BUNDLE_AGAINST_ALL_LIBS), yes)
|
||||
BUNDLE_LIBS += $(ADDITIONAL_GUI_LIBS) $(AUXILIARY_GUI_LIBS) $(BACKEND_LIBS) \
|
||||
$(GUI_LIBS) $(ADDITIONAL_TOOL_LIBS) $(AUXILIARY_TOOL_LIBS) \
|
||||
$(FND_LIBS) $(ADDITIONAL_OBJC_LIBS) $(AUXILIARY_OBJC_LIBS) $(OBJC_LIBS) \
|
||||
$(SYSTEM_LIBS) $(TARGET_SYSTEM_LIBS)
|
||||
BUNDLE_LIBS += $(ALL_LIBS)
|
||||
endif
|
||||
|
||||
ALL_BUNDLE_LIBS = \
|
||||
$(ALL_LIB_DIRS) \
|
||||
$(BUNDLE_LIBS)
|
||||
|
||||
ifeq ($(BUILD_DLL),yes)
|
||||
BUNDLE_OBJ_EXT = $(DLL_LIBEXT)
|
||||
BUNDLE_OBJ_EXT = $(DLL_LIBEXT)
|
||||
endif
|
||||
|
||||
endif # OBJ_FILES_TO_LINK
|
||||
|
|
|
@ -52,8 +52,8 @@ endif
|
|||
internal-ctool-install_ \
|
||||
internal-ctool-uninstall_
|
||||
|
||||
ALL_TOOL_LIBS = \
|
||||
$(ALL_LIB_DIRS) \
|
||||
# Override the default with just the minimal C libs required to link
|
||||
ALL_LIBS = \
|
||||
$(ADDITIONAL_TOOL_LIBS) $(AUXILIARY_TOOL_LIBS) \
|
||||
$(TARGET_SYSTEM_LIBS)
|
||||
|
||||
|
@ -66,7 +66,7 @@ internal-ctool-all_:: $(GNUSTEP_OBJ_DIR) \
|
|||
$(GNUSTEP_OBJ_DIR)/$(GNUSTEP_INSTANCE)$(EXEEXT): $(OBJ_FILES_TO_LINK)
|
||||
$(ECHO_LINKING)$(LD) $(ALL_LDFLAGS) -o $(LDOUT)$@ \
|
||||
$(OBJ_FILES_TO_LINK) \
|
||||
$(ALL_TOOL_LIBS)$(END_ECHO)
|
||||
$(ALL_LIB_DIRS) $(ALL_LIBS)$(END_ECHO)
|
||||
|
||||
internal-ctool-install_:: $(CTOOL_INSTALL_DIR)/$(GNUSTEP_TARGET_DIR)
|
||||
$(ECHO_INSTALLING)$(INSTALL_PROGRAM) -m 0755 \
|
||||
|
|
|
@ -20,6 +20,10 @@
|
|||
# If not, write to the Free Software Foundation,
|
||||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
# Frameworks usually link against a gui library (if available). If
|
||||
# you don't need a gui library, use xxx_NEEDS_GUI = NO.
|
||||
DEFAULT_NEEDS_GUI = YES
|
||||
|
||||
ifeq ($(RULES_MAKE_LOADED),)
|
||||
include $(GNUSTEP_MAKEFILES)/rules.make
|
||||
endif
|
||||
|
@ -168,14 +172,9 @@ ifeq ($(BUILD_DLL), yes)
|
|||
endif
|
||||
|
||||
ifeq ($(LINK_AGAINST_ALL_LIBS), yes)
|
||||
# Link against all libs ... but not the one we're compiling! (not sure
|
||||
# when this could happen with frameworks, anyway it makes sense)
|
||||
LIBRARIES_DEPEND_UPON += $(filter-out -l$(GNUSTEP_INSTANCE), \
|
||||
$(ADDITIONAL_GUI_LIBS) $(AUXILIARY_GUI_LIBS) \
|
||||
$(BACKEND_LIBS) \
|
||||
$(GUI_LIBS) $(ADDITIONAL_TOOL_LIBS) $(AUXILIARY_TOOL_LIBS) \
|
||||
$(FND_LIBS) $(ADDITIONAL_OBJC_LIBS) $(AUXILIARY_OBJC_LIBS) $(OBJC_LIBS) \
|
||||
$(SYSTEM_LIBS) $(TARGET_SYSTEM_LIBS))
|
||||
# Link against all libs ... but not the one we're compiling! (not sure
|
||||
# when this could happen with frameworks, anyway it makes sense)
|
||||
LIBRARIES_DEPEND_UPON += $(filter-out -l$(GNUSTEP_INSTANCE), $(ALL_LIBS))
|
||||
endif
|
||||
|
||||
INTERNAL_LIBRARIES_DEPEND_UPON = \
|
||||
|
|
|
@ -23,6 +23,8 @@
|
|||
# If not, write to the Free Software Foundation,
|
||||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
DEFAULT_NEEDS_GUI = NO
|
||||
|
||||
ifeq ($(RULES_MAKE_LOADED),)
|
||||
include $(GNUSTEP_MAKEFILES)/rules.make
|
||||
endif
|
||||
|
@ -69,11 +71,8 @@ endif
|
|||
|
||||
# Libraries that go before the WO libraries
|
||||
ALL_GSW_LIBS = \
|
||||
$(ALL_LIB_DIRS) \
|
||||
$(ADDITIONAL_GSW_LIBS) $(AUXILIARY_GSW_LIBS) $(GSW_LIBS) \
|
||||
$(ADDITIONAL_TOOL_LIBS) $(AUXILIARY_TOOL_LIBS) \
|
||||
$(FND_LIBS) $(ADDITIONAL_OBJC_LIBS) $(AUXILIARY_OBJC_LIBS) \
|
||||
$(OBJC_LIBS) $(SYSTEM_LIBS) $(TARGET_SYSTEM_LIBS)
|
||||
$(ALL_LIBS)
|
||||
|
||||
GSWAPP_DIR_NAME = $(GNUSTEP_INSTANCE:=.$(GSWAPP_EXTENSION))
|
||||
GSWAPP_DIR = $(GNUSTEP_BUILD_DIR)/$(GSWAPP_DIR_NAME)
|
||||
|
@ -110,7 +109,7 @@ GSWAPP_FILE = $(GNUSTEP_BUILD_DIR)/$(GSWAPP_FILE_NAME)
|
|||
|
||||
$(GSWAPP_FILE): $(OBJ_FILES_TO_LINK)
|
||||
$(ECHO_LINKING)$(LD) $(ALL_LDFLAGS) $(CC_LDFLAGS) -o $(LDOUT)$@ \
|
||||
$(OBJ_FILES_TO_LINK) $(ALL_GSW_LIBS)$(END_ECHO)
|
||||
$(OBJ_FILES_TO_LINK) $(ALL_LIB_DIRS) $(ALL_GSW_LIBS)$(END_ECHO)
|
||||
|
||||
#
|
||||
# Compilation targets
|
||||
|
|
|
@ -21,6 +21,8 @@
|
|||
# If not, write to the Free Software Foundation,
|
||||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
DEFAULT_NEEDS_GUI = NO
|
||||
|
||||
ifeq ($(RULES_MAKE_LOADED),)
|
||||
include $(GNUSTEP_MAKEFILES)/rules.make
|
||||
endif
|
||||
|
@ -83,12 +85,7 @@ endif
|
|||
|
||||
# On Solaris we don't need to specifies the libraries the bundle needs.
|
||||
# How about the rest of the systems? ALL_BUNDLE_LIBS is temporary empty.
|
||||
#ALL_GSWBUNDLE_LIBS = $(ADDITIONAL_GSW_LIBS) $(AUXILIARY_GSW_LIBS) $(GSW_LIBS) \
|
||||
$(ADDITIONAL_TOOL_LIBS) $(AUXILIARY_TOOL_LIBS) \
|
||||
$(FND_LIBS) $(ADDITIONAL_OBJC_LIBS) $(AUXILIARY_OBJC_LIBS) \
|
||||
$(OBJC_LIBS) $(SYSTEM_LIBS) $(TARGET_SYSTEM_LIBS)
|
||||
#ALL_GSWBUNDLE_LIBS =
|
||||
#ALL_GSWBUNDLE_LIBS = $(ALL_LIB_DIRS) $(ALL_GSWBUNDLE_LIBS)
|
||||
#ALL_GSWBUNDLE_LIBS = $(ADDITIONAL_GSW_LIBS) $(AUXILIARY_GSW_LIBS) $(GSW_LIBS) $(ALL_LIBS)
|
||||
|
||||
internal-gswbundle-all_:: $(GNUSTEP_OBJ_DIR) \
|
||||
build-bundle-dir \
|
||||
|
@ -129,7 +126,7 @@ $(GSWBUNDLE_FILE) : $(OBJ_FILES_TO_LINK)
|
|||
$(ECHO_LINKING)$(GSWBUNDLE_LD) $(GSWBUNDLE_LDFLAGS) \
|
||||
$(ALL_LDFLAGS) -o $(LDOUT)$(GSWBUNDLE_FILE) \
|
||||
$(OBJ_FILES_TO_LINK) \
|
||||
$(ALL_GSWBUNDLE_LIBS)$(END_ECHO)
|
||||
$(ALL_LIB_DIRS) $(ALL_GSWBUNDLE_LIBS)$(END_ECHO)
|
||||
|
||||
gswbundle-components: $(GSWBUNDLE_DIR)
|
||||
ifneq ($(strip $(COMPONENTS)),)
|
||||
|
|
|
@ -21,6 +21,10 @@
|
|||
# If not, write to the Free Software Foundation,
|
||||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
# Libraries usually link against a gui library (if available). If you
|
||||
# don't need a gui library, use xxx_NEEDS_GUI = NO.
|
||||
DEFAULT_NEEDS_GUI = YES
|
||||
|
||||
ifeq ($(RULES_MAKE_LOADED),)
|
||||
include $(GNUSTEP_MAKEFILES)/rules.make
|
||||
endif
|
||||
|
@ -109,14 +113,9 @@ ifeq ($(BUILD_DLL), yes)
|
|||
endif
|
||||
|
||||
ifeq ($(LINK_AGAINST_ALL_LIBS), yes)
|
||||
# Link against all libs ... but not the one we're compiling! (this can
|
||||
# happen, for example, with gnustep-gui)
|
||||
LIBRARIES_DEPEND_UPON += $(filter-out -l$(LIBRARY_NAME_WITHOUT_LIB), \
|
||||
$(ADDITIONAL_GUI_LIBS) $(AUXILIARY_GUI_LIBS) \
|
||||
$(BACKEND_LIBS) \
|
||||
$(GUI_LIBS) $(ADDITIONAL_TOOL_LIBS) $(AUXILIARY_TOOL_LIBS) \
|
||||
$(FND_LIBS) $(ADDITIONAL_OBJC_LIBS) $(AUXILIARY_OBJC_LIBS) $(OBJC_LIBS) \
|
||||
$(SYSTEM_LIBS) $(TARGET_SYSTEM_LIBS))
|
||||
# Link against all libs ... but not the one we're compiling! (this can
|
||||
# happen, for example, with gnustep-gui)
|
||||
LIBRARIES_DEPEND_UPON += $(filter-out -l$(LIBRARY_NAME_WITHOUT_LIB), $(ALL_LIBS))
|
||||
endif
|
||||
|
||||
INTERNAL_LIBRARIES_DEPEND_UPON = \
|
||||
|
|
|
@ -46,7 +46,6 @@ OBJC_PROGRAM_INSTALL_DIR = $(GNUSTEP_TOOLS)
|
|||
endif
|
||||
|
||||
ALL_OBJC_LIBS = \
|
||||
$(ALL_LIB_DIRS) \
|
||||
$(ADDITIONAL_OBJC_LIBS) $(AUXILIARY_OBJC_LIBS) $(OBJC_LIBS) \
|
||||
$(TARGET_SYSTEM_LIBS)
|
||||
|
||||
|
@ -56,7 +55,7 @@ internal-objc_program-all_:: \
|
|||
|
||||
$(GNUSTEP_OBJ_DIR)/$(GNUSTEP_INSTANCE)$(EXEEXT): $(OBJ_FILES_TO_LINK)
|
||||
$(ECHO_LINKING)$(LD) $(ALL_LDFLAGS) $(CC_LDFLAGS) -o $(LDOUT)$@ \
|
||||
$(OBJ_FILES_TO_LINK) $(ALL_OBJC_LIBS)$(END_ECHO)
|
||||
$(OBJ_FILES_TO_LINK) $(ALL_LIB_DIRS) $(ALL_OBJC_LIBS)$(END_ECHO)
|
||||
|
||||
internal-objc_program-install_:: $(OBJC_PROGRAM_INSTALL_DIR)/$(GNUSTEP_TARGET_LDIR)
|
||||
$(ECHO_INSTALLING)$(INSTALL_PROGRAM) -m 0755 \
|
||||
|
|
|
@ -22,6 +22,9 @@
|
|||
# If not, write to the Free Software Foundation,
|
||||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
# Palettes usually link against a gui library (if available).
|
||||
DEFAULT_NEEDS_GUI = YES
|
||||
|
||||
ifeq ($(RULES_MAKE_LOADED),)
|
||||
include $(GNUSTEP_MAKEFILES)/rules.make
|
||||
endif
|
||||
|
@ -55,16 +58,9 @@ ifeq ($(CC_BUNDLE), yes)
|
|||
endif
|
||||
|
||||
ifeq ($(LINK_PALETTE_AGAINST_ALL_LIBS), yes)
|
||||
PALETTE_LIBS += $(ADDITIONAL_GUI_LIBS) $(AUXILIARY_GUI_LIBS) $(BACKEND_LIBS) \
|
||||
$(GUI_LIBS) $(ADDITIONAL_TOOL_LIBS) $(AUXILIARY_TOOL_LIBS) \
|
||||
$(FND_LIBS) $(ADDITIONAL_OBJC_LIBS) $(AUXILIARY_OBJC_LIBS) $(OBJC_LIBS) \
|
||||
$(SYSTEM_LIBS) $(TARGET_SYSTEM_LIBS)
|
||||
PALETTE_LIBS += $(ALL_LIBS)
|
||||
endif
|
||||
|
||||
ALL_PALETTE_LIBS = \
|
||||
$(ALL_LIB_DIRS) \
|
||||
$(PALETTE_LIBS)
|
||||
|
||||
ifeq ($(BUILD_DLL),yes)
|
||||
PALETTE_OBJ_EXT = $(DLL_LIBEXT)
|
||||
endif
|
||||
|
@ -105,7 +101,7 @@ $(PALETTE_FILE) : $(OBJ_FILES_TO_LINK)
|
|||
$(ECHO_LINKING)$(BUNDLE_LD) $(BUNDLE_LDFLAGS) \
|
||||
-o $(LDOUT)$(PALETTE_FILE) \
|
||||
$(OBJ_FILES_TO_LINK) $(ALL_LDFLAGS) \
|
||||
$(BUNDLE_LIBFLAGS) $(ALL_PALETTE_LIBS)$(END_ECHO)
|
||||
$(BUNDLE_LIBFLAGS) $(ALL_LIB_DIRS) $(PALETTE_LIBS)$(END_ECHO)
|
||||
|
||||
PRINCIPAL_CLASS = $(strip $($(GNUSTEP_INSTANCE)_PRINCIPAL_CLASS))
|
||||
|
||||
|
|
|
@ -362,3 +362,51 @@ ADDITIONAL_CLASSPATH += $($(GNUSTEP_INSTANCE)_CLASSPATH)
|
|||
|
||||
LIBRARIES_DEPEND_UPON += $($(GNUSTEP_INSTANCE)_LIBRARIES_DEPEND_UPON)
|
||||
|
||||
# You can control whether you want to link against the gui library
|
||||
# by using one of the two commands --
|
||||
# xxx_NEEDS_GUI = YES
|
||||
# xxx_NEEDS_GUI = NO
|
||||
# (where 'xxx' is the name of your application/bundle/etc.)
|
||||
#
|
||||
# If you don't specify anything, the default for the project type
|
||||
# will be used (this is the DEFAULT_NEEDS_GUI = YES/NO that is
|
||||
# at the top of all project types).
|
||||
#
|
||||
# If the project type doesn't specify anything (eg, doesn't need
|
||||
# linking to ObjC libraries, or it is buggy/old or it is from a
|
||||
# third-party and hasn't been updated yet) then the default is NO.
|
||||
|
||||
NEEDS_GUI = $($(GNUSTEP_INSTANCE)_NEEDS_GUI)
|
||||
|
||||
ifeq ($(NEEDS_GUI),)
|
||||
|
||||
NEEDS_GUI = $(DEFAULT_NEEDS_GUI)
|
||||
|
||||
ifeq ($(NEEDS_GUI),)
|
||||
NEEDS_GUI = NO
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
# Now we prepare a variable, ALL_LIBS, containing the list of all LIBS
|
||||
# that should be used when linking. This is different depending on
|
||||
# whether we need to link against the gui library or not.
|
||||
ifeq ($(NEEDS_GUI), YES)
|
||||
# Please note that you usually need to add ALL_LIB_DIRS before
|
||||
# ALL_LIBS when linking. It's kept separate because sometimes (eg,
|
||||
# bundles) we only use ALL_LIB_DIRS and not ALL_LIBS (not sure how
|
||||
# useful ALL_LIB_DIRS would be without ALL_LIBS, anyway touching flags
|
||||
# is dangerous as things might stop compiling for some people who
|
||||
# were relying on the old behaviour)
|
||||
ALL_LIBS = \
|
||||
$(ADDITIONAL_GUI_LIBS) $(AUXILIARY_GUI_LIBS) $(GUI_LIBS) \
|
||||
$(BACKEND_LIBS) $(ADDITIONAL_TOOL_LIBS) $(AUXILIARY_TOOL_LIBS) \
|
||||
$(FND_LIBS) $(ADDITIONAL_OBJC_LIBS) $(AUXILIARY_OBJC_LIBS) $(OBJC_LIBS) \
|
||||
$(SYSTEM_LIBS) $(TARGET_SYSTEM_LIBS)
|
||||
else
|
||||
ALL_LIBS = \
|
||||
$(ADDITIONAL_TOOL_LIBS) $(AUXILIARY_TOOL_LIBS) \
|
||||
$(FND_LIBS) $(ADDITIONAL_OBJC_LIBS) $(AUXILIARY_OBJC_LIBS) $(OBJC_LIBS) \
|
||||
$(SYSTEM_LIBS) $(TARGET_SYSTEM_LIBS)
|
||||
endif
|
||||
|
||||
|
|
|
@ -20,6 +20,9 @@
|
|||
# If not, write to the Free Software Foundation,
|
||||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
# Tools don't link against gui by default
|
||||
DEFAULT_NEEDS_GUI = NO
|
||||
|
||||
#
|
||||
# The name of the tools is in the TOOL_NAME variable.
|
||||
#
|
||||
|
@ -52,12 +55,6 @@ ifeq ($(FINAL_TOOL_INSTALL_DIR),)
|
|||
FINAL_TOOL_INSTALL_DIR = $(TOOL_INSTALL_DIR)/$(GNUSTEP_TARGET_LDIR)
|
||||
endif
|
||||
|
||||
ALL_TOOL_LIBS = \
|
||||
$(ALL_LIB_DIRS) \
|
||||
$(ADDITIONAL_TOOL_LIBS) $(AUXILIARY_TOOL_LIBS) $(FND_LIBS) \
|
||||
$(ADDITIONAL_OBJC_LIBS) $(AUXILIARY_OBJC_LIBS) $(OBJC_LIBS) \
|
||||
$(TARGET_SYSTEM_LIBS)
|
||||
|
||||
#
|
||||
# Compilation targets
|
||||
#
|
||||
|
@ -67,7 +64,7 @@ internal-tool-all_:: $(GNUSTEP_OBJ_DIR) \
|
|||
$(GNUSTEP_OBJ_DIR)/$(GNUSTEP_INSTANCE)$(EXEEXT): $(OBJ_FILES_TO_LINK)
|
||||
$(ECHO_LINKING)$(LD) $(ALL_LDFLAGS) $(CC_LDFLAGS) -o $(LDOUT)$@ \
|
||||
$(OBJ_FILES_TO_LINK) \
|
||||
$(ALL_TOOL_LIBS)$(END_ECHO)
|
||||
$(ALL_LIB_DIRS) $(ALL_LIBS)$(END_ECHO)
|
||||
|
||||
internal-tool-copy_into_dir::
|
||||
$(ECHO_COPYING_INTO_DIR)$(MKDIRS) $(COPY_INTO_DIR)/$(GNUSTEP_TARGET_LDIR);\
|
||||
|
|
11
RELEASENOTES
11
RELEASENOTES
|
@ -17,6 +17,17 @@ using a newer version of the make system.
|
|||
shell init script before or after sourcing GNUstep.sh. The same
|
||||
applies to ~/GNUstep/GNUstep.csh.
|
||||
|
||||
`xxx_NEEDS_GUI'
|
||||
This new variable can be used to specify that a project needs to be
|
||||
linked against the gui library (or not). If set to YES, the gui
|
||||
library will be linked; if set to NO, the gui library will not be
|
||||
linked. If unspecified, the behaviour depends on the project type
|
||||
(and is backwards-compatible): applications, bundles, frameworks,
|
||||
palettes and libraries link automatically against the gui library;
|
||||
other project types do not. It is recommended that you set
|
||||
xxx_NEEDS_GUI for all bundles, frameworks and libraries to clarify
|
||||
how the linking should be done.
|
||||
|
||||
|
||||
1.2 Version 2.0.0
|
||||
=================
|
||||
|
|
|
@ -173,7 +173,7 @@ AFTER_INSTALL_SHARED_LIB_CHOWN = \
|
|||
HAVE_BUNDLES = no
|
||||
BUNDLE_LINK_CMD = $(BUNDLE_LD) $(BUNDLE_LDFLAGS) $(ALL_LDFLAGS) \
|
||||
-o $(LDOUT)$(BUNDLE_FILE) $(OBJ_FILES_TO_LINK) \
|
||||
$(ALL_BUNDLE_LIBS)
|
||||
$(ALL_LIB_DIRS) $(BUNDLE_LIBS)
|
||||
|
||||
####################################################
|
||||
#
|
||||
|
@ -962,7 +962,7 @@ BUNDLE_LINK_CMD = \
|
|||
$(BUNDLE_LD) $(BUNDLE_LDFLAGS) $(ALL_LDFLAGS) \
|
||||
-o $(LDOUT)$(BUNDLE_FILE) \
|
||||
$(OBJ_FILES_TO_LINK) \
|
||||
$(BUNDLE_LIBFLAGS) $(ALL_BUNDLE_LIBS); \
|
||||
$(BUNDLE_LIBFLAGS) $(ALL_LIB_DIRS) $(BUNDLE_LIBS); \
|
||||
$(REBASE) $(REBASE_FLAGS) $(BUNDLE_FILE)
|
||||
endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue