mirror of
https://github.com/gnustep/tools-make.git
synced 2025-05-30 00:41:14 +00:00
Add bundle support.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@2464 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
31781131bc
commit
4420aa90a8
5 changed files with 112 additions and 12 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
|||
Tue Sep 30 14:24:20 1997 Scott Christley <scottc@net-community.com>
|
||||
|
||||
* Add bundle support.
|
||||
* bundle.make: Define rules and variables.
|
||||
* rules.make: Add main bundle rule. Surround complete file
|
||||
with if to prevent multiple inclusion.
|
||||
* target.make: Define bundle variables.
|
||||
|
||||
* application.make: Delete old code.
|
||||
|
||||
Tue Sep 30 08:27:28 1997 Scott Christley <scottc@net-community.com>
|
||||
|
||||
* Makefile.preamble (ADDITIONAL_TOOL_LIBS, ADDITIONAL_GUI_LIBS): Add
|
||||
|
|
|
@ -24,10 +24,8 @@
|
|||
#
|
||||
include $(GNUSTEP_SYSTEM_ROOT)/Makefiles/rules.make
|
||||
|
||||
LINK_CMD = $(CC) $(ALL_CFLAGS) $@$(OEXT) -o $@ $(ALL_LDFLAGS)
|
||||
|
||||
#
|
||||
# The name of the library is in the APP_NAME variable.
|
||||
# The name of the application is in the APP_NAME variable.
|
||||
#
|
||||
|
||||
APP_DIR_NAME := $(foreach app,$(APP_NAME),$(app).app)
|
||||
|
@ -68,7 +66,4 @@ internal-clean::
|
|||
for f in $(APP_DIR_NAME); do \
|
||||
rm -rf $$f ; \
|
||||
done
|
||||
rm -f $(APP_STAMPS)
|
||||
|
||||
internal-distclean:: clean
|
||||
rm -rf objs
|
||||
rm -rf $(GNUSTEP_OBJ_PREFIX)
|
||||
|
|
64
bundle.make
64
bundle.make
|
@ -18,3 +18,67 @@
|
|||
# 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.
|
||||
|
||||
#
|
||||
# Include in the common makefile rules
|
||||
#
|
||||
include $(GNUSTEP_SYSTEM_ROOT)/Makefiles/rules.make
|
||||
|
||||
BUNDLE_LINK_CMD = $(CC) $(ALL_CFLAGS) $@$(OEXT) -o $@ $(ALL_LDFLAGS)
|
||||
|
||||
#
|
||||
# The name of the bundle is in the BUNDLE_NAME variable.
|
||||
# The list of bundle resource file are in xxx_RESOURCES
|
||||
# The list of bundle resource directories are in xxx_RESOURCE_DIRS
|
||||
# where xxx is the bundle name
|
||||
#
|
||||
|
||||
BUNDLE_DIR_NAME := $(foreach bundle,$(BUNDLE_NAME),$(bundle).bundle)
|
||||
BUNDLE_FILE = $(BUNDLE_DIR_NAME)/$(GNUSTEP_TARGET_DIR)/$(LIBRARY_COMBO)/$(BUNDLE_NAME)
|
||||
BUNDLE_STAMPS := $(foreach bundle,$(BUNDLE_NAME),stamp-bundle-$(bundle))
|
||||
BUNDLE_STAMPS := $(addprefix $(GNUSTEP_OBJ_DIR)/,$(BUNDLE_STAMPS))
|
||||
BUNDLE_RESOURCE_DIRS = $(foreach d,$(RESOURCE_DIRS),$(BUNDLE_DIR_NAME)/$(d))
|
||||
|
||||
#
|
||||
# Internal targets
|
||||
#
|
||||
|
||||
$(GNUSTEP_OBJ_DIR)/stamp-bundle-% : $(BUNDLE_FILE) bundle-resource-files
|
||||
touch $@
|
||||
|
||||
$(BUNDLE_FILE) : $(C_OBJ_FILES) $(OBJC_OBJ_FILES)
|
||||
$(LD) $(BUNDLE_LDFLAGS) $(ALL_LDFLAGS) \
|
||||
$(LDOUT)$(BUNDLE_FILE) \
|
||||
$(C_OBJ_FILES) $(OBJC_OBJ_FILES)
|
||||
|
||||
#
|
||||
# Compilation targets
|
||||
#
|
||||
internal-all:: $(GNUSTEP_OBJ_DIR) $(BUNDLE_DIR_NAME)
|
||||
|
||||
internal-bundle-all:: $(GNUSTEP_OBJ_DIR) build-bundle-dir build-bundle
|
||||
|
||||
build-bundle-dir::
|
||||
$(GNUSTEP_MAKEFILES)/mkinstalldirs \
|
||||
$(BUNDLE_DIR_NAME) \
|
||||
$(BUNDLE_DIR_NAME)/Resources \
|
||||
$(BUNDLE_DIR_NAME)/$(GNUSTEP_TARGET_CPU) \
|
||||
$(BUNDLE_DIR_NAME)/$(GNUSTEP_TARGET_DIR) \
|
||||
$(BUNDLE_DIR_NAME)/$(GNUSTEP_TARGET_DIR)/$(LIBRARY_COMBO) \
|
||||
$(BUNDLE_RESOURCE_DIRS)
|
||||
|
||||
build-bundle:: $(GNUSTEP_OBJ_DIR)/stamp-bundle-$(BUNDLE_NAME)
|
||||
|
||||
bundle-resource-files::
|
||||
for f in $(RESOURCE_FILES); do \
|
||||
$(INSTALL_DATA) $$f $(BUNDLE_DIR_NAME)/$$f ;\
|
||||
done
|
||||
|
||||
#
|
||||
# Cleaning targets
|
||||
#
|
||||
internal-clean::
|
||||
for f in $(BUNDLE_DIR_NAME); do \
|
||||
rm -rf $$f ; \
|
||||
done
|
||||
rm -rf $(GNUSTEP_OBJ_PREFIX)
|
||||
|
|
21
rules.make
21
rules.make
|
@ -19,6 +19,10 @@
|
|||
# If not, write to the Free Software Foundation,
|
||||
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
# Don't reload all the rules if already loaded
|
||||
ifneq ($(RULES_LOADED),yes)
|
||||
RULES_LOADED := yes
|
||||
|
||||
ALL_CPPFLAGS = $(CPPFLAGS) $(ADDITIONAL_CPPFLAGS)
|
||||
|
||||
ALL_OBJCFLAGS = $(INTERNAL_OBJCFLAGS) $(ADDITIONAL_OBJCFLAGS) \
|
||||
|
@ -64,7 +68,7 @@ $(GNUSTEP_OBJ_DIR)/%${OEXT} : %.m
|
|||
# The magical app rule, thank you GNU make!
|
||||
%.app : FORCE
|
||||
@echo Making $*...
|
||||
@$(MAKE) internal-app-all \
|
||||
@$(MAKE) --no-print-directory internal-app-all \
|
||||
APP_NAME=$* \
|
||||
OBJC_FILES="$($*_OBJC_FILES)" \
|
||||
C_FILES="$($*_C_FILES)" \
|
||||
|
@ -72,12 +76,22 @@ $(GNUSTEP_OBJ_DIR)/%${OEXT} : %.m
|
|||
|
||||
%.tool : FORCE
|
||||
@echo Making $*...
|
||||
@$(MAKE) internal-tool-all \
|
||||
@$(MAKE) --no-print-directory internal-tool-all \
|
||||
TOOL_NAME=$* \
|
||||
OBJC_FILES="$($*_OBJC_FILES)" \
|
||||
C_FILES="$($*_C_FILES)" \
|
||||
PSWRAP_FILES="$($*_PSWRAP_FILES)"
|
||||
|
||||
%.bundle : FORCE
|
||||
@echo Making $*...
|
||||
$(MAKE) --no-print-directory internal-bundle-all \
|
||||
BUNDLE_NAME=$* \
|
||||
OBJC_FILES="$($*_OBJC_FILES)" \
|
||||
C_FILES="$($*_C_FILES)" \
|
||||
PSWRAP_FILES="$($*_PSWRAP_FILES)" \
|
||||
RESOURCE_FILES="$($*_RESOURCES)" \
|
||||
RESOURCE_DIRS="$($*_RESOURCE_DIRS)" \
|
||||
|
||||
#
|
||||
# The list of Objective-C source files to be compiled
|
||||
# are in the OBJC_FILES variable.
|
||||
|
@ -160,3 +174,6 @@ internal-check::
|
|||
after-check::
|
||||
|
||||
FORCE:
|
||||
|
||||
# Rules loaded
|
||||
endif
|
||||
|
|
20
target.make
20
target.make
|
@ -81,7 +81,8 @@ TARGET_SYSTEM_LIBS := -lsocket -lnsl -ldl -lm
|
|||
endif
|
||||
|
||||
#
|
||||
# Specific settings for building shared or static libraries on various systems
|
||||
# Specific settings for building shared libraries, static libraries,
|
||||
# and bundles on various systems
|
||||
#
|
||||
HAVE_SHARED_LIBS = no
|
||||
STATIC_LIB_LINK_CMD = \
|
||||
|
@ -96,12 +97,14 @@ AFTER_INSTALL_SHARED_LIB_COMMAND = \
|
|||
(cd $(GNUSTEP_LIBRARIES); \
|
||||
rm -f $(LIBRARY_FILE); \
|
||||
$(LN_S) $(VERSION_LIBRARY_FILE) $(LIBRARY_FILE))
|
||||
HAVE_BUNDLES = no
|
||||
|
||||
|
||||
#
|
||||
# OpenStep 4.x
|
||||
#
|
||||
ifeq ($(GNUSTEP_TARGET_OS), nextstep4)
|
||||
HAVE_BUNDLES = yes
|
||||
HAVE_SHARED_LIBS = yes
|
||||
SHARED_LIB_LINK_CMD = \
|
||||
/bin/libtool -dynamic -o $@ \
|
||||
|
@ -127,8 +130,11 @@ STATIC_LIB_LINK_CMD = \
|
|||
endif
|
||||
AFTER_INSTALL_STATIC_LIB_COMMAND =
|
||||
|
||||
SHARED_CFLAGS += -dynamic
|
||||
SHARED_CFLAGS += -dynamic
|
||||
SHARED_LIBEXT = .a
|
||||
|
||||
HAVE_BUNDLES = yes
|
||||
BUNDLE_CFLAGS =
|
||||
endif
|
||||
|
||||
#
|
||||
|
@ -143,8 +149,12 @@ SHARED_LIB_LINK_CMD = \
|
|||
rm -f $(LIBRARY_FILE); \
|
||||
$(LN_S) $(VERSION_LIBRARY_FILE) $(LIBRARY_FILE))
|
||||
|
||||
SHARED_CFLAGS += -fPIC
|
||||
SHARED_CFLAGS += -fPIC
|
||||
SHARED_LIBEXT = .so
|
||||
|
||||
HAVE_BUNDLES = yes
|
||||
BUNDLE_CFLAGS += -fPIC
|
||||
BUNDLE_LDFLAGS += -shared
|
||||
endif
|
||||
|
||||
|
||||
|
@ -162,4 +172,8 @@ SHARED_LIB_LINK_CMD = \
|
|||
|
||||
SHARED_CFLAGS += -fpic -fPIC
|
||||
SHARED_LIBEXT = .so
|
||||
|
||||
HAVE_BUNDLES = yes
|
||||
BUNDLE_CFLAGS += -fPIC
|
||||
BUNDLE_LDFLAGS += -shared
|
||||
endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue