GNUSTEP_INSTALLATION_DIR = $(GNUSTEP_LOCAL_ROOT)
+ifneq ($(frameworks),yes)
LIBRARY_NAME = libNGMime
+else
+FRAMEWORK_NAME = NGMime
+endif
libNGMime_HEADER_FILES_DIR = .
libNGMime_HEADER_FILES_INSTALL_DIR = /NGMime
libNGMime_SUBPROJECTS = NGMime NGMail NGImap4
-ADDITIONAL_CPPFLAGS += -DLIBRARY_MAJOR_VERSION=${MAJOR_VERSION} \
- -DLIBRARY_MINOR_VERSION=${MINOR_VERSION} \
- -DLIBRARY_SUBMINOR_VERSION=${SUBMINOR_VERSION} \
+
+# framework support
+
+NGMime_HEADER_FILES = $(libNGMime_HEADER_FILES)
+NGMime_OBJC_FILES = $(libNGMime_OBJC_FILES)
+NGMime_SUBPROJECTS = $(libNGMime_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
-# $Id$
+# compilation settings
-ADDITIONAL_CPPFLAGS += -Wall
+ifeq ($(FOUNDATION_LIB),apple)
+NGMime_INSTALL_DIR = /Library/Frameworks/
+endif
-libNGMime_LIBRARIES_DEPEND_UPON += \
- -lNGStreams -lNGExtensions -lEOControl \
- -lDOM -lSaxObjC
+ADDITIONAL_CPPFLAGS += -DLIBRARY_MAJOR_VERSION=${MAJOR_VERSION} \
+ -DLIBRARY_MINOR_VERSION=${MINOR_VERSION} \
+ -DLIBRARY_SUBMINOR_VERSION=${SUBMINOR_VERSION} \
+
+ADDITIONAL_CPPFLAGS += -Wall
libNGMime_INCLUDE_DIRS += \
-I.. \
-I../sope-core/NGStreams/ \
-I../sope-core/NGExtensions/
-ifneq ($(GNUSTEP_BUILD_DIR),)
-RELBUILD_DIR_SxCore=$(GNUSTEP_BUILD_DIR)/../sope-core
-RELBUILD_DIR_SxXml=$(GNUSTEP_BUILD_DIR)/../sope-xml
-libNGMime_LIB_DIRS += \
- -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)/DOM/$(GNUSTEP_OBJ_DIR_NAME) \
- -L$(RELBUILD_DIR_SxXml)/SaxObjC/$(GNUSTEP_OBJ_DIR_NAME)
+libNGMime_LIBRARIES_DEPEND_UPON += \
+ -lNGStreams -lNGExtensions -lEOControl \
+ -lDOM -lSaxObjC
+
+NGMime_LIBRARIES_DEPEND_UPON += \
+ -framework NGStreams -framework NGExtensions -framework EOControl \
+ -framework DOM -framework SaxObjC
+
+
+# library/framework search pathes
+
+DEP_DIRS = \
+ ../sope-core/EOControl ../sope-core/NGExtensions \
+ ../sope-core/NGStreams \
+ ../sope-xml/DOM ../sope-xml/SaxObjC
+
+ifneq ($(frameworks),yes)
+ADDITIONAL_LIB_DIRS += \
+ $(foreach dir,$(DEP_DIRS),\
+ -L$(GNUSTEP_BUILD_DIR)/$(dir)/$(GNUSTEP_OBJ_DIR_NAME))
else
-libNGMime_LIB_DIRS += \
- -L../sope-core/NGStreams/$(GNUSTEP_OBJ_DIR) \
- -L../sope-core/NGExtensions/$(GNUSTEP_OBJ_DIR) \
- -L../sope-core/EOControl/$(GNUSTEP_OBJ_DIR) \
- -L../sope-xml/DOM/$(GNUSTEP_OBJ_DIR) \
- -L../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
+
+
# Apple