2002-11-06 13:26:36 +00:00
|
|
|
# -*-makefile-*-
|
2002-02-27 16:55:40 +00:00
|
|
|
# Instance/subproject.make
|
|
|
|
#
|
|
|
|
# Instance Makefile rules to build subprojects in GNUstep projects.
|
|
|
|
#
|
|
|
|
# Copyright (C) 1998, 2001 Free Software Foundation, Inc.
|
|
|
|
#
|
|
|
|
# Author: Jonathan Gapen <jagapen@whitewater.chem.wisc.edu>
|
|
|
|
# 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
|
2007-11-07 18:56:37 +00:00
|
|
|
# as published by the Free Software Foundation; either version 3
|
2002-02-27 16:55:40 +00:00
|
|
|
# of the License, or (at your option) any later version.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public
|
2007-11-07 18:56:37 +00:00
|
|
|
# License along with this library; see the file COPYING.
|
2002-02-27 16:55:40 +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.
|
2002-02-27 16:55:40 +00:00
|
|
|
|
|
|
|
ifeq ($(RULES_MAKE_LOADED),)
|
|
|
|
include $(GNUSTEP_MAKEFILES)/rules.make
|
|
|
|
endif
|
|
|
|
|
2002-03-19 13:06:56 +00:00
|
|
|
.PHONY: internal-subproject-all_ \
|
|
|
|
internal-subproject-install_ \
|
|
|
|
internal-subproject-uninstall_
|
2002-02-27 16:55:40 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Compilation targets
|
|
|
|
#
|
2002-03-19 13:06:56 +00:00
|
|
|
internal-subproject-all_:: $(GNUSTEP_OBJ_DIR) \
|
2002-09-27 01:31:40 +00:00
|
|
|
$(GNUSTEP_OBJ_DIR)/$(SUBPROJECT_PRODUCT)
|
2002-02-27 16:55:40 +00:00
|
|
|
|
|
|
|
# We need to depend on SUBPROJECT_OBJ_FILES to account for sub-subprojects.
|
|
|
|
$(GNUSTEP_OBJ_DIR)/$(SUBPROJECT_PRODUCT): $(OBJ_FILES_TO_LINK)
|
2002-06-13 16:19:23 +00:00
|
|
|
$(ECHO_LINKING)$(OBJ_MERGE_CMD)$(END_ECHO)
|
2002-02-27 16:55:40 +00:00
|
|
|
|
2002-03-05 15:51:49 +00:00
|
|
|
#
|
|
|
|
# Build-header target for framework subprojects
|
|
|
|
#
|
2003-10-13 23:25:23 +00:00
|
|
|
# If we are called with OWNING_PROJECT_HEADER_DIR_NAME which is not empty,
|
2002-11-06 13:26:36 +00:00
|
|
|
# we need to copy our headers into that directory during the
|
|
|
|
# build-headers stage, and to disable installation/uninstallation of
|
|
|
|
# headers.
|
|
|
|
#
|
2003-10-13 23:25:23 +00:00
|
|
|
ifneq ($(OWNING_PROJECT_HEADER_DIR_NAME),)
|
2002-03-05 15:51:49 +00:00
|
|
|
.PHONY: internal-subproject-build-headers
|
|
|
|
|
2003-10-13 23:25:23 +00:00
|
|
|
OWNING_PROJECT_HEADER_DIR = $(GNUSTEP_BUILD_DIR)/$(OWNING_PROJECT_HEADER_DIR_NAME)
|
2002-03-05 15:51:49 +00:00
|
|
|
HEADER_FILES = $($(GNUSTEP_INSTANCE)_HEADER_FILES)
|
2002-11-06 13:26:36 +00:00
|
|
|
OWNING_PROJECT_HEADER_FILES = $(patsubst %.h,$(OWNING_PROJECT_HEADER_DIR)/%.h,$(HEADER_FILES))
|
2002-02-27 16:55:40 +00:00
|
|
|
|
2002-11-06 13:26:36 +00:00
|
|
|
internal-subproject-build-headers:: $(OWNING_PROJECT_HEADER_FILES)
|
2002-02-27 16:55:40 +00:00
|
|
|
|
2002-11-06 13:26:36 +00:00
|
|
|
# We need to build the OWNING_PROJECT_HEADER_DIR directory here
|
|
|
|
# because this rule could be executed before the top-level framework
|
|
|
|
# has built his dirs
|
2006-03-07 20:21:29 +00:00
|
|
|
$(OWNING_PROJECT_HEADER_DIR)/%.h: %.h $(OWNING_PROJECT_HEADER_DIR)
|
|
|
|
$(ECHO_NOTHING)$(INSTALL_DATA) $< $@$(END_ECHO)
|
2002-02-27 16:55:40 +00:00
|
|
|
|
2002-11-06 13:26:36 +00:00
|
|
|
$(OWNING_PROJECT_HEADER_DIR):
|
2003-05-27 10:19:06 +00:00
|
|
|
$(ECHO_CREATING)$(MKDIRS) $@$(END_ECHO)
|
2002-02-27 16:55:40 +00:00
|
|
|
|
2002-11-06 13:26:36 +00:00
|
|
|
# End FRAMEWORK code
|
|
|
|
else
|
|
|
|
# Start no FRAMEWORK code
|
2002-02-27 16:55:40 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Installation targets - we only need to install headers and only
|
|
|
|
# if this is not in a framework
|
|
|
|
#
|
|
|
|
|
2002-03-01 12:42:59 +00:00
|
|
|
include $(GNUSTEP_MAKEFILES)/Instance/Shared/headers.make
|
2002-02-27 16:55:40 +00:00
|
|
|
|
2002-03-19 13:06:56 +00:00
|
|
|
internal-subproject-install_:: shared-instance-headers-install
|
2002-02-27 16:55:40 +00:00
|
|
|
|
2002-03-19 13:06:56 +00:00
|
|
|
internal-subproject-uninstall_:: shared-instance-headers-uninstall
|
2002-02-27 16:55:40 +00:00
|
|
|
|
2002-11-06 13:26:36 +00:00
|
|
|
endif # no FRAMEWORK
|
2002-02-27 16:55:40 +00:00
|
|
|
|
2002-09-27 01:31:40 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# A subproject can have resources, which it stores into the
|
|
|
|
# Resources/Subproject directory. If you want your subproject
|
|
|
|
# to have resources, you need to put
|
|
|
|
# xxx_HAS_RESOURCE_BUNDLE = yes
|
|
|
|
# in your GNUmakefile. The project which owns us can then
|
|
|
|
# copy recursively this directory into its own Resources directory
|
|
|
|
# (that is done automatically if the project uses
|
|
|
|
# Instance/Shared/bundle.make to manage its own resource bundle)
|
|
|
|
#
|
|
|
|
ifeq ($($(GNUSTEP_INSTANCE)_HAS_RESOURCE_BUNDLE), yes)
|
|
|
|
|
2006-09-19 01:59:55 +00:00
|
|
|
GNUSTEP_SHARED_BUNDLE_RESOURCE_PATH = $(GNUSTEP_BUILD_DIR)/Resources/Subproject
|
2002-09-27 01:31:40 +00:00
|
|
|
include $(GNUSTEP_MAKEFILES)/Instance/Shared/bundle.make
|
|
|
|
|
|
|
|
# Only build, not install
|
|
|
|
internal-subproject-all_:: shared-instance-bundle-all
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
2002-10-22 00:27:39 +00:00
|
|
|
include $(GNUSTEP_MAKEFILES)/Instance/Shared/strings.make
|