2002-01-30 17:01:50 +00:00
|
|
|
#
|
|
|
|
# rules.make
|
|
|
|
#
|
|
|
|
# Makefile rules for the Instance invocation.
|
|
|
|
#
|
|
|
|
# Copyright (C) 1997, 2001, 2002 Free Software Foundation, Inc.
|
|
|
|
#
|
|
|
|
# Author: Scott Christley <scottc@net-community.com>
|
|
|
|
# Author: Ovidiu Predescu <ovidiu@net-community.com>
|
|
|
|
# Author: Nicola Pero <nicola@brainstorm.co.uk>
|
|
|
|
#
|
|
|
|
# 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
|
|
|
|
# as published by the Free Software Foundation; either version 2
|
|
|
|
# of the License, or (at your option) any later version.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public
|
|
|
|
# License along with this library; see the file COPYING.LIB.
|
|
|
|
# If not, write to the Free Software Foundation,
|
|
|
|
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
|
2002-02-28 13:09:11 +00:00
|
|
|
|
|
|
|
# Every project should have its internal-xxx-all depend first on
|
|
|
|
# before-$(GNUSTEP_INSTANCE)-all, and last on
|
|
|
|
# after-$(GNUSTEP_INSTANCE)-all. We declare them here, empty, so that
|
|
|
|
# the user can add them if he wants, but if he doesn't, make doesn't
|
|
|
|
# complain about missing targets.
|
|
|
|
|
2002-03-19 13:06:56 +00:00
|
|
|
# NB: internal-$(GNUSTEP_TYPE)-all_ should not be declared .PHONY
|
|
|
|
# here, because it's not implemented here. (example of how could go
|
|
|
|
# wrong otherwise: if say internal-clibrary-all_ depends on
|
|
|
|
# internal-library-all_, both of them should be declared .PHONY, while
|
|
|
|
# here we would only declare one of them .PHONY, so it should be done
|
|
|
|
# by the project specific makefile fragments).
|
|
|
|
.PHONY: \
|
|
|
|
before-$(GNUSTEP_INSTANCE)-all after-$(GNUSTEP_INSTANCE)-all \
|
|
|
|
internal-$(GNUSTEP_TYPE)-all \
|
|
|
|
before-$(GNUSTEP_INSTANCE)-install after-$(GNUSTEP_INSTANCE)-install \
|
|
|
|
internal-$(GNUSTEP_TYPE)-install \
|
|
|
|
before-$(GNUSTEP_INSTANCE)-uninstall after-$(GNUSTEP_INSTANCE)-uninstall \
|
|
|
|
internal-$(GNUSTEP_TYPE)-uninstall
|
2002-02-28 14:38:36 +00:00
|
|
|
|
2002-02-28 13:09:11 +00:00
|
|
|
before-$(GNUSTEP_INSTANCE)-all::
|
|
|
|
|
|
|
|
after-$(GNUSTEP_INSTANCE)-all::
|
|
|
|
|
2002-03-19 13:06:56 +00:00
|
|
|
# Automatically run before-$(GNUSTEP_INSTANCE)-all before building,
|
|
|
|
# and after-$(GNUSTEP_INSTANCE)-all after building.
|
|
|
|
# The project-type specific makefile instance fragment only needs to provide
|
|
|
|
# the internal-$(GNUSTEP_TYPE)-all_ rule.
|
|
|
|
internal-$(GNUSTEP_TYPE)-all:: before-$(GNUSTEP_INSTANCE)-all \
|
|
|
|
internal-$(GNUSTEP_TYPE)-all_ \
|
|
|
|
after-$(GNUSTEP_INSTANCE)-all
|
|
|
|
|
|
|
|
before-$(GNUSTEP_INSTANCE)-install::
|
|
|
|
|
|
|
|
after-$(GNUSTEP_INSTANCE)-install::
|
|
|
|
|
2002-05-21 16:13:22 +00:00
|
|
|
before-$(GNUSTEP_INSTANCE)-uninstall::
|
|
|
|
|
|
|
|
after-$(GNUSTEP_INSTANCE)-uninstall::
|
|
|
|
|
|
|
|
|
|
|
|
# By adding the line
|
|
|
|
# xxxx_STANDARD_INSTALL = no
|
|
|
|
# to your GNUmakefile, you can disable the standard installation code
|
|
|
|
# for a certain GNUSTEP_INSTANCE. This can be useful if you are
|
|
|
|
# installing manually in some other way (or for some other reason you
|
|
|
|
# don't want installation to be performed ever) and don't want the
|
|
|
|
# standard installation to be performed. Please note that
|
|
|
|
# before-xxx-install and after-xxx-install are still executed, so if
|
|
|
|
# you want, you can add your code in those targets to perform your
|
|
|
|
# custom installation.
|
|
|
|
|
|
|
|
ifeq ($($(GNUSTEP_INSTANCE)_STANDARD_INSTALL),no)
|
|
|
|
|
2002-03-19 13:06:56 +00:00
|
|
|
internal-$(GNUSTEP_TYPE)-install:: before-$(GNUSTEP_INSTANCE)-install \
|
|
|
|
after-$(GNUSTEP_INSTANCE)-install
|
2002-05-21 16:13:22 +00:00
|
|
|
@echo "Skipping standard installation of $(GNUSTEP_INSTANCE) as requested by makefile"
|
2002-03-19 13:06:56 +00:00
|
|
|
|
2002-05-21 16:13:22 +00:00
|
|
|
internal-$(GNUSTEP_TYPE)-uninstall:: before-$(GNUSTEP_INSTANCE)-uninstall \
|
|
|
|
after-$(GNUSTEP_INSTANCE)-uninstall
|
|
|
|
@echo "Skipping standard uninstallation of $(GNUSTEP_INSTANCE) as requested by makefile"
|
2002-03-19 13:06:56 +00:00
|
|
|
|
2002-05-21 16:13:22 +00:00
|
|
|
else
|
|
|
|
|
|
|
|
internal-$(GNUSTEP_TYPE)-install:: before-$(GNUSTEP_INSTANCE)-install \
|
|
|
|
internal-$(GNUSTEP_TYPE)-install_ \
|
|
|
|
after-$(GNUSTEP_INSTANCE)-install
|
2002-03-19 13:06:56 +00:00
|
|
|
|
|
|
|
internal-$(GNUSTEP_TYPE)-uninstall:: before-$(GNUSTEP_INSTANCE)-uninstall \
|
|
|
|
internal-$(GNUSTEP_TYPE)-uninstall_ \
|
|
|
|
after-$(GNUSTEP_INSTANCE)-uninstall
|
|
|
|
|
2002-05-21 16:13:22 +00:00
|
|
|
endif
|
2002-03-19 13:06:56 +00:00
|
|
|
|
|
|
|
# before-$(GNUSTEP_INSTANCE)-clean and similar for after and distclean
|
|
|
|
# are not supported -- they wouldn't be executed most of the times, since
|
|
|
|
# most of the times we don't perform an Instance invocation at all on
|
|
|
|
# make clean or make distclean.
|
|
|
|
|
2002-02-28 13:09:11 +00:00
|
|
|
|
2002-01-30 17:25:53 +00:00
|
|
|
#
|
|
|
|
# The list of Objective-C source files to be compiled
|
|
|
|
# are in the OBJC_FILES variable.
|
|
|
|
#
|
|
|
|
# The list of C source files to be compiled
|
|
|
|
# are in the C_FILES variable.
|
|
|
|
#
|
|
|
|
# The list of C++ source files to be compiled
|
|
|
|
# are in the CC_FILES variable.
|
|
|
|
#
|
|
|
|
# The list of PSWRAP source files to be compiled
|
|
|
|
# are in the PSWRAP_FILES variable.
|
|
|
|
#
|
|
|
|
# The list of JAVA source files to be compiled
|
|
|
|
# are in the JAVA_FILES variable.
|
|
|
|
#
|
|
|
|
# The list of JAVA source files from which to generate jni headers
|
|
|
|
# are in the JAVA_JNI_FILES variable.
|
|
|
|
#
|
|
|
|
|
|
|
|
#
|
|
|
|
# Please note the subtle difference:
|
|
|
|
#
|
|
|
|
# At `user' level (ie, in the user's GNUmakefile),
|
|
|
|
# the SUBPROJECTS variable is reserved for use with aggregate.make;
|
|
|
|
# the xxx_SUBPROJECTS variable is reserved for use with subproject.make.
|
|
|
|
#
|
|
|
|
# This separation *must* be enforced strictly, because nothing prevents
|
|
|
|
# a GNUmakefile from including both aggregate.make and subproject.make!
|
|
|
|
#
|
|
|
|
|
2002-01-30 20:50:39 +00:00
|
|
|
ifneq ($($(GNUSTEP_INSTANCE)_SUBPROJECTS),)
|
|
|
|
SUBPROJECT_OBJ_FILES = $(foreach d, $($(GNUSTEP_INSTANCE)_SUBPROJECTS), \
|
2002-01-30 17:25:53 +00:00
|
|
|
$(addprefix $(d)/, $(GNUSTEP_OBJ_DIR)/$(SUBPROJECT_PRODUCT)))
|
|
|
|
endif
|
|
|
|
|
2002-01-30 20:50:39 +00:00
|
|
|
OBJC_OBJS = $(patsubst %.m,%$(OEXT),$($(GNUSTEP_INSTANCE)_OBJC_FILES))
|
2002-01-30 17:25:53 +00:00
|
|
|
OBJC_OBJ_FILES = $(addprefix $(GNUSTEP_OBJ_DIR)/,$(OBJC_OBJS))
|
|
|
|
|
2002-01-30 20:50:39 +00:00
|
|
|
JAVA_OBJS = $(patsubst %.java,%.class,$($(GNUSTEP_INSTANCE)_JAVA_FILES))
|
2002-01-30 17:25:53 +00:00
|
|
|
JAVA_OBJ_FILES = $(JAVA_OBJS)
|
|
|
|
|
2002-02-08 14:41:09 +00:00
|
|
|
JAVA_JNI_OBJS = $(patsubst %.java,%.h,$($(GNUSTEP_INSTANCE)_JAVA_JNI_FILES))
|
2002-01-30 17:25:53 +00:00
|
|
|
JAVA_JNI_OBJ_FILES = $(JAVA_JNI_OBJS)
|
|
|
|
|
2002-01-30 20:50:39 +00:00
|
|
|
PSWRAP_C_FILES = $(patsubst %.psw,%.c,$($(GNUSTEP_INSTANCE)_PSWRAP_FILES))
|
|
|
|
PSWRAP_H_FILES = $(patsubst %.psw,%.h,$($(GNUSTEP_INSTANCE)_PSWRAP_FILES))
|
|
|
|
PSWRAP_OBJS = $(patsubst %.psw,%$(OEXT),$($(GNUSTEP_INSTANCE)_PSWRAP_FILES))
|
2002-01-30 17:25:53 +00:00
|
|
|
PSWRAP_OBJ_FILES = $(addprefix $(GNUSTEP_OBJ_DIR)/,$(PSWRAP_OBJS))
|
|
|
|
|
2002-01-30 20:50:39 +00:00
|
|
|
C_OBJS = $(patsubst %.c,%$(OEXT),$($(GNUSTEP_INSTANCE)_C_FILES))
|
2002-01-30 17:25:53 +00:00
|
|
|
C_OBJ_FILES = $(PSWRAP_OBJ_FILES) $(addprefix $(GNUSTEP_OBJ_DIR)/,$(C_OBJS))
|
|
|
|
|
|
|
|
# C++ files might end in .C, .cc, .cpp, .cxx, .cp so we replace multiple times
|
2002-01-30 20:50:39 +00:00
|
|
|
CC_OBJS = $(patsubst %.cc,%$(OEXT),\
|
|
|
|
$(patsubst %.C,%$(OEXT),\
|
|
|
|
$(patsubst %.cp,%$(OEXT),\
|
|
|
|
$(patsubst %.cpp,%$(OEXT),\
|
|
|
|
$(patsubst %.cxx,%$(OEXT),$($(GNUSTEP_INSTANCE)_CC_FILES))))))
|
2002-01-30 17:25:53 +00:00
|
|
|
CC_OBJ_FILES = $(addprefix $(GNUSTEP_OBJ_DIR)/,$(CC_OBJS))
|
|
|
|
|
2002-01-30 20:50:39 +00:00
|
|
|
OBJ_FILES = $($(GNUSTEP_INSTANCE)_OBJ_FILES)
|
|
|
|
|
2002-01-30 17:25:53 +00:00
|
|
|
# OBJ_FILES_TO_LINK is the set of all .o files which will be linked
|
|
|
|
# into the result - please note that you can add to OBJ_FILES_TO_LINK
|
|
|
|
# by defining manually some special xxx_OBJ_FILES for your
|
2002-05-23 11:26:10 +00:00
|
|
|
# tool/app/whatever. Strip the variable so that by comparing
|
|
|
|
# OBJ_FILES_TO_LINK to '' we know if there is a link stage to be
|
|
|
|
# performed at all (useful for example in bundles which can contain an
|
|
|
|
# object file, or not).
|
|
|
|
OBJ_FILES_TO_LINK = $(strip $(C_OBJ_FILES) $(OBJC_OBJ_FILES) $(CC_OBJ_FILES) $(SUBPROJECT_OBJ_FILES) $(OBJ_FILES))
|
2002-01-30 17:25:53 +00:00
|
|
|
|
|
|
|
ifeq ($(AUTO_DEPENDENCIES),yes)
|
|
|
|
ifneq ($(strip $(OBJ_FILES_TO_LINK)),)
|
|
|
|
-include $(addsuffix .d, $(basename $(OBJ_FILES_TO_LINK)))
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2002-01-30 17:01:50 +00:00
|
|
|
|
2002-03-07 16:20:00 +00:00
|
|
|
##
|
|
|
|
## Library and related special flags.
|
|
|
|
##
|
|
|
|
BUNDLE_LIBS += $($(GNUSTEP_INSTANCE)_BUNDLE_LIBS)
|
|
|
|
|
|
|
|
ADDITIONAL_INCLUDE_DIRS += $($(GNUSTEP_INSTANCE)_INCLUDE_DIRS)
|
|
|
|
|
|
|
|
ADDITIONAL_GUI_LIBS += $($(GNUSTEP_INSTANCE)_GUI_LIBS)
|
|
|
|
|
|
|
|
ADDITIONAL_TOOL_LIBS += $($(GNUSTEP_INSTANCE)_TOOL_LIBS)
|
|
|
|
|
|
|
|
ADDITIONAL_OBJC_LIBS += $($(GNUSTEP_INSTANCE)_OBJC_LIBS)
|
|
|
|
|
|
|
|
ADDITIONAL_LIBRARY_LIBS += $($(GNUSTEP_INSTANCE)_LIBS) \
|
|
|
|
$($(GNUSTEP_INSTANCE)_LIBRARY_LIBS)
|
|
|
|
|
|
|
|
ADDITIONAL_LIB_DIRS += $($(GNUSTEP_INSTANCE)_LIB_DIRS)
|
|
|
|
|
|
|
|
ADDITIONAL_LDFLAGS += $($(GNUSTEP_INSTANCE)_LDFLAGS)
|
|
|
|
|
|
|
|
ADDITIONAL_CLASSPATH += $($(GNUSTEP_INSTANCE)_CLASSPATH)
|
|
|
|
|
|
|
|
LIBRARIES_DEPEND_UPON += $($(GNUSTEP_INSTANCE)_LIBRARIES_DEPEND_UPON)
|
|
|
|
|
|
|
|
|
2002-01-30 17:01:50 +00:00
|
|
|
## Local variables:
|
|
|
|
## mode: makefile
|
|
|
|
## End:
|