+2005-08-10 Helge Hess <helge.hess@opengroupware.org>
+
+ * prepared for OSX frameworks
+
2005-01-04 Marcus Mueller <znek@mulle-kybernetik.com>
* sope-appserver.xcode: added SoOFS product
GNUSTEP_INSTALLATION_DIR = $(GNUSTEP_LOCAL_ROOT)
-LIBRARY_NAME = libNGObjWeb
+ifneq ($(frameworks),yes)
+LIBRARY_NAME = libNGObjWeb
+else
+FRAMEWORK_NAME = NGObjWeb
+endif
+
+
ifeq ($(FHS_INSTALL_ROOT),)
RESOURCES_DIR = $(GNUSTEP_RESOURCES)/NGObjWeb
else
NGObjWebCore_OBJC_FILES += WOServerDefaults.m
endif
+
+# framework support
+
+NGObjWeb_HEADER_FILES_DIR = NGObjWeb
+NGObjWeb_HEADER_FILES = $(libNGObjWeb_HEADER_FILES)
+NGObjWeb_OBJC_FILES = $(libNGObjWeb_OBJC_FILES)
+NGObjWeb_SUBPROJECTS = $(libNGObjWeb_SUBPROJECTS)
+
+
# ----- SoCore product for SOPE core registrations
BUNDLE_NAME = SoCore
SoCore_RESOURCE_FILES = SoObjects/product.plist Version
SoCore_PRINCIPAL_CLASS = SoCoreProduct
+
# ----- NGObjWeb tools
TOOL_NAME = wod
endif
wod_SUBPROJECTS = Templates Associations
+
+# building
+
-include GNUmakefile.preamble
+ifneq ($(frameworks),yes)
include $(GNUSTEP_MAKEFILES)/library.make
+else
+include $(GNUSTEP_MAKEFILES)/framework.make
+endif
include $(GNUSTEP_MAKEFILES)/bundle.make
include $(GNUSTEP_MAKEFILES)/tool.make
-include GNUmakefile.postamble
# compilation settings
+ifeq ($(FOUNDATION_LIB),apple)
+NGObjWeb_INSTALL_DIR = /Library/Frameworks/
+endif
+
+SOPE_ROOT=../..
+
ADDITIONAL_CPPFLAGS += \
-Wall -DCOMPILE_FOR_GSTEP_MAKE=1 \
-DSOPE_MAJOR_VERSION=$(MAJOR_VERSION) \
-I$(SOPE_ROOT)/sope-mime
-ifneq ($(GNUSTEP_BUILD_DIR),)
-RELBUILD_DIR_SOPE=$(GNUSTEP_BUILD_DIR)/..
-RELBUILD_DIR_MIME=$(GNUSTEP_BUILD_DIR)/../../sope-mime
-RELBUILD_DIR_SxCore=$(GNUSTEP_BUILD_DIR)/../../sope-core
-RELBUILD_DIR_SxXml=$(GNUSTEP_BUILD_DIR)/../../sope-xml
+# library/framework search pathes
+
+DEP_DIRS = \
+ $(SOPE_ROOT)/sope-mime \
+ $(SOPE_ROOT)/sope-core/NGStreams \
+ $(SOPE_ROOT)/sope-core/NGExtensions \
+ $(SOPE_ROOT)/sope-core/EOControl \
+ $(SOPE_ROOT)/sope-xml/DOM \
+ $(SOPE_ROOT)/sope-xml/XmlRpc \
+ $(SOPE_ROOT)/sope-xml/SaxObjC
+ifneq ($(frameworks),yes)
ADDITIONAL_LIB_DIRS += \
- -L./$(GNUSTEP_OBJ_DIR) \
- -L$(GNUSTEP_BUILD_DIR)/$(GNUSTEP_OBJ_DIR_NAME) \
- -L$(RELBUILD_DIR_MIME)/$(GNUSTEP_OBJ_DIR_NAME) \
- -L$(RELBUILD_DIR_SxCore)/NGStreams/$(GNUSTEP_OBJ_DIR_NAME) \
- -L$(RELBUILD_DIR_SxCore)/NGExtensions/$(GNUSTEP_OBJ_DIR_NAME) \
- -L$(RELBUILD_DIR_SxCore)/EOControl/$(GNUSTEP_OBJ_DIR_NAME) \
- -L$(RELBUILD_DIR_SxXml)/XmlRpc/$(GNUSTEP_OBJ_DIR_NAME) \
- -L$(RELBUILD_DIR_SxXml)/DOM/$(GNUSTEP_OBJ_DIR_NAME) \
- -L$(RELBUILD_DIR_SxXml)/SaxObjC/$(GNUSTEP_OBJ_DIR_NAME)
+ $(foreach dir,$(DEP_DIRS),\
+ -L$(GNUSTEP_BUILD_DIR)/$(dir)/$(GNUSTEP_OBJ_DIR_NAME))
else
-libNGObjWeb_LIB_DIRS += \
- -L./$(GNUSTEP_OBJ_DIR) \
- -L$(SOPE_ROOT)/sope-mime/$(GNUSTEP_OBJ_DIR) \
- -L$(CORE_ROOT)/NGStreams/$(GNUSTEP_OBJ_DIR) \
- -L$(CORE_ROOT)/NGExtensions/$(GNUSTEP_OBJ_DIR) \
- -L$(CORE_ROOT)/EOControl/$(GNUSTEP_OBJ_DIR) \
- -L$(SOPE_ROOT)/sope-xml/XmlRpc/$(GNUSTEP_OBJ_DIR) \
- -L$(SOPE_ROOT)/sope-xml/DOM/$(GNUSTEP_OBJ_DIR) \
- -L$(SOPE_ROOT)/sope-xml/SaxObjC/$(GNUSTEP_OBJ_DIR)
+ADDITIONAL_LIB_DIRS += \
+ $(foreach dir,$(DEP_DIRS),-F$(GNUSTEP_BUILD_DIR)/$(dir))
endif
SYSTEM_LIB_DIR += -L/usr/local/lib -L/usr/lib
+
+# dependencies
+
libNGObjWeb_LIBRARIES_DEPEND_UPON += \
-lNGMime -lNGStreams -lNGExtensions -lEOControl \
-lXmlRpc -lDOM -lSaxObjC
+NGObjWeb_LIBRARIES_DEPEND_UPON += \
+ -framework NGMime \
+ -framework NGStreams -framework NGExtensions -framework EOControl \
+ -framework XmlRpc -framework DOM -framework SaxObjC
-wod_LIB_DIRS += $(libNGObjWeb_LIB_DIRS)
+wod_LIB_DIRS += $(libNGObjWeb_LIB_DIRS) -F.
+ifneq ($(frameworks),yes)
wod_TOOL_LIBS += \
-lNGObjWeb \
-lNGMime -lNGStreams -lNGExtensions -lEOControl \
-lXmlRpc -lDOM -lSaxObjC
+else
+wod_TOOL_LIBS += \
+ -framework NGObjWeb \
+ -framework NGMime \
+ -framework NGStreams -framework NGExtensions -framework EOControl \
+ -framework XmlRpc -framework DOM -framework SaxObjC
+endif
+
# platform specific settings
ifeq ($(FOUNDATION_LIB),apple)
libNGObjWeb_PREBIND_ADDR="0xC4900000"
libNGObjWeb_LDFLAGS += -seg1addr $(libNGObjWeb_PREBIND_ADDR)
+NGObjWeb_LDFLAGS += -seg1addr $(libNGObjWeb_PREBIND_ADDR)
endif
ifeq ($(FOUNDATION_LIB),nx)
[r setHeader:@"text/html" forKey:@"content-type"];
[r setHeader:@"no-cache" forKey:@"cache-control"];
- if(rapidTurnAroundPath != nil) {
+ if (rapidTurnAroundPath != nil) {
NSURL *templateURL;
templateURL = [[_exc userInfo] objectForKey:@"templateURL"];
include ../Version
include ./Version
+ifneq ($(frameworks),yes)
LIBRARY_NAME = libNGXmlRpc
+else
+FRAMEWORK_NAME = NGXmlRpc
+endif
libNGXmlRpc_SOVERSION=$(MAJOR_VERSION).$(MINOR_VERSION)
libNGXmlRpc_VERSION=$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBMINOR_VERSION)
NGXmlRpcAction+Registry.m \
+# framework support
+
+NGXmlRpc_HEADER_FILES = $(libNGXmlRpc_HEADER_FILES)
+NGXmlRpc_OBJC_FILES = $(libNGXmlRpc_OBJC_FILES)
+
+
+# building
+
-include GNUmakefile.preamble
+ifneq ($(frameworks),yes)
include $(GNUSTEP_MAKEFILES)/library.make
+else
+include $(GNUSTEP_MAKEFILES)/framework.make
+endif
include $(GNUSTEP_MAKEFILES)/tool.make
-include GNUmakefile.postamble
-include fhs.make
-# $Id$
+# compilation settings
SOPE_ROOT=../..
CORE_ROOT=$(SOPE_ROOT)/sope-core
+ifeq ($(FOUNDATION_LIB),apple)
+NGXmlRpc_INSTALL_DIR = /Library/Frameworks/
+endif
+
ADDITIONAL_CPPFLAGS += -Wall -DCOMPILE_FOR_GSTEP_MAKE=1
ADDITIONAL_OBJCFLAGS += -Wall -Wno-import -Wno-protocol
include ../Version
include ./Version
+# TODO: clash between bundle and libname!
+ifneq ($(frameworks),yes)
LIBRARY_NAME = libSoOFS
+else
+FRAMEWORK_NAME = SoOFS
+endif
+
libSoOFS_SOVERSION=$(MAJOR_VERSION).$(MINOR_VERSION)
libSoOFS_VERSION=$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBMINOR_VERSION)
OFSChangeLog.m \
OFSFolderDataSource.m \
+
+# framework support
+
+SoOFS_HEADER_FILES = $(libSoOFS_HEADER_FILES)
+SoOFS_OBJC_FILES = $(libSoOFS_OBJC_FILES)
+
+
# ----- SoCore product for SOPE core registrations
BUNDLE_NAME = SoOFS
SoOFS_RESOURCE_FILES = product.plist Version
SoOFS_PRINCIPAL_CLASS = SoOFSProduct
+
# ----- NGObjWeb tools
SOPED_NAME=sope-$(MAJOR_VERSION).$(MINOR_VERSION)
$(SOPED_NAME)_OBJC_FILES = sope.m
+
-include GNUmakefile.preamble
+ifneq ($(frameworks),yes)
include $(GNUSTEP_MAKEFILES)/library.make
+else
+include $(GNUSTEP_MAKEFILES)/framework.make
+endif
include $(GNUSTEP_MAKEFILES)/bundle.make
include $(GNUSTEP_MAKEFILES)/tool.make
-include GNUmakefile.postamble
include ../Version
include ./Version
-LIBRARY_NAME = libWEExtensions
+ifneq ($(frameworks),yes)
+LIBRARY_NAME = libWEExtensions
+else
+FRAMEWORK_NAME = WEExtensions
+endif
+
+
BUNDLE_NAME = WEExtensions
BUNDLE_EXTENSION = .wox
BUNDLE_INSTALL_DIR = $(GNUSTEP_INSTALLATION_DIR)/Library/WOxElemBuilders-$(MAJOR_VERSION).$(MINOR_VERSION)/
libWEExtensions_SUBPROJECTS += \
WETableView
+
+# framework support
+
+WEExtensions_HEADER_FILES = $(libWEExtensions_HEADER_FILES)
+WEExtensions_OBJC_FILES = $(libWEExtensions_OBJC_FILES)
+WEExtensions_SUBPROJECTS = $(libWEExtensions_SUBPROJECTS)
+
+# bundle
+
WEExtensions_OBJC_FILES = WEExtensionsBundle.m
WEExtensions_PRINCIPAL_CLASS = WEExtensionsBundle
+
+# building
+
-include GNUmakefile.preamble
+ifneq ($(frameworks),yes)
include $(GNUSTEP_MAKEFILES)/library.make
include $(GNUSTEP_MAKEFILES)/bundle.make
+else
+include $(GNUSTEP_MAKEFILES)/framework.make
+endif
-include GNUmakefile.postamble
-include fhs.make
# compiler flags
+SOPE_ROOT=../..
ADDITIONAL_CPPFLAGS += -Wall
ADDITIONAL_INCLUDE_DIRS += \
- -I.. -I../.. -I../NGObjWeb \
- -I../../sope-core/NGStreams \
- -I../../sope-core/NGExtensions \
- -I../../sope-core \
- -I../../sope-xml
+ -I.. -I$(SOPE_ROOT) -I../NGObjWeb \
+ -I$(SOPE_ROOT)/sope-core/NGStreams \
+ -I$(SOPE_ROOT)/sope-core/NGExtensions \
+ -I$(SOPE_ROOT)/sope-core \
+ -I$(SOPE_ROOT)/sope-xml
ifneq ($(GNUSTEP_BUILD_DIR),)
libWEExtensions_SOVERSION=$(MAJOR_VERSION).$(MINOR_VERSION)
libWEExtensions_VERSION=$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBMINOR_VERSION)
+
+# dependencies
+
libWEExtensions_LIBRARIES_DEPEND_UPON += \
-lNGObjWeb \
-lNGMime \
-lNGStreams -lNGExtensions -lEOControl \
-lXmlRpc -lDOM -lSaxObjC
-ifneq ($(GNUSTEP_BUILD_DIR),)
-RELBUILD_DIR_APPSERVER=$(GNUSTEP_BUILD_DIR)/..
-RELBUILD_DIR_MIME=$(GNUSTEP_BUILD_DIR)/../../sope-mime
-RELBUILD_DIR_SxCore=$(GNUSTEP_BUILD_DIR)/../../sope-core
-RELBUILD_DIR_SxXml=$(GNUSTEP_BUILD_DIR)/../../sope-xml
+WEExtensions_LIBRARIES_DEPEND_UPON += \
+ -framework NGObjWeb \
+ -framework NGMime \
+ -framework NGStreams -framework NGExtensions -framework EOControl \
+ -framework XmlRpc -framework DOM -framework SaxObjC
+
+
+# library/framework search pathes
+DEP_DIRS = \
+ $(SOPE_ROOT)/sope-mime \
+ $(SOPE_ROOT)/sope-core/NGStreams \
+ $(SOPE_ROOT)/sope-core/NGExtensions \
+ $(SOPE_ROOT)/sope-core/EOControl \
+ $(SOPE_ROOT)/sope-xml/DOM \
+ $(SOPE_ROOT)/sope-xml/XmlRpc \
+ $(SOPE_ROOT)/sope-xml/SaxObjC
+
+ifneq ($(frameworks),yes)
ADDITIONAL_LIB_DIRS += \
- -L$(GNUSTEP_OBJ_DIR) \
- -L$(RELBUILD_DIR_APPSERVER)/NGObjWeb/$(GNUSTEP_OBJ_DIR_NAME) \
- -L$(RELBUILD_DIR_MIME)/$(GNUSTEP_OBJ_DIR_NAME) \
- -L$(RELBUILD_DIR_SxCore)/NGStreams/$(GNUSTEP_OBJ_DIR_NAME) \
- -L$(RELBUILD_DIR_SxCore)/NGExtensions/$(GNUSTEP_OBJ_DIR_NAME) \
- -L$(RELBUILD_DIR_SxCore)/EOControl/$(GNUSTEP_OBJ_DIR_NAME) \
- -L$(RELBUILD_DIR_SxXml)/XmlRpc/$(GNUSTEP_OBJ_DIR_NAME) \
- -L$(RELBUILD_DIR_SxXml)/DOM/$(GNUSTEP_OBJ_DIR_NAME) \
- -L$(RELBUILD_DIR_SxXml)/SaxObjC/$(GNUSTEP_OBJ_DIR_NAME)
+ $(foreach dir,$(DEP_DIRS),\
+ -L$(GNUSTEP_BUILD_DIR)/$(dir)/$(GNUSTEP_OBJ_DIR_NAME))
else
ADDITIONAL_LIB_DIRS += \
- -L./$(GNUSTEP_OBJ_DIR) \
- -L../NGObjWeb/$(GNUSTEP_OBJ_DIR) \
- -L../../sope-mime/$(GNUSTEP_OBJ_DIR) \
- -L../../sope-core/NGStreams/$(GNUSTEP_OBJ_DIR) \
- -L../../sope-core/NGExtensions/$(GNUSTEP_OBJ_DIR) \
- -L../../sope-core/EOControl/$(GNUSTEP_OBJ_DIR) \
- -L../../sope-xml/XmlRpc/$(GNUSTEP_OBJ_DIR) \
- -L../../sope-xml/DOM/$(GNUSTEP_OBJ_DIR) \
- -L../../sope-xml/SaxObjC/$(GNUSTEP_OBJ_DIR)
+ $(foreach dir,$(DEP_DIRS),-F$(GNUSTEP_BUILD_DIR)/$(dir))
endif
+SYSTEM_LIB_DIR += -L/usr/local/lib -L/usr/lib
+
+
+# bundle dependencies
+
WEExtensions_BUNDLE_LIBS += \
-lWEExtensions \
-lNGObjWeb \
include ../Version
include ./Version
-LIBRARY_NAME = libWEPrototype
+ifneq ($(frameworks),yes)
+LIBRARY_NAME = libWEPrototype
+else
+FRAMEWORK_NAME = WEPrototype
+endif
+
+
+# TODO: can we save the .wox with frameworks?
BUNDLE_NAME = WEPrototype
BUNDLE_EXTENSION = .wox
BUNDLE_INSTALL_DIR = $(GNUSTEP_INSTALLATION_DIR)/Library/WOxElemBuilders-$(MAJOR_VERSION).$(MINOR_VERSION)/
WEPrototype_OBJC_FILES = WEPrototypeBundle.m
WEPrototype_PRINCIPAL_CLASS = WEPrototypeBundle
+# framework support
+
+WEPrototype_HEADER_FILES_DIR = WEPrototype
+WEPrototype_HEADER_FILES = $(libWEPrototype_HEADER_FILES)
+WEPrototype_OBJC_FILES = $(libWEPrototype_OBJC_FILES)
+WEPrototype_SUBPROJECTS = $(libWEPrototype_SUBPROJECTS)
+
+
+# building
+
-include GNUmakefile.preamble
+ifneq ($(frameworks),yes)
include $(GNUSTEP_MAKEFILES)/library.make
+else
+include $(GNUSTEP_MAKEFILES)/framework.make
+endif
include $(GNUSTEP_MAKEFILES)/bundle.make
-include GNUmakefile.postamble
-include fhs.make
include ../Version
include ./Version
+ifneq ($(frameworks),yes)
LIBRARY_NAME = libWOExtensions
+else
+FRAMEWORK_NAME = WOExtensions
+endif
+
+
+# TODO: can we save the .wox with frameworks?
BUNDLE_NAME = WOExtensions
BUNDLE_EXTENSION = .wox
BUNDLE_INSTALL_DIR = $(GNUSTEP_INSTALLATION_DIR)/Library/WOxElemBuilders-$(MAJOR_VERSION).$(MINOR_VERSION)/
WOExtensions_OBJC_FILES += WOExtensionsBuilderModule.m
WOExtensions_PRINCIPAL_CLASS = WOExtensionsBuilderModule
+
+# framework support
+
+WOExtensions_HEADER_FILES_DIR = WOExtensions
+WOExtensions_HEADER_FILES = $(libWOExtensions_HEADER_FILES)
+WOExtensions_OBJC_FILES = $(libWOExtensions_OBJC_FILES)
+WOExtensions_SUBPROJECTS = $(libWOExtensions_SUBPROJECTS)
+
+
+# building
+
-include GNUmakefile.preamble
+ifneq ($(frameworks),yes)
include $(GNUSTEP_MAKEFILES)/library.make
+else
+include $(GNUSTEP_MAKEFILES)/framework.make
+endif
include $(GNUSTEP_MAKEFILES)/bundle.make
-include GNUmakefile.postamble
-include fhs.make
include ../Version
include ./Version
+ifneq ($(frameworks),yes)
LIBRARY_NAME = libWOXML
+else
+FRAMEWORK_NAME = WOXML
+endif
+
+
+libWOXML_HEADER_FILES_DIR = .
+libWOXML_HEADER_FILES_INSTALL_DIR = /WOXML
+
libWOXML_HEADER_FILES += \
WOXML.h \
WOXMLMappingProperty.m \
WOXMLSaxModelHandler.m \
-libWOXML_HEADER_FILES_DIR = .
-libWOXML_HEADER_FILES_INSTALL_DIR = /WOXML
+# framework support
+
+WOXML_HEADER_FILES_DIR = WOXML
+WOXML_HEADER_FILES = $(libWOXML_HEADER_FILES)
+WOXML_OBJC_FILES = $(libWOXML_OBJC_FILES)
+WOXML_SUBPROJECTS = $(libWOXML_SUBPROJECTS)
+
+
+# building
-include GNUmakefile.preamble
+ifneq ($(frameworks),yes)
include $(GNUSTEP_MAKEFILES)/library.make
+else
+include $(GNUSTEP_MAKEFILES)/framework.make
+endif
-include GNUmakefile.postamble
-include fhs.make