# compilation settings

SOPE_ROOT=..

ADDITIONAL_CPPFLAGS += -DLIBRARY_MAJOR_VERSION=${MAJOR_VERSION} \
		       -DLIBRARY_MINOR_VERSION=${MINOR_VERSION} \
		       -DLIBRARY_SUBMINOR_VERSION=${SUBMINOR_VERSION} \

ADDITIONAL_CPPFLAGS += -Wall
ifeq ($(PRECOMPILED_HEADERS),yes)
ADDITIONAL_CPPFLAGS += -Winvalid-pch
endif

libNGMime_INCLUDE_DIRS += \
	-I$(SOPE_ROOT)	\
	-I$(SOPE_ROOT)/sope-core/NGStreams/	\
	-I$(SOPE_ROOT)/sope-core/NGExtensions/


libNGMime_LIBRARIES_DEPEND_UPON += \
	-lNGStreams -lNGExtensions -lEOControl	\
	$(BASE_LIBS)

NGMime_LIBRARIES_DEPEND_UPON += \
	-framework NGStreams -framework NGExtensions -framework EOControl \
	-framework DOM -framework SaxObjC


# library/framework search pathes

DEP_DIRS = \
	$(SOPE_ROOT)/sope-core/EOControl $(SOPE_ROOT)/sope-core/NGExtensions \
	$(SOPE_ROOT)/sope-core/NGStreams \
	$(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 += \
	$(foreach dir,$(DEP_DIRS),-F$(GNUSTEP_BUILD_DIR)/$(dir))
endif

ifeq ($(findstring _64, $(GNUSTEP_TARGET_CPU)), _64)
SYSTEM_LIB_DIR += -L/usr/local/lib64 -L/usr/lib64
else
SYSTEM_LIB_DIR += -L/usr/local/lib -L/usr/lib
endif



# Apple

ifeq ($(FOUNDATION_LIB),apple)
libNGMime_PREBIND_ADDR="0xC1A00000"
libNGMime_LDFLAGS += -seg1addr $(libNGMime_PREBIND_ADDR)
endif
