From: helge Date: Tue, 9 Aug 2005 21:31:27 +0000 (+0000) Subject: added OSX framework support X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=137c2f067643dae7c16deb5835e92f23b1fe2004;p=sope added OSX framework support git-svn-id: http://svn.opengroupware.org/SOPE/trunk@1018 e4a50df8-12e2-0310-a44c-efbce7f8a7e3 --- diff --git a/sope-xml/ChangeLog b/sope-xml/ChangeLog index e857d6dc..7150bc4f 100644 --- a/sope-xml/ChangeLog +++ b/sope-xml/ChangeLog @@ -1,3 +1,7 @@ +2005-08-09 Helge Hess + + * all makefiles: added flags to build only frameworks on MacOSX + 2004-10-17 Helge Hess * all makefiles: include config.make if available diff --git a/sope-xml/DOM/GNUmakefile b/sope-xml/DOM/GNUmakefile index 73e4a057..8c569997 100644 --- a/sope-xml/DOM/GNUmakefile +++ b/sope-xml/DOM/GNUmakefile @@ -3,8 +3,11 @@ -include ../../config.make include ../common.make +ifneq ($(frameworks),yes) LIBRARY_NAME = libDOM +else FRAMEWORK_NAME = DOM +endif libDOM_HEADER_FILES_DIR = . libDOM_HEADER_FILES_INSTALL_DIR = /DOM @@ -93,13 +96,15 @@ libDOM_OBJC_FILES = \ $(DOM_CORE_OBJC_FILES) \ $(DOM_TRAVERSAL_OBJC_FILES) \ +# framework support DOM_HEADER_FILES = $(libDOM_HEADER_FILES) DOM_OBJC_FILES = $(libDOM_OBJC_FILES) + -include GNUmakefile.preamble +ifneq ($(frameworks),yes) include $(GNUSTEP_MAKEFILES)/library.make - -ifeq ($(FOUNDATION_LIB),apple) +else include $(GNUSTEP_MAKEFILES)/framework.make endif -include GNUmakefile.postamble diff --git a/sope-xml/DOM/GNUmakefile.preamble b/sope-xml/DOM/GNUmakefile.preamble index 5c027fd2..ca22d697 100644 --- a/sope-xml/DOM/GNUmakefile.preamble +++ b/sope-xml/DOM/GNUmakefile.preamble @@ -1,15 +1,22 @@ # compilation settings +ifeq ($(FOUNDATION_LIB),apple) +DOM_INSTALL_DIR = /Library/Frameworks/ +endif + ADDITIONAL_INCLUDE_DIRS += -I.. -I../.. libDOM_LIBRARIES_DEPEND_UPON += -lSaxObjC ifneq ($(GNUSTEP_BUILD_DIR),) libDOM_LIB_DIRS += -L$(GNUSTEP_BUILD_DIR)/../SaxObjC/$(GNUSTEP_OBJ_DIR_NAME) +DOM_LIB_DIRS += -F$(GNUSTEP_BUILD_DIR)/../SaxObjC/ else libDOM_LIB_DIRS += -L../SaxObjC/$(GNUSTEP_OBJ_DIR) +DOM_LIB_DIRS += -F../SaxObjC/ endif + # Apple ifeq ($(FOUNDATION_LIB),apple) diff --git a/sope-xml/GNUmakefile b/sope-xml/GNUmakefile index 7a0a94b2..46588642 100644 --- a/sope-xml/GNUmakefile +++ b/sope-xml/GNUmakefile @@ -9,12 +9,17 @@ VERSION=4.5.0 SUBPROJECTS = \ SaxObjC \ DOM \ - STXSaxDriver \ XmlRpc \ samples +ifneq ($(frameworks),yes) + +SUBPROJECTS += STXSaxDriver + ifeq ($(HAS_LIBRARY_xml2),yes) SUBPROJECTS += libxmlSAXDriver endif +endif + include $(GNUSTEP_MAKEFILES)/aggregate.make diff --git a/sope-xml/SaxObjC/GNUmakefile b/sope-xml/SaxObjC/GNUmakefile index 69ecf8d6..b55859d5 100644 --- a/sope-xml/SaxObjC/GNUmakefile +++ b/sope-xml/SaxObjC/GNUmakefile @@ -3,8 +3,11 @@ -include ../../config.make include ../common.make +ifneq ($(frameworks),yes) LIBRARY_NAME = libSaxObjC +else FRAMEWORK_NAME = SaxObjC +endif libSaxObjC_DLL_DEF = libSaxObjC.def libSaxObjC_SOVERSION=$(MAJOR_VERSION).$(MINOR_VERSION) @@ -57,10 +60,9 @@ SaxObjC_OBJC_FILES = $(libSaxObjC_OBJC_FILES) # flags -include GNUmakefile.preamble - +ifneq ($(frameworks),yes) include $(GNUSTEP_MAKEFILES)/library.make - -ifeq ($(FOUNDATION_LIB),apple) +else include $(GNUSTEP_MAKEFILES)/framework.make endif -include GNUmakefile.postamble diff --git a/sope-xml/SaxObjC/GNUmakefile.preamble b/sope-xml/SaxObjC/GNUmakefile.preamble index a662ef00..c118ea31 100644 --- a/sope-xml/SaxObjC/GNUmakefile.preamble +++ b/sope-xml/SaxObjC/GNUmakefile.preamble @@ -1,5 +1,9 @@ # compilation settings +ifeq ($(FOUNDATION_LIB),apple) +SaxObjC_INSTALL_DIR = /Library/Frameworks/ +endif + ADDITIONAL_CPPFLAGS += \ -Wall -DCOMPILE_FOR_GSTEP_MAKE=1 \ -DSOPE_MAJOR_VERSION=$(MAJOR_VERSION) \ diff --git a/sope-xml/XmlRpc/GNUmakefile b/sope-xml/XmlRpc/GNUmakefile index 6283f8a7..e623ec3c 100644 --- a/sope-xml/XmlRpc/GNUmakefile +++ b/sope-xml/XmlRpc/GNUmakefile @@ -3,8 +3,11 @@ -include ../../config.make include ../common.make +ifneq ($(frameworks),yes) LIBRARY_NAME = libXmlRpc +else FRAMEWORK_NAME = XmlRpc +endif libXmlRpc_HEADER_FILES_DIR = . libXmlRpc_HEADER_FILES_INSTALL_DIR = /XmlRpc @@ -39,13 +42,15 @@ libXmlRpc_OBJC_FILES = \ NSString+XmlRpcCoding.m \ NSURL+XmlRpcCoding.m \ +# framework support XmlRpc_HEADER_FILES = $(libXmlRpc_HEADER_FILES) XmlRpc_OBJC_FILES = $(libXmlRpc_OBJC_FILES) + -include GNUmakefile.preamble +ifneq ($(frameworks),yes) include $(GNUSTEP_MAKEFILES)/library.make - -ifeq ($(FOUNDATION_LIB),apple) +else include $(GNUSTEP_MAKEFILES)/framework.make endif -include GNUmakefile.postamble diff --git a/sope-xml/XmlRpc/GNUmakefile.preamble b/sope-xml/XmlRpc/GNUmakefile.preamble index 876989ca..ea0a30c3 100644 --- a/sope-xml/XmlRpc/GNUmakefile.preamble +++ b/sope-xml/XmlRpc/GNUmakefile.preamble @@ -1,15 +1,21 @@ # compilation settings +ifeq ($(FOUNDATION_LIB),apple) +XmlRpc_INSTALL_DIR = /Library/Frameworks/ +endif + libXmlRpc_LIBRARIES_DEPEND_UPON += -lSaxObjC -lDOM ifneq ($(GNUSTEP_BUILD_DIR),) libXmlRpc_LIB_DIRS += \ -L$(GNUSTEP_BUILD_DIR)/../SaxObjC/$(GNUSTEP_OBJ_DIR_NAME) \ -L$(GNUSTEP_BUILD_DIR)/../DOM/$(GNUSTEP_OBJ_DIR_NAME) +XmlRpc_LIB_DIRS += -F$(GNUSTEP_BUILD_DIR)/../SaxObjC/ else libXmlRpc_LIB_DIRS += \ -L../SaxObjC/$(GNUSTEP_OBJ_DIR) \ -L../DOM/$(GNUSTEP_OBJ_DIR) +XmlRpc_LIB_DIRS += -F../SaxObjC/ endif diff --git a/sope-xml/samples/GNUmakefile.preamble b/sope-xml/samples/GNUmakefile.preamble index bdd0263f..01b9b89f 100644 --- a/sope-xml/samples/GNUmakefile.preamble +++ b/sope-xml/samples/GNUmakefile.preamble @@ -1,26 +1,36 @@ # compilation settings + +ifneq ($(frameworks),yes) domxml_TOOL_LIBS += -lDOM -lSaxObjC testqp_TOOL_LIBS += -lDOM -lSaxObjC +ADDITIONAL_TOOL_LIBS += -lSaxObjC +else +domxml_TOOL_LIBS += -framework DOM -framework SaxObjC +testqp_TOOL_LIBS += -framework DOM -framework SaxObjC +ADDITIONAL_TOOL_LIBS += -framework SaxObjC +endif + ADDITIONAL_CPPFLAGS += -Wno-protocol -ADDITIONAL_TOOL_LIBS += -lSaxObjC # only with libFoundation #ADDITIONAL_TOOL_LIBS += -lEOControl ADDITIONAL_INCLUDE_DIRS += -I.. -ifneq ($(GNUSTEP_BUILD_DIR),) + +# library/framework search pathes + +DEP_DIRS = ../SaxObjC ../DOM ../XmlRpc + +ifneq ($(frameworks),yes) ADDITIONAL_LIB_DIRS += \ - -L$(GNUSTEP_BUILD_DIR)/../DOM/$(GNUSTEP_OBJ_DIR_NAME) \ - -L$(GNUSTEP_BUILD_DIR)/../SaxObjC/$(GNUSTEP_OBJ_DIR_NAME) \ - -L$(GNUSTEP_BUILD_DIR)/../XmlRpc/$(GNUSTEP_OBJ_DIR_NAME) + $(foreach dir,$(DEP_DIRS),\ + -L$(GNUSTEP_BUILD_DIR)/$(dir)/$(GNUSTEP_OBJ_DIR_NAME)) else ADDITIONAL_LIB_DIRS += \ - -L../DOM/$(GNUSTEP_OBJ_DIR) \ - -L../SaxObjC/$(GNUSTEP_OBJ_DIR) \ - -L../XmlRpc/$(GNUSTEP_OBJ_DIR) + $(foreach dir,$(DEP_DIRS),-F$(GNUSTEP_BUILD_DIR)/$(dir)) endif SYSTEM_LIB_DIR += -L/usr/local/lib -L/usr/lib