Makefile.am 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. # -*- Makefile -*-
  2. SUBDIRS = include/kopano kopano zarafa
  3. SWIG_CXXFLAGS = -Wall -python -c++ -threads \
  4. -I${top_srcdir}/common/include -I${top_srcdir}/swig/include \
  5. -I${srcdir}/include
  6. lib_LTLIBRARIES = libkcpyconv.la libkcpydirector.la
  7. pyexec_LTLIBRARIES = _MAPICore.la _inetmapi.la _icalmapi.la
  8. noinst_LTLIBRARIES = _libcommon.la _archiver.la _libfreebusy.la _RecurrenceState.la
  9. noinst_DATA = libkcpyconv.ldd libkcpydirector.ldd \
  10. _MAPICore.ldd _inetmapi.ldd _icalmapi.ldd \
  11. _libcommon.ldd _archiver.ldd _libfreebusy.ldd _RecurrenceState.ldd
  12. CLEANFILES = ${noinst_DATA}
  13. # disable warnings since code is mostly generated
  14. AM_CPPFLAGS = ${ZCPPFLAGS} $(DEBUGFLAGS) \
  15. -I${top_srcdir}/mapi4linux/include -I${top_srcdir}/provider/common \
  16. -I${top_srcdir}/common -I${top_srcdir}/m4lcommon \
  17. $(PYTHON_INCLUDES) -I${top_srcdir}/swig -w \
  18. -DSWIG_PYTHON_OUTPUT_TUPLE -DSWIG_TYPE_TABLE=MAPI
  19. libkcpyconv_la_SOURCES = conversion.cpp
  20. libkcpyconv_la_LDFLAGS = ${AM_LDFLAGS} -Wl,--version-script=python.sym
  21. libkcpyconv_la_LIBADD = ${PYTHON_LIBS} \
  22. ${top_builddir}/libmapi.la
  23. EXTRA_libkcpyconv_la_DEPENDENCIES = python.sym
  24. libkcpydirector_la_SOURCES = ../director_util.cpp
  25. libkcpydirector_la_LDFLAGS = ${AM_LDFLAGS} -Wl,--version-script=python.sym
  26. libkcpydirector_la_LIBADD = -lpthread
  27. EXTRA_libkcpydirector_la_DEPENDENCIES = python.sym
  28. _MAPICore_la_CPPFLAGS = ${AM_CPPFLAGS} -I${top_srcdir}/libsync
  29. _MAPICore_la_LDFLAGS = ${AM_LDFLAGS} -module -avoid-version
  30. _MAPICore_la_LIBADD = libkcpyconv.la libkcpydirector.la \
  31. ${top_builddir}/libmapi.la \
  32. ${top_builddir}/libkcmapi.la \
  33. ${top_builddir}/libkcutil.la \
  34. ${top_builddir}/libkcsync.la \
  35. $(XML2_LIBS) $(PROG_LIBS) $(PYTHON_LIBS)
  36. _inetmapi_la_CPPFLAGS = ${AM_CPPFLAGS} -I${top_srcdir}/inetmapi
  37. _inetmapi_la_LDFLAGS = ${AM_LDFLAGS} -module -avoid-version
  38. _inetmapi_la_LIBADD = libkcpyconv.la \
  39. ${top_builddir}/libmapi.la \
  40. ${top_builddir}/libkcmapi.la \
  41. ${top_builddir}/libkcutil.la \
  42. ${top_builddir}/libkcinetmapi.la \
  43. $(PROG_LIBS) $(PYTHON_LIBS)
  44. _icalmapi_la_CPPFLAGS = ${AM_CPPFLAGS} -I${top_srcdir}/libicalmapi \
  45. -I${top_srcdir}/libfreebusy
  46. _icalmapi_la_LDFLAGS = ${AM_LDFLAGS} -module -avoid-version
  47. _icalmapi_la_LIBADD = libkcpyconv.la \
  48. ${top_builddir}/libmapi.la \
  49. ${top_builddir}/libkcicalmapi.la \
  50. ${top_builddir}/libkcmapi.la \
  51. ${top_builddir}/libkcutil.la \
  52. ${top_builddir}/libkcfreebusy.la \
  53. $(ICAL_LIBS) $(PROG_LIBS) $(PYTHON_LIBS)
  54. _archiver_la_CPPFLAGS = ${AM_CPPFLAGS} -I${top_srcdir}/ECtools/archiver
  55. _archiver_la_LDFLAGS = ${AM_LDFLAGS} -module -avoid-version -rpath '$(libdir)'
  56. _archiver_la_LIBADD = \
  57. ${top_builddir}/libkcarchiver.la \
  58. ${top_builddir}/libkcarchivercore.la \
  59. $(PROG_LIBS) $(PYTHON_LIBS)
  60. # noinst_ and rpath will generate the _libcommon.so file
  61. _libcommon_la_LDFLAGS = ${AM_LDFLAGS} -module -avoid-version -rpath '$(libdir)'
  62. _libcommon_la_LIBADD = libkcpyconv.la ${top_builddir}/libmapi.la \
  63. ${top_builddir}/libkcmapi.la \
  64. ${top_builddir}/libkcutil.la \
  65. $(PROG_LIBS) $(PYTHON_LIBS)
  66. _RecurrenceState_la_LDFLAGS = ${AM_LDFLAGS} -module -avoid-version -rpath '$(libdir)'
  67. _RecurrenceState_la_LIBADD = libkcpyconv.la \
  68. ${top_builddir}/libmapi.la \
  69. ${top_builddir}/libkcmapi.la \
  70. ${top_builddir}/libkcutil.la \
  71. $(PROG_LIBS) $(PYTHON_LIBS)
  72. _libfreebusy_la_CPPFLAGS = ${AM_CPPFLAGS} -I${top_srcdir}/libfreebusy
  73. _libfreebusy_la_LDFLAGS = ${AM_LDFLAGS} -module -avoid-version -rpath '$(libdir)'
  74. _libfreebusy_la_LIBADD = libkcpyconv.la ${top_builddir}/libmapi.la \
  75. ${top_builddir}/libkcfreebusy.la \
  76. ${top_builddir}/libkcmapi.la \
  77. ${top_builddir}/libkcutil.la \
  78. $(PROG_LIBS) $(PYTHON_LIBS)
  79. BUILT_SOURCES = mapi_wrap.cxx \
  80. mapi_wrap.h \
  81. inetmapi_wrap.cxx \
  82. icalmapi_wrap.cxx \
  83. archiver_wrap.cxx \
  84. libcommon_wrap.cxx \
  85. libfreebusy_wrap.cxx \
  86. RecurrenceState_wrap.cxx
  87. CLEANFILES += ${BUILT_SOURCES} \
  88. MAPICore.py \
  89. inetmapi.py \
  90. icalmapi.py \
  91. archiver.py \
  92. libcommon.py \
  93. libfreebusy.py
  94. python.sym: ${top_builddir}/config.status
  95. # wait for full output of swig
  96. MAPICore.py: $(BUILT_SOURCES)
  97. inetmapi.py: $(BUILT_SOURCES)
  98. icalmapi.py: $(BUILT_SOURCES)
  99. archiver.py: $(BUILT_SOURCES)
  100. libcommon.py: $(BUILT_SOURCES)
  101. libfreebusy.py: $(BUILT_SOURCES)
  102. RecurrenceState.py: $(BUILT_SOURCES)
  103. _MAPICore_la_SOURCES = mapi_wrap.cxx mapi_wrap.h scl.h
  104. _inetmapi_la_SOURCES = inetmapi_wrap.cxx
  105. _icalmapi_la_SOURCES = icalmapi_wrap.cxx
  106. _archiver_la_SOURCES = archiver_wrap.cxx archiver_conv.h archiver_conv.cpp
  107. _libcommon_la_SOURCES = libcommon_wrap.cxx
  108. _RecurrenceState_la_SOURCES = RecurrenceState_wrap.cxx
  109. _libfreebusy_la_SOURCES = libfreebusy_wrap.cxx libfreebusy_conv.h libfreebusy_conv.cpp
  110. EXTRA_DIST = helpers_python.i setup.py $(BUILT_SOURCES) MAPICore.py inetmapi.py icalmapi.py MAPI/Defs.py MAPI/__init__.py MAPI/Struct.py MAPI/Tags.py MAPI/Time.py MAPI/Util/__init__.py MAPI/Util/Generators.py MAPI/Util/Iterators.py MAPI/Util/AddressBook.py MAPI/Util/codepage.py archiver_python.i
  111. datadir = ${pythondir}
  112. data_DATA = MAPICore.py inetmapi.py icalmapi.py
  113. noinst_datadir = libcommon.py RecurrenceState.py
  114. mapi_wrap.h: mapi_wrap.cxx
  115. mapi_wrap.cxx: ../mapi.i ../mapiutil.i ../mapidefs.i ../mapicode.i ../mapix.i ../mapinotifsink.i ../mapiutil.i ../include/kopano/typemap.i ../helpers.i ../edkmdb.i ../IECServiceAdmin.i ../ecdefs.i include/kopano/typemap_python.i helpers_python.i
  116. if test "x$(SWIG_EXEC)" = "x"; then echo "swig is required for 'make dist'"; exit 1; fi
  117. ${SWIG_EXEC} -I${top_srcdir}/common/include -I${top_srcdir}/libsync ${SWIG_FLAGS} ${SWIG_CXXFLAGS} -o $@ $<
  118. inetmapi_wrap.cxx: ../inetmapi.i ../include/kopano/typemap.i ../inetmapi.i include/kopano/typemap_python.i helpers_python.i
  119. ${SWIG_EXEC} ${SWIG_CXXFLAGS} -o $@ $<
  120. icalmapi_wrap.cxx: ../icalmapi.i ../include/kopano/typemap.i include/kopano/typemap_python.i helpers_python.i
  121. ${SWIG_EXEC} -I${top_srcdir}/libicalmapi -I${top_srcdir}/libfreebusy ${SWIG_CXXFLAGS} -o $@ $<
  122. archiver_wrap.cxx: ../archiver.i archiver_python.i
  123. ${SWIG_EXEC} -I${top_srcdir}/ECtools/archiver ${SWIG_CXXFLAGS} -o $@ $<
  124. libcommon_wrap.cxx: ../libcommon.i
  125. ${SWIG_EXEC} -I${top_srcdir}/common -I${top_srcdir}/m4lcommon ${SWIG_CXXFLAGS} -o $@ $<
  126. RecurrenceState_wrap.cxx: ../RecurrenceState.i
  127. ${SWIG_EXEC} -I${top_srcdir}/common -I${top_srcdir}/m4lcommon ${SWIG_CXXFLAGS} -o $@ $<
  128. libfreebusy_wrap.cxx: ../libfreebusy.i
  129. ${SWIG_EXEC} -I${top_srcdir}/libfreebusy ${SWIG_CXXFLAGS} -o $@ $<
  130. check-syntax:
  131. $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) \
  132. -fsyntax-only -fmessage-length=0 ${CHK_SOURCES} -Wall -Wformat=2
  133. install-exec-local:
  134. test "$(DISTRO)" = "suse" -o "$(DISTRO)" = "sles" && pyrpm="--record-rpm=INSTALLED_FILES"; \
  135. cd ${srcdir} && ${PYTHON} setup.py \
  136. build --build-base="${abs_builddir}/build" \
  137. install -f $${DESTDIR+--root=${DESTDIR}} \
  138. --prefix="${prefix}" --install-purelib ${pythondir} $${pyrpm}
  139. rm -Rf build
  140. uninstall-local:
  141. rm -Rf ${DESTDIR}${pythondir}/MAPI \
  142. ${DESTDIR}${pythondir}/MAPI-1*.egg-info
  143. include ../../global.am