2010-12-03 23:23:30 +01:00
|
|
|
|
2010-10-01 20:54:30 +02:00
|
|
|
# GNUstep makefile
|
|
|
|
|
|
|
|
include ../config.make
|
|
|
|
include $(GNUSTEP_MAKEFILES)/common.make
|
|
|
|
include ../Version
|
|
|
|
|
2010-11-18 23:13:45 +01:00
|
|
|
BACKEND_VERSION = 1.0.0
|
2010-10-01 20:54:30 +02:00
|
|
|
|
2011-11-09 16:02:04 +01:00
|
|
|
UNRTF_VERSION = 0.21.2
|
|
|
|
|
2010-11-18 23:13:45 +01:00
|
|
|
### bootstrap library
|
2010-10-01 20:54:30 +02:00
|
|
|
MAPISTORESOGO = MAPIStoreSOGo
|
|
|
|
LIBRARY_NAME = $(MAPISTORESOGO)
|
2010-11-18 23:13:45 +01:00
|
|
|
|
|
|
|
$(MAPISTORESOGO)_VERSION = $(BACKEND_VERSION)
|
2010-10-01 20:54:30 +02:00
|
|
|
|
|
|
|
$(MAPISTORESOGO)_OBJC_FILES += \
|
2010-11-18 23:13:45 +01:00
|
|
|
MAPIStoreSOGo.m
|
|
|
|
|
|
|
|
### backend bundle
|
|
|
|
SOGOBACKEND = SOGoBackend
|
|
|
|
BUNDLE_NAME = $(SOGOBACKEND)
|
|
|
|
BUNDLE_EXTENSION = .MAPIStore
|
|
|
|
BUNDLE_INSTALL_DIR = $(SOGO_LIBDIR)
|
|
|
|
|
2011-11-09 16:02:04 +01:00
|
|
|
UNRTF_DIR = unrtf-$(UNRTF_VERSION)
|
|
|
|
|
2012-07-25 22:25:01 +02:00
|
|
|
PYTHON = /usr/bin/python
|
2012-08-14 18:32:53 +02:00
|
|
|
PYTHON_IS_GOOD = $(shell $(PYTHON) -c 'from sys import version_info; a=version_info; print a[0] == 2 and a[1] >= 6')
|
2012-07-25 22:25:01 +02:00
|
|
|
ifeq (${PYTHON_IS_GOOD},False)
|
|
|
|
PYTHON = /usr/bin/python2.6
|
|
|
|
endif
|
|
|
|
|
|
|
|
all::
|
|
|
|
@echo " Python executable: ${PYTHON}"
|
|
|
|
|
|
|
|
SAMBA_PRIVATE_DIR = $(shell $(PYTHON) ./samba-get-config.py "private dir")
|
2012-07-24 22:45:03 +02:00
|
|
|
|
2011-12-07 17:13:52 +01:00
|
|
|
$(SOGOBACKEND)_SUBPROJECTS += $(UNRTF_DIR)/src
|
2011-11-09 16:02:04 +01:00
|
|
|
|
2010-11-18 23:13:45 +01:00
|
|
|
$(SOGOBACKEND)_PRINCIPAL_CLASS = MAPIApplication
|
|
|
|
|
|
|
|
$(SOGOBACKEND)_OBJC_FILES += \
|
2010-10-01 20:54:30 +02:00
|
|
|
MAPIApplication.m \
|
2011-05-31 05:39:36 +02:00
|
|
|
MAPIStoreActiveTables.m \
|
2010-10-01 20:54:30 +02:00
|
|
|
MAPIStoreAuthenticator.m \
|
|
|
|
MAPIStoreMapping.m \
|
2011-10-25 20:19:08 +02:00
|
|
|
MAPIStoreMIME.m \
|
2010-11-20 00:01:53 +01:00
|
|
|
MAPIStoreTypes.m \
|
2011-04-13 21:51:13 +02:00
|
|
|
MAPIStorePropertySelectors.m \
|
2011-11-18 16:12:29 +01:00
|
|
|
MAPIStoreSamDBUtils.m \
|
2012-01-29 20:40:44 +01:00
|
|
|
MAPIStoreUserContext.m \
|
2010-10-01 20:54:30 +02:00
|
|
|
\
|
2012-06-29 19:59:38 +02:00
|
|
|
SOGoMAPIObject.m \
|
|
|
|
\
|
|
|
|
SOGoMAPIDBObject.m \
|
|
|
|
SOGoMAPIDBMessage.m \
|
|
|
|
SOGoMAPIDBFolder.m \
|
2011-02-24 21:40:17 +01:00
|
|
|
\
|
2011-07-21 17:05:17 +02:00
|
|
|
MAPIStoreAppointmentWrapper.m \
|
2011-04-01 00:59:15 +02:00
|
|
|
MAPIStoreAttachment.m \
|
|
|
|
MAPIStoreAttachmentTable.m \
|
2011-02-24 21:40:17 +01:00
|
|
|
MAPIStoreContext.m \
|
2011-04-01 00:59:15 +02:00
|
|
|
MAPIStoreEmbeddedMessage.m \
|
2011-02-24 21:40:17 +01:00
|
|
|
MAPIStoreFolder.m \
|
|
|
|
MAPIStoreMessage.m \
|
|
|
|
MAPIStoreObject.m \
|
2012-07-19 21:28:44 +02:00
|
|
|
MAPIStoreObjectProxy.m \
|
2012-06-29 19:59:38 +02:00
|
|
|
MAPIStoreSOGoObject.m \
|
2011-02-24 21:40:17 +01:00
|
|
|
MAPIStoreTable.m \
|
|
|
|
MAPIStoreMessageTable.m \
|
|
|
|
MAPIStoreFolderTable.m \
|
2011-08-02 22:43:33 +02:00
|
|
|
MAPIStorePermissionsTable.m \
|
2011-02-24 21:40:17 +01:00
|
|
|
\
|
2012-06-29 19:59:38 +02:00
|
|
|
MAPIStoreDBBaseContext.m \
|
|
|
|
MAPIStoreDBFolder.m \
|
|
|
|
MAPIStoreDBFolderTable.m \
|
|
|
|
MAPIStoreDBMessage.m \
|
|
|
|
MAPIStoreDBMessageTable.m \
|
2011-02-24 21:40:17 +01:00
|
|
|
\
|
2011-03-07 20:15:16 +01:00
|
|
|
MAPIStoreFAIMessage.m \
|
|
|
|
MAPIStoreFAIMessageTable.m \
|
|
|
|
\
|
2011-02-24 21:40:17 +01:00
|
|
|
MAPIStoreGCSBaseContext.m \
|
|
|
|
MAPIStoreGCSFolder.m \
|
|
|
|
MAPIStoreGCSMessage.m \
|
|
|
|
MAPIStoreGCSMessageTable.m \
|
|
|
|
\
|
2011-04-01 00:59:15 +02:00
|
|
|
MAPIStoreCalendarAttachment.m \
|
2010-10-01 20:54:30 +02:00
|
|
|
MAPIStoreCalendarContext.m \
|
2011-02-24 21:40:17 +01:00
|
|
|
MAPIStoreCalendarFolder.m \
|
|
|
|
MAPIStoreCalendarMessage.m \
|
2012-07-20 17:42:52 +02:00
|
|
|
MAPIStoreCalendarEmbeddedMessage.m \
|
2011-02-24 21:40:17 +01:00
|
|
|
MAPIStoreCalendarMessageTable.m \
|
2011-04-01 00:59:15 +02:00
|
|
|
MAPIStoreRecurrenceUtils.m \
|
2011-02-24 21:40:17 +01:00
|
|
|
\
|
2011-10-24 22:45:05 +02:00
|
|
|
MAPIStoreContactsAttachment.m \
|
2010-10-01 20:54:30 +02:00
|
|
|
MAPIStoreContactsContext.m \
|
2011-02-24 21:40:17 +01:00
|
|
|
MAPIStoreContactsFolder.m \
|
|
|
|
MAPIStoreContactsMessage.m \
|
|
|
|
MAPIStoreContactsMessageTable.m \
|
|
|
|
\
|
|
|
|
MAPIStoreTasksContext.m \
|
|
|
|
MAPIStoreTasksFolder.m \
|
|
|
|
MAPIStoreTasksMessage.m \
|
|
|
|
MAPIStoreTasksMessageTable.m \
|
|
|
|
\
|
2011-04-01 00:59:15 +02:00
|
|
|
MAPIStoreMailAttachment.m \
|
2011-02-25 17:41:53 +01:00
|
|
|
MAPIStoreMailContext.m \
|
2011-02-24 21:40:17 +01:00
|
|
|
MAPIStoreMailFolder.m \
|
|
|
|
MAPIStoreMailMessage.m \
|
2011-10-26 23:33:51 +02:00
|
|
|
MAPIStoreMailVolatileMessage.m \
|
2011-02-24 21:40:17 +01:00
|
|
|
MAPIStoreMailMessageTable.m \
|
|
|
|
\
|
|
|
|
MAPIStoreNotesContext.m \
|
|
|
|
MAPIStoreNotesFolder.m \
|
|
|
|
MAPIStoreNotesMessage.m \
|
|
|
|
\
|
2011-06-04 01:39:54 +02:00
|
|
|
MAPIStoreFallbackContext.m \
|
2010-10-01 20:54:30 +02:00
|
|
|
\
|
2010-10-13 23:40:50 +02:00
|
|
|
NSArray+MAPIStore.m \
|
2010-10-14 18:36:53 +02:00
|
|
|
NSData+MAPIStore.m \
|
2011-05-30 23:12:56 +02:00
|
|
|
NSDate+MAPIStore.m \
|
2011-02-15 00:44:47 +01:00
|
|
|
NSObject+MAPIStore.m \
|
2010-12-13 18:09:46 +01:00
|
|
|
NSString+MAPIStore.m \
|
|
|
|
NSValue+MAPIStore.m \
|
|
|
|
\
|
2012-07-20 17:42:52 +02:00
|
|
|
iCalEvent+MAPIStore.m \
|
2012-07-26 22:50:36 +02:00
|
|
|
iCalTimeZone+MAPIStore.m \
|
2012-06-29 19:59:38 +02:00
|
|
|
\
|
|
|
|
GCSSpecialQueries+OpenChange.m\
|
|
|
|
\
|
2012-07-20 17:42:52 +02:00
|
|
|
EOQualifier+MAPI.m \
|
|
|
|
\
|
2013-02-18 22:28:06 +01:00
|
|
|
EOBitmaskQualifier.m \
|
|
|
|
\
|
|
|
|
BSONCodec.m
|
2011-09-23 01:45:33 +02:00
|
|
|
|
2010-10-01 20:54:30 +02:00
|
|
|
|
2010-11-18 23:13:45 +01:00
|
|
|
$(SOGOBACKEND)_RESOURCE_FILES += \
|
2011-11-09 16:02:04 +01:00
|
|
|
product.plist \
|
|
|
|
$(UNRTF_DIR)/charmaps/SYMBOL.charmap \
|
|
|
|
$(UNRTF_DIR)/outputs/html.conf
|
|
|
|
|
|
|
|
### unrtf
|
|
|
|
all:: $(UNRTF_DIR)/config.h $(UNRTF_DIR)/src/GNUmakefile
|
|
|
|
|
|
|
|
$(UNRTF_DIR): $(UNRTF_DIR).tar.gz $(UNRTF_DIR).diff
|
2011-11-09 21:06:06 +01:00
|
|
|
@echo " Extracting and patching $(UNRTF_DIR)..."
|
|
|
|
@rm -rf $(UNRTF_DIR)
|
|
|
|
@$(TAR) -xvzf $< > /dev/null
|
|
|
|
@(cd $(UNRTF_DIR) && patch -p1 < ../$(UNRTF_DIR).diff) > /dev/null
|
|
|
|
@touch $(UNRTF_DIR)
|
2011-11-09 16:02:04 +01:00
|
|
|
|
|
|
|
$(UNRTF_DIR)-stamp: $(UNRTF_DIR)
|
2011-11-09 21:06:06 +01:00
|
|
|
@touch $@
|
2011-11-09 16:02:04 +01:00
|
|
|
|
|
|
|
$(UNRTF_DIR)/config.h: $(UNRTF_DIR)-stamp unrtf_config_h
|
2011-11-09 21:06:06 +01:00
|
|
|
@cp unrtf_config_h $(UNRTF_DIR)/config.h
|
2011-11-09 16:02:04 +01:00
|
|
|
|
|
|
|
$(UNRTF_DIR)/src/GNUmakefile: $(UNRTF_DIR)-stamp GNUmakefile.unrtf
|
2011-11-09 21:06:06 +01:00
|
|
|
@cp GNUmakefile.unrtf $@
|
2010-11-18 23:13:45 +01:00
|
|
|
|
2011-07-27 20:56:53 +02:00
|
|
|
### pl reader
|
|
|
|
PLREADER_TOOL = plreader
|
|
|
|
$(PLREADER_TOOL)_OBJC_FILES += \
|
|
|
|
plreader.m \
|
|
|
|
|
2012-06-29 19:59:38 +02:00
|
|
|
DBMSGREADER_TOOL = dbmsgreader
|
|
|
|
$(DBMSGREADER_TOOL)_OBJC_FILES += \
|
|
|
|
dbmsgreader.m
|
|
|
|
|
2012-08-21 20:25:08 +02:00
|
|
|
$(DBMSGREADER_TOOL)_LIB_DIRS += \
|
2012-08-21 21:59:32 +02:00
|
|
|
-L../SoObjects/SOGo/SOGo.framework/ -lSOGo \
|
|
|
|
-L../OGoContentStore/obj/ -lOGoContentStore \
|
|
|
|
-L../SOPE/GDLContentStore/obj/ -lGDLContentStore \
|
|
|
|
-L../SOPE/NGCards/obj/ -lNGCards \
|
|
|
|
-lNGObjWeb
|
2012-06-29 19:59:38 +02:00
|
|
|
|
|
|
|
TEST_TOOL_NAME += $(PLREADER_TOOL) $(DBMSGREADER_TOOL)
|
2011-07-27 20:56:53 +02:00
|
|
|
|
2010-11-18 23:13:45 +01:00
|
|
|
### cflags and libs
|
2011-03-21 02:01:06 +01:00
|
|
|
LIBMAPI_CFLAGS = $(shell pkg-config libmapi --cflags)
|
2010-11-18 23:13:45 +01:00
|
|
|
|
2011-11-03 14:40:11 +01:00
|
|
|
ifeq ($(LIBMAPI_CFLAGS),)
|
2010-11-18 23:13:45 +01:00
|
|
|
all install::
|
|
|
|
@echo "Cannot build the OpenChange SOGo backend (empty CFLAGS for libmapistore)"
|
|
|
|
else
|
|
|
|
|
2011-12-07 17:13:52 +01:00
|
|
|
SAMBA_LIB_DIR = $(shell pkg-config libmapistore --variable=libdir)
|
|
|
|
|
2011-03-21 02:01:06 +01:00
|
|
|
LIBMAPI_LIBS = $(shell pkg-config libmapi --libs)
|
2011-12-02 21:59:22 +01:00
|
|
|
|
|
|
|
LIBMAPISTORE_CFLAGS = $(shell pkg-config libmapistore --cflags) -DSAMBA_PREFIX="\"$(shell pkg-config libmapistore --variable=prefix)\""
|
2012-08-02 17:44:58 +02:00
|
|
|
LIBMAPISTORE_LIBS = $(shell pkg-config libmapistore --libs) -lmapiproxy -lWEExtensions
|
2010-11-18 23:13:45 +01:00
|
|
|
|
2011-12-07 17:13:52 +01:00
|
|
|
$(MAPISTORESOGO)_INSTALL_DIR = $(DESTDIR)/$(SAMBA_LIB_DIR)/mapistore_backends
|
2011-12-22 22:13:53 +01:00
|
|
|
$(MAPISTORESOGO)_LIB_DIRS += \
|
2011-12-07 17:13:52 +01:00
|
|
|
-L../SoObjects/SOGo/SOGo.framework/ -lSOGo \
|
|
|
|
$(LIBMAPI_LIBS) \
|
|
|
|
$(LIBMAPISTORE_LIBS)
|
|
|
|
|
2011-12-22 22:13:53 +01:00
|
|
|
$(SOGOBACKEND)_LIB_DIRS += \
|
2011-12-07 17:13:52 +01:00
|
|
|
-L../OGoContentStore/$(GNUSTEP_OBJ_DIR)/ -lOGoContentStore \
|
|
|
|
-L../SoObjects/SOGo/SOGo.framework/ -lSOGo \
|
|
|
|
$(LIBMAPI_LIBS) \
|
|
|
|
$(LIBMAPISTORE_LIBS)
|
|
|
|
|
2010-12-03 23:23:30 +01:00
|
|
|
ADDITIONAL_INCLUDE_DIRS += \
|
|
|
|
-Werror -Wall \
|
2012-07-24 22:45:03 +02:00
|
|
|
-DSAMBA_PRIVATE_DIR=@"\"$(SAMBA_PRIVATE_DIR)\"" \
|
2010-12-03 23:23:30 +01:00
|
|
|
$(LIBMAPI_CFLAGS) \
|
2011-03-21 02:01:06 +01:00
|
|
|
$(LIBMAPISTORE_CFLAGS) \
|
2011-12-07 17:13:52 +01:00
|
|
|
-I$(UNRTF_DIR)/src \
|
2010-12-03 23:23:30 +01:00
|
|
|
-I../SoObjects -I../SOPE \
|
|
|
|
-DBACKEND_BUNDLE_NAME="@\"$(BUNDLE_NAME)$(BUNDLE_EXTENSION)\"" \
|
|
|
|
-DSOGO_BUNDLES_DIR="@\"$(BUNDLE_INSTALL_DIR)\""
|
2011-12-02 18:33:24 +01:00
|
|
|
|
2010-10-01 20:54:30 +02:00
|
|
|
-include GNUmakefile.preamble
|
2010-11-18 23:13:45 +01:00
|
|
|
include $(GNUSTEP_MAKEFILES)/bundle.make
|
2010-10-01 20:54:30 +02:00
|
|
|
include $(GNUSTEP_MAKEFILES)/library.make
|
2011-07-27 20:56:53 +02:00
|
|
|
include $(GNUSTEP_MAKEFILES)/test-tool.make
|
2011-11-09 16:02:04 +01:00
|
|
|
include $(GNUSTEP_MAKEFILES)/aggregate.make
|
2010-10-01 20:54:30 +02:00
|
|
|
-include GNUmakefile.postamble
|
2010-10-05 23:31:46 +02:00
|
|
|
|
|
|
|
endif
|