2002-02-22 11:46:28 +00:00
|
|
|
#
|
|
|
|
# Instance/gswapp.make
|
|
|
|
#
|
|
|
|
# Instance Makefile rules to build GNUstep web based applications.
|
|
|
|
#
|
2004-03-11 19:03:05 +00:00
|
|
|
# Copyright (C) 1997-2004 Free Software Foundation, Inc.
|
2002-02-22 11:46:28 +00:00
|
|
|
#
|
2004-03-11 19:03:05 +00:00
|
|
|
# Author: Manuel Guesdon <mguesdon@sbuilders.com>,
|
|
|
|
# Nicola Pero <n.pero@mi.flashnet.it>
|
2002-02-22 11:46:28 +00:00
|
|
|
# Based on application.make by Ovidiu Predescu <ovidiu@net-community.com>
|
|
|
|
# Based on gswapp.make by Helge Hess, MDlink online service center GmbH.
|
|
|
|
# Based on the original version by Scott Christley.
|
|
|
|
#
|
|
|
|
# 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
|
2002-02-22 11:46:28 +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.
|
2002-02-22 11:46:28 +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-22 11:46:28 +00:00
|
|
|
|
2008-02-19 14:15:08 +00:00
|
|
|
ifeq ($(NEEDS_GUI),)
|
2008-03-11 01:06:50 +00:00
|
|
|
NEEDS_GUI = no
|
2008-02-19 14:15:08 +00:00
|
|
|
endif
|
2008-02-19 10:49:20 +00:00
|
|
|
|
2002-02-22 11:46:28 +00:00
|
|
|
ifeq ($(RULES_MAKE_LOADED),)
|
|
|
|
include $(GNUSTEP_MAKEFILES)/rules.make
|
|
|
|
endif
|
|
|
|
|
2002-03-01 10:43:50 +00:00
|
|
|
# FIXME/TODO - this file has not been updated to use
|
|
|
|
# Instance/Shared/bundle.make because it is linking resources instead of
|
|
|
|
# copying them.
|
|
|
|
|
2009-02-16 11:00:10 +00:00
|
|
|
# TODO: We should remove this makefile since it's not really supported.
|
|
|
|
|
2002-03-01 10:43:50 +00:00
|
|
|
|
2002-02-22 11:46:28 +00:00
|
|
|
# The name of the application is in the GSWAPP_NAME variable.
|
|
|
|
# The list of languages the app is localized in are in xxx_LANGUAGES <==
|
|
|
|
# The list of application resource file are in xxx_RESOURCE_FILES
|
|
|
|
# The list of localized application resource file are in
|
|
|
|
# xxx_LOCALIZED_RESOURCE_FILES <==
|
|
|
|
# The list of application resource directories are in xxx_RESOURCE_DIRS
|
|
|
|
# The list of application web server resource directories are in
|
|
|
|
# xxx_WEBSERVER_RESOURCE_DIRS <==
|
|
|
|
# The list of localized application web server resource directories are in
|
|
|
|
# xxx_LOCALIZED_WEBSERVER_RESOURCE_DIRS
|
|
|
|
# where xxx is the application name <==
|
|
|
|
|
|
|
|
# Determine the application directory extension
|
2006-09-12 19:05:58 +00:00
|
|
|
GSWAPP_EXTENSION = gswa
|
2002-02-22 11:46:28 +00:00
|
|
|
|
2002-03-19 13:06:56 +00:00
|
|
|
.PHONY: internal-gswapp-all_ \
|
|
|
|
internal-gswapp-install_ \
|
|
|
|
internal-gswapp-uninstall_ \
|
2004-03-11 19:03:05 +00:00
|
|
|
internal-gswapp-copy_into_dir
|
|
|
|
|
|
|
|
#
|
2007-03-05 16:49:54 +00:00
|
|
|
# Determine where to install. By default, install into GNUSTEP_WEB_APPS.
|
2004-03-11 19:03:05 +00:00
|
|
|
#
|
|
|
|
ifneq ($($(GNUSTEP_INSTANCE)_INSTALL_DIR),)
|
|
|
|
GSWAPP_INSTALL_DIR = $($(GNUSTEP_INSTANCE)_INSTALL_DIR)
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(GSWAPP_INSTALL_DIR),)
|
2007-03-05 16:49:54 +00:00
|
|
|
GSWAPP_INSTALL_DIR = $(GNUSTEP_WEB_APPS)
|
2004-03-11 19:03:05 +00:00
|
|
|
endif
|
2002-02-22 11:46:28 +00:00
|
|
|
|
|
|
|
# Libraries that go before the WO libraries
|
|
|
|
ALL_GSW_LIBS = \
|
|
|
|
$(ADDITIONAL_GSW_LIBS) $(AUXILIARY_GSW_LIBS) $(GSW_LIBS) \
|
2008-02-19 10:49:20 +00:00
|
|
|
$(ALL_LIBS)
|
2002-02-22 11:46:28 +00:00
|
|
|
|
|
|
|
GSWAPP_DIR_NAME = $(GNUSTEP_INSTANCE:=.$(GSWAPP_EXTENSION))
|
2003-10-13 23:25:23 +00:00
|
|
|
GSWAPP_DIR = $(GNUSTEP_BUILD_DIR)/$(GSWAPP_DIR_NAME)
|
2004-03-11 19:03:05 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Now include the standard resource-bundle routines from Shared/bundle.make
|
|
|
|
#
|
|
|
|
|
|
|
|
ifneq ($(FOUNDATION_LIB), apple)
|
|
|
|
# GNUstep bundle
|
|
|
|
GNUSTEP_SHARED_BUNDLE_RESOURCE_PATH = $(GSWAPP_DIR)/Resources
|
|
|
|
GSWAPP_INFO_PLIST_FILE = $(GSWAPP_DIR)/Resources/Info-gnustep.plist
|
|
|
|
else
|
|
|
|
# OSX bundle
|
|
|
|
GNUSTEP_SHARED_BUNDLE_RESOURCE_PATH = $(GSWAPP_DIR)/Contents/Resources
|
|
|
|
GSWAPP_INFO_PLIST_FILE = $(GSWAPP_DIR)/Contents/Info.plist
|
2002-02-22 11:46:28 +00:00
|
|
|
endif
|
2007-03-09 19:22:11 +00:00
|
|
|
GNUSTEP_SHARED_BUNDLE_INSTALL_NAME = $(GSWAPP_DIR_NAME)
|
|
|
|
GNUSTEP_SHARED_BUNDLE_INSTALL_LOCAL_PATH = .
|
|
|
|
GNUSTEP_SHARED_BUNDLE_INSTALL_PATH = $(GSWAPP_INSTALL_DIR)
|
2004-03-11 19:03:05 +00:00
|
|
|
include $(GNUSTEP_MAKEFILES)/Instance/Shared/bundle.make
|
2002-02-22 11:46:28 +00:00
|
|
|
|
2002-12-30 16:33:21 +00:00
|
|
|
ifneq ($(FOUNDATION_LIB), apple)
|
2004-03-11 19:03:05 +00:00
|
|
|
GSWAPP_FILE_NAME = $(GSWAPP_DIR_NAME)/$(GNUSTEP_TARGET_LDIR)/$(GNUSTEP_INSTANCE)$(EXEEXT)
|
2002-02-22 11:46:28 +00:00
|
|
|
else
|
2004-03-11 19:03:05 +00:00
|
|
|
GSWAPP_FILE_NAME = $(GSWAPP_DIR_NAME)/Contents/MacOS/$(GNUSTEP_INSTANCE)$(EXEEXT)
|
2002-02-22 11:46:28 +00:00
|
|
|
endif
|
|
|
|
|
2003-10-13 23:25:23 +00:00
|
|
|
GSWAPP_FILE = $(GNUSTEP_BUILD_DIR)/$(GSWAPP_FILE_NAME)
|
|
|
|
|
2002-02-22 11:46:28 +00:00
|
|
|
#
|
|
|
|
# Internal targets
|
|
|
|
#
|
|
|
|
|
|
|
|
$(GSWAPP_FILE): $(OBJ_FILES_TO_LINK)
|
2009-03-19 16:59:53 +00:00
|
|
|
ifeq ($(OBJ_FILES_TO_LINK),)
|
|
|
|
$(WARNING_EMPTY_LINKING)
|
|
|
|
endif
|
2005-09-22 22:07:57 +00:00
|
|
|
$(ECHO_LINKING)$(LD) $(ALL_LDFLAGS) $(CC_LDFLAGS) -o $(LDOUT)$@ \
|
2008-02-19 10:49:20 +00:00
|
|
|
$(OBJ_FILES_TO_LINK) $(ALL_LIB_DIRS) $(ALL_GSW_LIBS)$(END_ECHO)
|
2002-02-22 11:46:28 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Compilation targets
|
|
|
|
#
|
2002-12-30 16:33:21 +00:00
|
|
|
ifeq ($(FOUNDATION_LIB), apple)
|
2002-03-19 13:06:56 +00:00
|
|
|
internal-gswapp-all_:: \
|
2010-02-12 09:19:25 +00:00
|
|
|
$(GNUSTEP_OBJ_INSTANCE_DIR) \
|
2009-10-10 17:33:02 +00:00
|
|
|
$(OBJ_DIRS_TO_CREATE) \
|
2004-03-11 19:03:05 +00:00
|
|
|
$(GSWAPP_DIR)/Contents/MacOS \
|
|
|
|
$(GSWAPP_FILE) \
|
|
|
|
shared-instance-bundle-all \
|
|
|
|
$(GSWAPP_INFO_PLIST_FILE)
|
2002-02-22 11:46:28 +00:00
|
|
|
|
2004-03-11 19:03:05 +00:00
|
|
|
$(GSWAPP_DIR)/Contents/MacOS:
|
|
|
|
$(ECHO_CREATING)$(MKDIRS) $@$(END_ECHO)
|
2002-02-22 11:46:28 +00:00
|
|
|
else
|
|
|
|
|
2010-02-12 09:19:25 +00:00
|
|
|
internal-gswapp-all_:: $(GNUSTEP_OBJ_INSTANCE_DIR) \
|
2009-10-10 17:33:02 +00:00
|
|
|
$(OBJ_DIRS_TO_CREATE) \
|
2004-03-11 19:03:05 +00:00
|
|
|
$(GSWAPP_DIR)/$(GNUSTEP_TARGET_LDIR) \
|
|
|
|
$(GSWAPP_FILE) \
|
|
|
|
$(GSWAPP_DIR)/Resources \
|
|
|
|
$(GSWAPP_INFO_PLIST_FILE) \
|
|
|
|
shared-instance-bundle-all
|
2002-02-22 11:46:28 +00:00
|
|
|
|
2004-03-11 19:03:05 +00:00
|
|
|
$(GSWAPP_DIR)/$(GNUSTEP_TARGET_LDIR):
|
|
|
|
$(ECHO_CREATING)$(MKDIRS) $@$(END_ECHO)
|
2002-02-22 11:46:28 +00:00
|
|
|
|
|
|
|
endif
|
|
|
|
|
2002-02-28 18:30:07 +00:00
|
|
|
PRINCIPAL_CLASS = $(strip $($(GNUSTEP_INSTANCE)_PRINCIPAL_CLASS))
|
|
|
|
|
|
|
|
ifeq ($(PRINCIPAL_CLASS),)
|
|
|
|
PRINCIPAL_CLASS = $(GNUSTEP_INSTANCE)
|
|
|
|
endif
|
|
|
|
|
2002-02-22 11:59:01 +00:00
|
|
|
HAS_GSWCOMPONENTS = $($(GNUSTEP_INSTANCE)_HAS_GSWCOMPONENTS)
|
|
|
|
GSWAPP_INFO_PLIST = $($(GNUSTEP_INSTANCE)_GSWAPP_INFO_PLIST)
|
2002-03-06 12:25:03 +00:00
|
|
|
MAIN_MODEL_FILE = $(strip $(subst .gmodel,,$(subst .gorm,,$(subst .nib,,$($(GNUSTEP_INSTANCE)_MAIN_MODEL_FILE)))))
|
2002-02-22 11:59:01 +00:00
|
|
|
|
2007-03-16 12:23:56 +00:00
|
|
|
|
|
|
|
$(GSWAPP_INFO_PLIST_FILE): $(GNUSTEP_PLIST_DEPEND)
|
2003-05-27 12:07:03 +00:00
|
|
|
$(ECHO_CREATING)(echo "{"; echo ' NOTE = "Automatically generated, do not edit!";'; \
|
2002-02-22 11:46:28 +00:00
|
|
|
echo " NSExecutable = \"$(GNUSTEP_INSTANCE)\";"; \
|
|
|
|
echo " NSPrincipalClass = \"$(PRINCIPAL_CLASS)\";"; \
|
|
|
|
if [ "$(HAS_GSWCOMPONENTS)" != "" ]; then \
|
|
|
|
echo " HasGSWComponents = \"$(HAS_GSWCOMPONENTS)\";"; \
|
|
|
|
fi; \
|
2002-03-06 12:25:03 +00:00
|
|
|
echo " NSMainNibFile = \"$(MAIN_MODEL_FILE)\";"; \
|
2013-12-27 16:23:08 +00:00
|
|
|
if [ -r "$(GNUSTEP_PLIST_DEPEND)" ]; then \
|
|
|
|
cat $(GNUSTEP_PLIST_DEPEND); \
|
2002-02-22 11:46:28 +00:00
|
|
|
fi; \
|
|
|
|
if [ "$(GSWAPP_INFO_PLIST)" != "" ]; then \
|
|
|
|
cat $(GSWAPP_INFO_PLIST); \
|
|
|
|
fi; \
|
2003-05-27 12:07:03 +00:00
|
|
|
echo "}") >$@$(END_ECHO)
|
2002-02-22 11:46:28 +00:00
|
|
|
|
2004-03-11 19:03:05 +00:00
|
|
|
internal-gswapp-copy_into_dir:: shared-instance-bundle-copy_into_dir
|
2002-02-22 11:46:28 +00:00
|
|
|
|
2004-03-11 19:03:05 +00:00
|
|
|
# install/uninstall targets
|
2002-02-22 11:46:28 +00:00
|
|
|
|
2004-03-11 19:03:05 +00:00
|
|
|
$(GSWAPP_INSTALL_DIR):
|
|
|
|
$(ECHO_CREATING)$(MKINSTALLDIRS) $@$(END_ECHO)
|
|
|
|
|
|
|
|
internal-gswapp-install_:: shared-instance-bundle-install
|
2002-02-22 11:46:28 +00:00
|
|
|
ifeq ($(strip),yes)
|
2004-03-11 19:03:05 +00:00
|
|
|
$(ECHO_STRIPPING)$(STRIP) $(GSWAPP_INSTALL_DIR)/$(GSWAPP_FILE_NAME)$(END_ECHO)
|
2002-02-22 11:46:28 +00:00
|
|
|
endif
|
|
|
|
|
2004-03-11 19:03:05 +00:00
|
|
|
internal-gswapp-uninstall_:: shared-instance-bundle-uninstall
|
2002-02-22 11:46:28 +00:00
|
|
|
|
2002-10-22 00:27:39 +00:00
|
|
|
include $(GNUSTEP_MAKEFILES)/Instance/Shared/strings.make
|