+2005-08-11 Helge Hess <helge.hess@opengroupware.org>
+
+ * more work on OSX framework support
+
2005-08-10 Helge Hess <helge.hess@opengroupware.org>
* prepared for OSX frameworks
OFSFolderDataSource.m \
+ifeq ($(frameworks),yes)
# framework support
-SoOFS_HEADER_FILES = $(libSoOFS_HEADER_FILES)
-SoOFS_OBJC_FILES = $(libSoOFS_OBJC_FILES)
+SoOFS_HEADER_FILES = $(libSoOFS_HEADER_FILES)
+SoOFS_OBJC_FILES = $(libSoOFS_OBJC_FILES) SoOFSProduct.m
+SoOFS_RESOURCE_FILES = product.plist Version
+SoOFS_PRINCIPAL_CLASS = SoOFSProduct
+else
# ----- SoCore product for SOPE core registrations
SoOFS_RESOURCE_FILES = product.plist Version
SoOFS_PRINCIPAL_CLASS = SoOFSProduct
+endif
+
# ----- NGObjWeb tools
-include GNUmakefile.preamble
ifneq ($(frameworks),yes)
include $(GNUSTEP_MAKEFILES)/library.make
+include $(GNUSTEP_MAKEFILES)/bundle.make
else
include $(GNUSTEP_MAKEFILES)/framework.make
endif
-include $(GNUSTEP_MAKEFILES)/bundle.make
include $(GNUSTEP_MAKEFILES)/tool.make
-include GNUmakefile.postamble
-include fhs.make
-I$(SOPE_ROOT)/sope-xml
+ifneq ($(frameworks),yes)
+
libSoOFS_LIBRARIES_DEPEND_UPON += \
-lNGObjWeb \
-lNGMime -lNGStreams -lNGExtensions -lEOControl \
-lXmlRpc -lDOM -lSaxObjC
SoOFS_BUNDLE_LIBS += $(SoOFS_WOBUNDLE_LIBS)
-ifneq ($(GNUSTEP_BUILD_DIR),)
-RELBUILD_DIR_SOPE=$(GNUSTEP_BUILD_DIR)/..
-RELBUILD_DIR_MIME=$(GNUSTEP_BUILD_DIR)/../../sope-mime
-RELBUILD_DIR_SxCore=$(GNUSTEP_BUILD_DIR)/$(CORE_ROOT)
-RELBUILD_DIR_SxXml=$(GNUSTEP_BUILD_DIR)/../../sope-xml
+else
+
+SoOFS_LIBRARIES_DEPEND_UPON += \
+ -framework NGObjWeb \
+ -framework NGMime \
+ -framework NGStreams -framework NGExtensions -framework EOControl \
+ -framework XmlRpc -framework DOM -framework SaxObjC
-ADDITIONAL_LIB_DIRS += \
- -L$(GNUSTEP_OBJ_DIR) \
- -L$(RELBUILD_DIR_SOPE)/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)
+$(SOPED_NAME)_TOOL_LIBS += \
+ -framework SoOFS -framework NGObjWeb \
+ -framework NGMime \
+ -framework NGStreams -framework NGExtensions -framework EOControl \
+ -framework XmlRpc -framework DOM -framework SaxObjC
+
+endif
+
+# library/framework search pathes
+
+DEP_DIRS = \
+ . ../NGObjWeb \
+ $(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 += \
+ $(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_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)
+ $(foreach dir,$(DEP_DIRS),-F$(GNUSTEP_BUILD_DIR)/$(dir))
endif
SYSTEM_LIB_DIR += -L/usr/local/lib -L/usr/lib
+
+
# platform specific settings
ifneq ($(findstring openbsd3, $(GNUSTEP_TARGET_OS)), openbsd3)
include ../Version
include ./Version
+
ifneq ($(frameworks),yes)
LIBRARY_NAME = libWEExtensions
+
+BUNDLE_NAME = WEExtensions
+BUNDLE_EXTENSION = .wox
+BUNDLE_INSTALL_DIR = $(GNUSTEP_INSTALLATION_DIR)/Library/WOxElemBuilders-$(MAJOR_VERSION).$(MINOR_VERSION)/
+
else
FRAMEWORK_NAME = WEExtensions
endif
-BUNDLE_NAME = WEExtensions
-BUNDLE_EXTENSION = .wox
-BUNDLE_INSTALL_DIR = $(GNUSTEP_INSTALLATION_DIR)/Library/WOxElemBuilders-$(MAJOR_VERSION).$(MINOR_VERSION)/
FHS_MANPAGES += doc/*.3
WETableView
+ifeq ($(frameworks),yes)
# framework support
WEExtensions_HEADER_FILES = $(libWEExtensions_HEADER_FILES)
-WEExtensions_OBJC_FILES = $(libWEExtensions_OBJC_FILES)
+WEExtensions_OBJC_FILES = $(libWEExtensions_OBJC_FILES) WEExtensionsBundle.m
WEExtensions_SUBPROJECTS = $(libWEExtensions_SUBPROJECTS)
+WEExtensions_PRINCIPAL_CLASS = WEExtensionsBundle
+WEExtensions_RESOURCE_FILES += bundle-info.plist Version *.api
+else
# bundle
WEExtensions_OBJC_FILES = WEExtensionsBundle.m
WEExtensions_PRINCIPAL_CLASS = WEExtensionsBundle
+endif
# building
-lNGStreams -lNGExtensions -lEOControl \
-lXmlRpc -lDOM -lSaxObjC
+ifeq ($(frameworks),yes)
WEExtensions_LIBRARIES_DEPEND_UPON += \
-framework NGObjWeb \
-framework NGMime \
-framework NGStreams -framework NGExtensions -framework EOControl \
-framework XmlRpc -framework DOM -framework SaxObjC
+endif
# library/framework search pathes
DEP_DIRS = \
+ ../NGObjWeb \
$(SOPE_ROOT)/sope-mime \
$(SOPE_ROOT)/sope-core/NGStreams \
$(SOPE_ROOT)/sope-core/NGExtensions \
# bundle dependencies
+ifneq ($(frameworks),yes)
+
WEExtensions_BUNDLE_LIBS += \
-lWEExtensions \
-lNGObjWeb \
else
WEExtensions_LIB_DIRS += -L./$(GNUSTEP_OBJ_DIR)
endif
+endif
+
# Apple
ifneq ($(frameworks),yes)
LIBRARY_NAME = libWOExtensions
+BUNDLE_NAME = WOExtensions
+BUNDLE_EXTENSION = .wox
+BUNDLE_INSTALL_DIR = $(GNUSTEP_INSTALLATION_DIR)/Library/WOxElemBuilders-$(MAJOR_VERSION).$(MINOR_VERSION)/
+
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)/
-
FHS_MANPAGES += doc/*.3
libWOExtensions_HEADER_FILES_DIR = .
WORadioButtonMatrix.m \
WOCheckBoxMatrix.m \
-WOExtensions_OBJC_FILES += WOExtensionsBuilderModule.m
-WOExtensions_PRINCIPAL_CLASS = WOExtensionsBuilderModule
+ifeq ($(frameworks),yes)
# framework support
-WOExtensions_HEADER_FILES_DIR = WOExtensions
WOExtensions_HEADER_FILES = $(libWOExtensions_HEADER_FILES)
-WOExtensions_OBJC_FILES = $(libWOExtensions_OBJC_FILES)
+
+WOExtensions_OBJC_FILES = \
+ $(libWOExtensions_OBJC_FILES) \
+ WOExtensionsBuilderModule.m
+
WOExtensions_SUBPROJECTS = $(libWOExtensions_SUBPROJECTS)
+WOExtensions_PRINCIPAL_CLASS = WOExtensionsBuilderModule
+WOExtensions_RESOURCE_FILES += bundle-info.plist Version *.api
+else
+# bundle
+WOExtensions_OBJC_FILES += WOExtensionsBuilderModule.m
+WOExtensions_PRINCIPAL_CLASS = WOExtensionsBuilderModule
+endif
# 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 $(GNUSTEP_MAKEFILES)/bundle.make
-include GNUmakefile.postamble
-include fhs.make
# compile flags
+SOPE_ROOT=../..
ADDITIONAL_CPPFLAGS += -Wall
ADDITIONAL_INCLUDE_DIRS += \
libWOExtensions_VERSION=$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBMINOR_VERSION)
+# dependencies
+
libWOExtensions_LIBRARIES_DEPEND_UPON += \
-lWEExtensions \
-lNGObjWeb \
-lNGStreams -lNGExtensions -lEOControl \
-lXmlRpc -lDOM -lSaxObjC
+ifeq ($(frameworks),yes)
+WOExtensions_LIBRARIES_DEPEND_UPON += \
+ -framework WEExtensions \
+ -framework NGObjWeb \
+ -framework NGMime \
+ -framework NGStreams -framework NGExtensions -framework EOControl \
+ -framework XmlRpc -framework DOM -framework SaxObjC
+endif
+
-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
+# library/framework search pathes
+DEP_DIRS = \
+ ../WEExtensions \
+ ../NGObjWeb \
+ $(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)/WEExtensions/$(GNUSTEP_OBJ_DIR_NAME)\
- -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../WEExtensions/$(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
+
+ifneq ($(frameworks),yes)
+
WOExtensions_BUNDLE_LIBS += \
-lWOExtensions -lWEExtensions \
-lNGObjWeb \
-lXmlRpc -lDOM -lSaxObjC
WOExtensions_WOBUNDLE_LIBS += $(WOExtensions_BUNDLE_LIBS)
+endif
+
+
# Apple
ifeq ($(FOUNDATION_LIB),apple)
# framework support
-WOXML_HEADER_FILES_DIR = WOXML
WOXML_HEADER_FILES = $(libWOXML_HEADER_FILES)
WOXML_OBJC_FILES = $(libWOXML_OBJC_FILES)
WOXML_SUBPROJECTS = $(libWOXML_SUBPROJECTS)
-# $Id$
+# compilation settings
+
+SOPE_ROOT=../..
libWOXML_SOVERSION=$(MAJOR_VERSION).$(MINOR_VERSION)
libWOXML_VERSION=$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBMINOR_VERSION)
libWOXML_INCLUDE_DIRS += -I. -I..
+
+# dependencies
+
libWOXML_LIBRARIES_DEPEND_UPON += -lDOM -lSaxObjC
+WOXML_LIBRARIES_DEPEND_UPON += -framework DOM -framework SaxObjC
+
+
+# library/framework search pathes
+DEP_DIRS = \
+ $(SOPE_ROOT)/sope-xml/DOM \
+ $(SOPE_ROOT)/sope-xml/SaxObjC
+
+ifneq ($(frameworks),yes)
+ADDITIONAL_LIB_DIRS += \
+ $(foreach dir,$(DEP_DIRS),\
+ -L$(GNUSTEP_BUILD_DIR)/$(dir)/$(GNUSTEP_OBJ_DIR_NAME))
+else
ADDITIONAL_LIB_DIRS += \
- -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
+
# Apple
# compile settings
+SOPE_ROOT=../../..
+
# CoreData files
# static references required for Mach linker
-ADDITIONAL_LDFLAGS += \
+ADDITIONAL_TOOL_LIBS += \
-framework CoreData \
-framework CoreServices
+ifneq ($(frameworks),yes)
ADDITIONAL_TOOL_LIBS += \
-lEOCoreData \
-lEOControl \
-lDOM -lXmlRpc -lSaxObjC
-
-ADDITIONAL_LIB_DIRS += -L/usr/local/lib -L/usr/lib
+else
+ADDITIONAL_TOOL_LIBS += \
+ -framework EOCoreData \
+ -framework EOControl \
+ -framework XmlRpc -framework DOM -framework SaxObjC
+endif
+
+
+# library/framework search pathes
+
+DEP_DIRS = \
+ $(SOPE_ROOT)/sope-mime \
+ $(SOPE_ROOT)/sope-core/EOCoreData \
+ $(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 += \
+ $(foreach dir,$(DEP_DIRS),\
+ -L$(GNUSTEP_BUILD_DIR)/$(dir)/$(GNUSTEP_OBJ_DIR_NAME))
+else
+ADDITIONAL_LIB_DIRS += \
+ $(foreach dir,$(DEP_DIRS),-F$(GNUSTEP_BUILD_DIR)/$(dir))
+endif
+
+SYSTEM_LIB_DIR += -L/usr/local/lib -L/usr/lib