+2005-08-09 Helge Hess <helge.hess@opengroupware.org>
+
+ * all makefiles: added flags to build only frameworks on MacOSX
+
2004-10-17 Helge Hess <helge.hess@opengroupware.org>
* all makefiles: include config.make if available
-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
$(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
# 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)
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
-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)
# 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
# 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) \
-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
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
# 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
# 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