# compiler flags
+SOPE_ROOT=../..
+# TODO: remove for framework builds?
ADDITIONAL_CPPFLAGS += \
- -Wall -DCOMPILE_FOR_GSTEP_MAKE=1 \
+ -DCOMPILE_FOR_GSTEP_MAKE=1
+
+ADDITIONAL_CPPFLAGS += \
+ -Wall \
-DSOPE_MAJOR_VERSION=$(MAJOR_VERSION) \
-DSOPE_MINOR_VERSION=$(MINOR_VERSION) \
-DWEP_SUBMINOR_VERSION=$(SUBMINOR_VERSION)
ADDITIONAL_CPPFLAGS += -Wall
ADDITIONAL_INCLUDE_DIRS += \
- -I.. -I../.. -I../NGObjWeb \
- -I../../sope-core/NGStreams \
- -I../../sope-core/NGExtensions \
- -I../../sope-core \
- -I../../sope-xml
+ -I.. -I$(SOPE_ROOT) -I../NGObjWeb \
+ -I$(SOPE_ROOT)/sope-core/NGStreams \
+ -I$(SOPE_ROOT)/sope-core/NGExtensions \
+ -I$(SOPE_ROOT)/sope-core \
+ -I$(SOPE_ROOT)/sope-xml
libWEPrototype_SOVERSION=$(MAJOR_VERSION).$(MINOR_VERSION)
-lNGStreams -lNGExtensions -lEOControl \
-lXmlRpc -lDOM -lSaxObjC
-ifneq ($(GNUSTEP_BUILD_DIR),)
-RELBUILD_DIR_APPSERVER=$(GNUSTEP_BUILD_DIR)/..
-RELBUILD_DIR_MIME=$(GNUSTEP_BUILD_DIR)/../../sope-mime
-RELBUILD_DIR_SxCore=$(GNUSTEP_BUILD_DIR)/../../sope-core
-RELBUILD_DIR_SxXml=$(GNUSTEP_BUILD_DIR)/../../sope-xml
+ifeq ($(frameworks),yes)
+WEPrototype_LIBRARIES_DEPEND_UPON += \
+ -framework NGObjWeb \
+ -framework NGMime -framework NGMail \
+ -framework NGStreams -framework NGExtensions -framework EOControl \
+ -framework XmlRpc -framework DOM -framework SaxObjC
+endif
+
+
+# library/framework search pathes
+
+DEP_DIRS = \
+ ../NGObjWeb \
+ $(SOPE_ROOT)/sope-mime \
+ $(SOPE_ROOT)/sope-mime/NGMail \
+ $(SOPE_ROOT)/sope-core/NGStreams \
+ $(SOPE_ROOT)/sope-core/NGExtensions \
+ $(SOPE_ROOT)/sope-core/EOControl \
+ $(SOPE_ROOT)/sope-xml/DOM \
+ $(SOPE_ROOT)/sope-xml/XmlRpc \
+ $(SOPE_ROOT)/sope-xml/SaxObjC
+
+ifneq ($(frameworks),yes)
ADDITIONAL_LIB_DIRS += \
- -L$(GNUSTEP_OBJ_DIR) \
- -L$(RELBUILD_DIR_APPSERVER)/NGObjWeb/$(GNUSTEP_OBJ_DIR_NAME) \
- -L$(RELBUILD_DIR_MIME)/$(GNUSTEP_OBJ_DIR_NAME) \
- -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)/XmlRpc/$(GNUSTEP_OBJ_DIR_NAME) \
- -L$(RELBUILD_DIR_SxXml)/DOM/$(GNUSTEP_OBJ_DIR_NAME) \
- -L$(RELBUILD_DIR_SxXml)/SaxObjC/$(GNUSTEP_OBJ_DIR_NAME)
+ $(foreach dir,$(DEP_DIRS),\
+ -L$(GNUSTEP_BUILD_DIR)/$(dir)/$(GNUSTEP_OBJ_DIR_NAME))
else
ADDITIONAL_LIB_DIRS += \
- -L./$(GNUSTEP_OBJ_DIR) \
- -L../NGObjWeb/$(GNUSTEP_OBJ_DIR) \
- -L../../sope-mime/$(GNUSTEP_OBJ_DIR) \
- -L../../sope-core/NGStreams/$(GNUSTEP_OBJ_DIR) \
- -L../../sope-core/NGExtensions/$(GNUSTEP_OBJ_DIR) \
- -L../../sope-core/EOControl/$(GNUSTEP_OBJ_DIR) \
- -L../../sope-xml/XmlRpc/$(GNUSTEP_OBJ_DIR) \
- -L../../sope-xml/DOM/$(GNUSTEP_OBJ_DIR) \
- -L../../sope-xml/SaxObjC/$(GNUSTEP_OBJ_DIR)
+ $(foreach dir,$(DEP_DIRS),-F$(GNUSTEP_BUILD_DIR)/$(dir))
endif
+SYSTEM_LIB_DIR += -L/usr/local/lib -L/usr/lib
+
+
+# bundle dependencies
+
+ifneq ($(frameworks),yes)
+
WEPrototype_BUNDLE_LIBS += \
-lWEPrototype \
-lNGObjWeb \
WEPrototype_LIB_DIRS += -L./$(GNUSTEP_OBJ_DIR)
endif
+endif
+
+
# Apple
#ifeq ($(FOUNDATION_LIB),apple)