Better support for libFoundation.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@2468 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Ovidiu Predescu 1997-10-02 00:41:03 +00:00
parent a0a684bc8d
commit eca0016655
6 changed files with 81 additions and 37 deletions

View file

@ -1,3 +1,22 @@
Wed Oct 1 17:03:56 1997 Ovidiu Predescu <ovidiu@net-community.com>
* common.make: Added -I compile flag when compiling using gnustep-base
and libFoundation to get the files specific for cpu/os/runtime.
* core.make: Allow the user to specify a set of variables different
than the library combo. This is needed when compiling basic libraries
that don't use the whole library combo (like libFoundation). Also
define OBJC_RUNTIME that holds the name of the runtime, useful in make,
and RUNTIME_DEFINE that defines for the runtime, useful while
compiling. The last one should be added to the additional C/ObjC flags.
* library.make: Define HEADER_FILES_DIR to be . by default.
Changed the rule for building the library to build it into the object
files directory. Cleaned the internal-clean rule.
* rules.make: Remove newlines in compilation rules. Added the 'all'
target in the list of dependencies for install.
* target.make: Cleaned the rules for building a shared library under
OPENSTEP 4.x. Added flags to linker to disable printing of warnings for
read only relocation symbols.
Wed Oct 1 11:15:22 1997 Scott Christley <scottc@net-community.com>
* bundle.make: Add install and uninstall targets. Use bundle

View file

@ -80,13 +80,15 @@ GNUSTEP_MAKEFILES = $(GNUSTEP_SYSTEM_ROOT)/Makefiles
ifeq ($(FOUNDATION_LIB),gnu)
GNUSTEP_FND_DIR = gnustep/base
GNUSTEP_HEADERS_FND = $(GNUSTEP_HEADERS)/$(GNUSTEP_FND_DIR)
GNUSTEP_HEADERS_FND_FLAG = -I$(GNUSTEP_HEADERS_FND)
GNUSTEP_HEADERS_FND_FLAG = -I$(GNUSTEP_HEADERS_FND) \
-I$(GNUSTEP_HEADERS_FND)/$(GNUSTEP_TARGET_CPU)/$(GNUSTEP_TARGET_OS)/$(OBJC_RUNTIME)
endif
ifeq ($(FOUNDATION_LIB),fd)
GNUSTEP_FND_DIR = libFoundation
GNUSTEP_HEADERS_FND = $(GNUSTEP_HEADERS)/$(GNUSTEP_FND_DIR)
GNUSTEP_HEADERS_FND_FLAG = -I$(GNUSTEP_HEADERS_FND)
GNUSTEP_HEADERS_FND_FLAG = -I$(GNUSTEP_HEADERS_FND) \
-I$(GNUSTEP_HEADERS_FND)/$(GNUSTEP_TARGET_CPU)/$(GNUSTEP_TARGET_OS)/$(OBJC_RUNTIME)
endif
ifeq ($(FOUNDATION_LIB),nx)

View file

@ -52,17 +52,49 @@ GUI_BACKEND_LIB = $(word 4,$(combo_list))
endif
#
# Allow user specify the runtime, foundation, gui and backend libraries in
# separate variables.
#
ifneq ($(runtime),)
OBJC_RUNTIME_LIB = $(runtime)
endif
ifneq ($(foundation),)
FOUNDATION_LIB = $(foundation)
endif
ifneq ($(gui),)
GUI_LIB = $(gui)
endif
ifneq ($(backend),)
GUI_BACKEND_LIB = $(backend)
endif
LIBRARY_COMBO = $(OBJC_RUNTIME_LIB)_$(FOUNDATION_LIB)_$(GUI_LIB)_$(GUI_BACKEND_LIB)
OBJC_LDFLAGS =
OBJC_LIBS =
#
# Set the appropriate ObjC runtime library
# Set the appropriate ObjC runtime library and other information
#
ifeq ($(OBJC_RUNTIME_LIB),gnu)
OBJC_LDFLAGS =
OBJC_LIB_DIR =
OBJC_LIBS = -lobjc
OBJC_RUNTIME = GNU
RUNTIME_DEFINE = -DGNU_RUNTIME=1
endif
ifeq ($(OBJC_RUNTIME_LIB), nx)
OBJC_RUNTIME = NeXT
RUNTIME_DEFINE = -DNeXT_RUNTIME=1
endif
ifeq ($(OBJC_RUNTIME_LIB), sun)
OBJC_RUNTIME = Sun
RUNTIME_DEFINE = -DSun_RUNTIME=1
endif
FND_LDFLAGS =
@ -73,11 +105,13 @@ FND_LIBS =
ifeq ($(FOUNDATION_LIB),gnu)
FND_LDFLAGS =
FND_LIBS = -lgnustep-base
FND_DEFINE = -DGNUSTEP_BASE_LIBRARY=1
endif
ifeq ($(FOUNDATION_LIB),fd)
FND_LDFLAGS =
FND_LIBS = -lFoundation
FND_DEFINE = -DLIB_FOUNDATION_LIBRARY=1
endif
ifeq ($(FOUNDATION_LIB),nx)
@ -85,6 +119,14 @@ FND_LDFLAGS = -framework Foundation
FND_LIBS =
endif
ifeq ($(FOUNDATION_LIB), nx)
FND_DEFINE = -DNeXT_foundation_LIBRARY=1
endif
ifeq ($(FOUNDATION_LIB), sun)
FND_DEFINE = -DSun_Foundation_LIBRARY=1
endif
GUI_LDFLAGS =
GUI_LIBS =
#

