# compilation settings

ADDITIONAL_INCLUDE_DIRS += \
	-I./NGExtensions/	\
	-I./FdExt.subproj/ -I./EOExt.subproj/

ADDITIONAL_CPP_FLAGS     += -Wall -Wno-import -Wno-protocol -O2
libNGExtensions_INCLUDE_DIRS += -I..


# Parameters for resource lookup

ifneq ($(FHS_INSTALL_ROOT),)
ADDITIONAL_CPPFLAGS += -DFHS_INSTALL_ROOT=\@\"$(FHS_INSTALL_ROOT)\"
endif

ifeq ($(CONFIGURE_64BIT),yes)
ADDITIONAL_CPPFLAGS += -DCONFIGURE_64BIT=1
endif


# dependencies

libNGExtensions_LIBRARIES_DEPEND_UPON += \
	-lEOControl -lDOM -lSaxObjC \
	-lz $(BASE_LIBS)

NGExtensions_LIBRARIES_DEPEND_UPON += \
	-framework EOControl \
	-framework DOM -framework SaxObjC \
	-lz


# library/framework search pathes

DEP_DIRS = \
	../EOControl \
	../../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
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)
libNGExtensions_PREBIND_ADDR="0xC1200000"
libNGExtensions_LDFLAGS += -seg1addr $(libNGExtensions_PREBIND_ADDR)
endif


# platform specific settings

ifeq ($(GNUSTEP_HOST_OS),rhapsody5.5)
#libNGExtensions_LIBRARIES_DEPEND_UPON += -lFoundationExt
endif

ifeq ($(GNUSTEP_TARGET_OS),freebsd)
libNGExtensions_LIB_DIRS += -L/usr/local/lib
libNGExtensions_LIBRARIES_DEPEND_UPON += -liconv
endif

# Foundation specific settings

ifeq ($(FOUNDATION_LIB),nx)
ADDITIONAL_LDFLAGS += -framework Foundation
endif