View file

@ -36,6 +36,10 @@ endif
VERSION_LIBRARY_FILE = $(LIBRARY_FILE).$(VERSION)
ifeq ($(strip $(HEADER_FILES_DIR)),)
HEADER_FILES_DIR = .
endif
#
# Internal targets
#
@ -43,9 +47,10 @@ VERSION_LIBRARY_FILE = $(LIBRARY_FILE).$(VERSION)
#
# Compilation targets
#
internal-all:: $(GNUSTEP_OBJ_DIR) $(LIBRARY_FILE) import-library
internal-all:: $(GNUSTEP_OBJ_DIR) $(GNUSTEP_OBJ_DIR)/$(VERSION_LIBRARY_FILE) \
import-library
$(LIBRARY_FILE): $(C_OBJ_FILES) $(OBJC_OBJ_FILES)
$(GNUSTEP_OBJ_DIR)/$(VERSION_LIBRARY_FILE): $(C_OBJ_FILES) $(OBJC_OBJ_FILES)
$(LIB_LINK_CMD)
import-library::
@ -104,15 +109,6 @@ internal-uninstall-import-lib::
# Cleaning targets
#
internal-clean::
rm -f $(OBJC_OBJ_FILES)
rm -f $(SHARED_OBJC_OBJ_FILES)
rm -f $(C_OBJ_FILES)
rm -f $(SHARED_C_OBJ_FILES)
rm -f $(PSWRAP_C_FILES)
rm -f $(PSWRAP_H_FILES)
rm -f $(GNUSTEP_OBJ_DIR)/$(LIBRARY_FILE)
rm -f $(GNUSTEP_OBJ_DIR)/$(VERSION_LIBRARY_FILE)
rm -f $(GNUSTEP_OBJ_DIR)/$(LIBRARY_FILE)
rm -rf $(GNUSTEP_OBJ_PREFIX)
#

View file

@ -55,12 +55,10 @@ VPATH = .
.PRECIOUS: %.c %.h $(GNUSTEP_OBJ_DIR)/%${OEXT}
$(GNUSTEP_OBJ_DIR)/%${OEXT} : %.c
$(CC) -c $(ALL_CPPFLAGS) $(ALL_CFLAGS) \
-o $@ $<
$(CC) -c $(ALL_CPPFLAGS) $(ALL_CFLAGS) -o $@ $<
$(GNUSTEP_OBJ_DIR)/%${OEXT} : %.m
$(CC) -c $(ALL_CPPFLAGS) $(ALL_OBJCFLAGS) \
-o $@ $<
$(CC) -c $(ALL_CPPFLAGS) $(ALL_OBJCFLAGS) -o $@ $<
%.c : %.psw
pswrap -h $*.h -o $@ $<
@ -126,7 +124,7 @@ C_OBJ_FILES = $(PSWRAP_OBJ_FILES) $(addprefix $(GNUSTEP_OBJ_DIR)/,$(C_OBJS))
#
all:: before-all internal-all after-all
install:: before-install internal-install after-install
install:: all before-install internal-install after-install
uninstall:: before-uninstall internal-uninstall after-uninstall

View file

@ -107,27 +107,14 @@ ifeq ($(GNUSTEP_TARGET_OS), nextstep4)
HAVE_BUNDLES = yes
HAVE_SHARED_LIBS = yes
SHARED_LIB_LINK_CMD = \
/bin/libtool -dynamic -o $@ \
/bin/libtool -dynamic -read_only_relocs suppress -o $@ \
/NextLibrary/Frameworks/System.framework/System \
$(GNUSTEP_LIBRARIES)/libobjc$(SHARED_LIBEXT) \
$(GNUSTEP_LIBRARIES)/libgcc$(SHARED_LIBEXT) $^ \
>/dev/null
$(GNUSTEP_LIBRARIES)/libgcc$(SHARED_LIBEXT) $^
STATIC_LIB_LINK_CMD = /bin/libtool -static -o $@ $^
LDFLAGS += -Wl,-read_only_relocs,suppress
ifeq ($(OBJC_RUNTIME_LIB), gnu)
STATIC_LIB_LINK_CMD = \
/bin/libtool -static -o $@ \
/NextLibrary/Frameworks/System.framework/System \
$(GNUSTEP_LIBRARIES)/libobjc$(SHARED_LIBEXT) \
$(GNUSTEP_LIBRARIES)/libgcc$(SHARED_LIBEXT) $^ \
>/dev/null
else
# not tested
STATIC_LIB_LINK_CMD = \
/bin/libtool -static -o $@ \
/NextLibrary/Frameworks/System.framework/System \
$(GNUSTEP_LIBRARIES)/libgcc$(SHARED_LIBEXT) $^ \
>/dev/null
endif
AFTER_INSTALL_STATIC_LIB_COMMAND =
SHARED_CFLAGS += -dynamic