Fix naming for some freebusy properties and add alternative names for some properties
[jelmer/openchange.git] / Makefile
index 03248e8ce80246a6adb59662a49721f8cb22c2a4..d4e4fbba04dc5441f5fd5e87b5dd3d684cfb8467 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,12 @@
-# Makefile for OpenChange
+# Makefile for OpenChange
 # Written by Jelmer Vernooij <jelmer@openchange.org>, 2005.
 
+ifneq ($(MAKECMDGOALS), samba)
+ifneq ($(MAKECMDGOALS), samba-git)
+include config.mk
+endif
+endif
+
 default: all
 
 # Until we add proper dependencies for all the C files:
@@ -10,10 +16,17 @@ config.mk: config.status config.mk.in
        ./config.status
 
 config.status: configure
-       ./configure
+       @if test x"$(prefix)" != x""; \
+       then \
+         echo "Running configure with prefix '$(prefix)'..."; \
+         ./configure --prefix=$(prefix); \
+       else \
+         echo "Running configure without prefix"; \
+         ./configure; \
+       fi
 
 configure: configure.ac
-       ./autogen.sh
+       PREFIX=$(prefix) ./autogen.sh
 
 samba:
        ./script/installsamba4.sh all
@@ -24,12 +37,6 @@ samba-git:
 samba-git-update:
        ./script/installsamba4.sh git-update
 
-ifneq ($(MAKECMDGOALS), samba)
-ifneq ($(MAKECMDGOALS), samba-git)
-include config.mk
-endif
-endif
-
 #################################################################
 # top level compilation rules
 #################################################################
@@ -64,6 +71,7 @@ dist:: distclean
        ./autogen.sh
 
 distclean:: clean
+       rm -f aclocal.m4
        rm -rf autom4te.cache
        rm -f Doxyfile
        rm -f libmapi/Doxyfile
@@ -186,7 +194,7 @@ endif
        rm -f *~
        rm -f */*~
        rm -f */*/*~
-       rm -f libmapi.$(SHLIBEXT).$(PACKAGE_VERSION) libmapi.$(SHLIBEXT).$(LIBMAPI_SO_VERSION) \
+       rm -f libmapi.$(SHLIBEXT).$(PACKAGE_VERSION) libmapi.$(SHLIBEXT).* \
                  libmapi.$(SHLIBEXT)
 
 clean:: libmapi-clean
@@ -228,9 +236,12 @@ libmapi-installheader:
        $(INSTALL) -m 0644 libmapi/mapidefs.h $(DESTDIR)$(includedir)/libmapi/
        $(INSTALL) -m 0644 libmapi/version.h $(DESTDIR)$(includedir)/libmapi/
        $(INSTALL) -m 0644 libmapi/mapicode.h $(DESTDIR)$(includedir)/libmapi/
+       $(INSTALL) -m 0644 libmapi/idset.h $(DESTDIR)$(includedir)/libmapi/
        $(INSTALL) -m 0644 libmapi/socket/netif.h $(DESTDIR)$(includedir)/libmapi/socket/
        $(INSTALL) -m 0644 gen_ndr/exchange.h $(DESTDIR)$(includedir)/gen_ndr/
        $(INSTALL) -m 0644 gen_ndr/property.h $(DESTDIR)$(includedir)/gen_ndr/
+       $(INSTALL) -m 0644 gen_ndr/ndr_exchange.h $(DESTDIR)$(includedir)/gen_ndr/
+       $(INSTALL) -m 0644 gen_ndr/ndr_property.h $(DESTDIR)$(includedir)/gen_ndr/
        @$(SED) $(DESTDIR)$(includedir)/libmapi/*.h
        @$(SED) $(DESTDIR)$(includedir)/libmapi/socket/*.h
        @$(SED) $(DESTDIR)$(includedir)/gen_ndr/*.h
@@ -256,6 +267,7 @@ libmapi-uninstallscript:
 
 libmapi.$(SHLIBEXT).$(PACKAGE_VERSION):                \
        libmapi/emsmdb.po                               \
+       libmapi/async_emsmdb.po                         \
        libmapi/IABContainer.po                         \
        libmapi/IProfAdmin.po                           \
        libmapi/IMAPIContainer.po                       \
@@ -288,6 +300,8 @@ libmapi.$(SHLIBEXT).$(PACKAGE_VERSION):             \
        libmapi/freebusy.po                             \
        libmapi/x500.po                                 \
        libmapi/fxparser.po                             \
+       libmapi/notif.po                                \
+       libmapi/idset.po                                \
        ndr_mapi.po                                     \
        gen_ndr/ndr_exchange.po                         \
        gen_ndr/ndr_exchange_c.po                       \
@@ -302,10 +316,12 @@ libmapi.$(SHLIBEXT).$(LIBMAPI_SO_VERSION): libmapi.$(SHLIBEXT).$(PACKAGE_VERSION
        ln -fs $< $@
 
 libmapi/version.h: VERSION
-       @./script/mkversion.sh  VERSION libmapi/version.h $(PACKAGE_VERSION) $(top_builddir)/
+       @./script/mkversion.sh VERSION libmapi/version.h $(PACKAGE_VERSION) $(top_builddir)/
 
 libmapi/emsmdb.c: libmapi/emsmdb.h gen_ndr/ndr_exchange_c.h
 
+libmapi/async_emsmdb.c: libmapi/emsmdb.h gen_ndr/ndr_exchange_c.h
+
 libmapi/mapitags.c libmapi/mapicode.c libmapi/codepage_lcid.c mapitags_enum.h mapicodes_enum.h: \
        libmapi/conf/mapi-properties                                                            \
        libmapi/conf/mapi-codes                                                                 \
@@ -512,7 +528,7 @@ libmapiadmin-uninstall:     libmapiadmin-uninstallpc        \
 libmapiadmin-clean::
        rm -f libmapiadmin/*.o libmapiadmin/*.po
        rm -f libmapiadmin/*.gcno libmapiadmin/*.gcda
-       rm -f libmapiadmin.$(SHLIBEXT).$(PACKAGE_VERSION) libmapiadmin.$(SHLIBEXT).$(LIBMAPIADMIN_SO_VERSION) \
+       rm -f libmapiadmin.$(SHLIBEXT).$(PACKAGE_VERSION) libmapiadmin.$(SHLIBEXT).* \
                  libmapiadmin.$(SHLIBEXT)
 
 clean:: libmapiadmin-clean
@@ -583,7 +599,7 @@ ifneq ($(SNAPSHOT), no)
        rm -f libocpf/lex.yy.c
        rm -f libocpf/ocpf.tab.c libocpf/ocpf.tab.h
 endif
-       rm -f libocpf.$(SHLIBEXT).$(PACKAGE_VERSION) libocpf.$(SHLIBEXT).$(LIBOCPF_SO_VERSION) \
+       rm -f libocpf.$(SHLIBEXT).$(PACKAGE_VERSION) libocpf.$(SHLIBEXT).* \
                  libocpf.$(SHLIBEXT)
 
 clean:: libocpf-clean
@@ -728,8 +744,7 @@ libmapiproxy-clean:
 ifneq ($(SNAPSHOT), no)
        rm -f mapiproxy/libmapiproxy/openchangedb_property.c
 endif
-       rm -f mapiproxy/libmapiproxy.$(SHLIBEXT).$(PACKAGE_VERSION)
-       rm -f mapiproxy/libmapiproxy.$(SHLIBEXT).$(LIBMAPIPROXY_SO_VERSION)
+       rm -f mapiproxy/libmapiproxy.$(SHLIBEXT).*
 
 libmapiproxy-uninstall:
        rm -f $(DESTDIR)$(libdir)/libmapiproxy.*
@@ -776,8 +791,7 @@ libmapiserver-install:
 libmapiserver-clean:
        rm -f mapiproxy/libmapiserver/*.po mapiproxy/libmapiserver/*.o
        rm -f mapiproxy/libmapiserver/*.gcno mapiproxy/libmapiserver/*.gcda
-       rm -f mapiproxy/libmapiserver.$(SHLIBEXT).$(PACKAGE_VERSION)
-       rm -f mapiproxy/libmapiserver.$(SHLIBEXT).$(LIBMAPISERVER_SO_VERSION)
+       rm -f mapiproxy/libmapiserver.$(SHLIBEXT).*
 
 libmapiserver-uninstall:
        rm -f $(DESTDIR)$(libdir)/libmapiserver.*
@@ -792,6 +806,7 @@ distclean:: libmapiserver-distclean
 mapiproxy/libmapiserver.$(SHLIBEXT).$(PACKAGE_VERSION):        mapiproxy/libmapiserver/libmapiserver_oxcstor.po        \
                                                        mapiproxy/libmapiserver/libmapiserver_oxcprpt.po        \
                                                        mapiproxy/libmapiserver/libmapiserver_oxcfold.po        \
+                                                       mapiproxy/libmapiserver/libmapiserver_oxcfxics.po       \
                                                        mapiproxy/libmapiserver/libmapiserver_oxctabl.po        \
                                                        mapiproxy/libmapiserver/libmapiserver_oxcmsg.po         \
                                                        mapiproxy/libmapiserver/libmapiserver_oxcnotif.po       \
@@ -813,7 +828,22 @@ mapiproxy/libmapiserver.$(SHLIBEXT).$(LIBMAPISERVER_SO_VERSION): libmapiserver.$
 ################
 LIBMAPISTORE_SO_VERSION = 0
 
-libmapistore:  mapiproxy/libmapistore.$(SHLIBEXT).$(PACKAGE_VERSION)   \
+mapiproxy/libmapistore/mgmt/mapistore_mgmt.idl: mapiproxy/libmapistore/mgmt/gen_ndr
+
+mapiproxy/libmapistore/mgmt/gen_ndr/%.h: mapiproxy/libmapistore/mgmt/mapistore_mgmt.idl
+       @echo "Generating $@"
+       @$(PIDL) --outputdir=mapiproxy/libmapistore/mgmt/gen_ndr --header -- $<
+
+mapiproxy/libmapistore/mgmt/gen_ndr:
+       @echo "Creating gen_ndr directory for libmapistore mgmt IDL"
+       @mkdir -p mapiproxy/libmapistore/mgmt/gen_ndr
+
+mapiproxy/libmapistore/mgmt/gen_ndr/ndr_%.h mapiproxy/libmapistore/mgmt/gen_ndr/ndr_%.c: mapiproxy/libmapistore/mgmt/%.idl mapiproxy/libmapistore/mgmt/gen_ndr/%.h
+       @echo "Generating $@"
+       @$(PIDL) --outputdir=mapiproxy/libmapistore/mgmt/gen_ndr --ndr-parser -- $<
+
+libmapistore:  mapiproxy/libmapistore/mapistore_nameid.h               \
+               mapiproxy/libmapistore.$(SHLIBEXT).$(PACKAGE_VERSION)   \
                setup/mapistore/mapistore_namedprops.ldif               \
                $(OC_MAPISTORE)                                         \
                $(MAPISTORE_TEST)
@@ -829,6 +859,7 @@ libmapistore-install:       $(OC_MAPISTORE_INSTALL)
        $(INSTALL) -d $(DESTDIR)$(includedir)/mapistore
        $(INSTALL) -m 0644 mapiproxy/libmapistore/mapistore.h $(DESTDIR)$(includedir)/mapistore/
        $(INSTALL) -m 0644 mapiproxy/libmapistore/mapistore_errors.h $(DESTDIR)$(includedir)/mapistore/
+       $(INSTALL) -m 0644 mapiproxy/libmapistore/mapistore_nameid.h $(DESTDIR)$(includedir)/mapistore/
        $(INSTALL) -m 0644 mapiproxy/libmapiserver.pc $(DESTDIR)$(libdir)/pkgconfig
        $(INSTALL) -d $(DESTDIR)$(datadir)/setup/mapistore
        $(INSTALL) -m 0644 setup/mapistore/*.ldif $(DESTDIR)$(datadir)/setup/mapistore/
@@ -837,9 +868,10 @@ libmapistore-install:      $(OC_MAPISTORE_INSTALL)
 libmapistore-clean:    $(OC_MAPISTORE_CLEAN)
        rm -f mapiproxy/libmapistore/*.po mapiproxy/libmapistore/*.o
        rm -f mapiproxy/libmapistore/*.gcno mapiproxy/libmapistore/*.gcda
-       rm -f mapiproxy/libmapistore.$(SHLIBEXT).$(PACKAGE_VERSION)
-       rm -f mapiproxy/libmapistore.$(SHLIBEXT).$(LIBMAPISTORE_SO_VERSION)
+       rm -f mapiproxy/libmapistore.$(SHLIBEXT).*
        rm -f setup/mapistore/mapistore_namedprops.ldif
+       rm -f mapiproxy/libmapistore/mapistore_nameid.h
+       rm -rf mapiproxy/libmapistore/mgmt/gen_ndr
 
 libmapistore-uninstall:        $(OC_MAPISTORE_UNINSTALL)
        rm -f $(DESTDIR)$(libdir)/libmapistore.*
@@ -852,13 +884,19 @@ libmapistore-distclean: libmapistore-clean
 
 distclean:: libmapistore-distclean
 
-mapiproxy/libmapistore.$(SHLIBEXT).$(PACKAGE_VERSION):         mapiproxy/libmapistore/mapistore_interface.po   \
-                                                       mapiproxy/libmapistore/mapistore_processing.po  \
-                                                       mapiproxy/libmapistore/mapistore_backend.po     \
-                                                       mapiproxy/libmapistore/mapistore_tdb_wrap.po    \
-                                                       mapiproxy/libmapistore/mapistore_ldb_wrap.po    \
-                                                       mapiproxy/libmapistore/mapistore_indexing.po    \
-                                                       mapiproxy/libmapistore/mapistore_namedprops.po  \
+mapiproxy/libmapistore.$(SHLIBEXT).$(PACKAGE_VERSION):         mapiproxy/libmapistore/mgmt/gen_ndr/ndr_mapistore_mgmt.po       \
+                                                       mapiproxy/libmapistore/mapistore_interface.po                   \
+                                                       mapiproxy/libmapistore/mgmt/mapistore_mgmt.po                   \
+                                                       mapiproxy/libmapistore/mgmt/mapistore_mgmt_messages.po          \
+                                                       mapiproxy/libmapistore/mgmt/mapistore_mgmt_send.po              \
+                                                       mapiproxy/libmapistore/mapistore_processing.po                  \
+                                                       mapiproxy/libmapistore/mapistore_backend.po                     \
+                                                       mapiproxy/libmapistore/mapistore_tdb_wrap.po                    \
+                                                       mapiproxy/libmapistore/mapistore_ldb_wrap.po                    \
+                                                       mapiproxy/libmapistore/mapistore_indexing.po                    \
+                                                       mapiproxy/libmapistore/mapistore_replica_mapping.po             \
+                                                       mapiproxy/libmapistore/mapistore_namedprops.po                  \
+                                                       mapiproxy/libmapistore/mapistore_notification.po                \
                                                        libmapi.$(SHLIBEXT).$(PACKAGE_VERSION)
        @echo "Linking $@"
        @$(CC) -o $@ $(DSOOPT) $^ -L. $(LDFLAGS) $(LIBS) $(TDB_LIBS) $(DL_LIBS) -Wl,-soname,libmapistore.$(SHLIBEXT).$(LIBMAPISTORE_SO_VERSION)
@@ -875,62 +913,33 @@ setup/mapistore/mapistore_namedprops.ldif:        \
 # mapistore backends
 #####################
 
-mapistore_sqlite3: mapiproxy/libmapistore/backends/mapistore_sqlite3.$(SHLIBEXT)
-
-mapistore_sqlite3-install:
-       $(INSTALL) -d $(DESTDIR)$(libdir)/mapistore_backends
-       $(INSTALL) -m 0755 mapiproxy/libmapistore/backends/mapistore_sqlite3.$(SHLIBEXT) $(DESTDIR)$(libdir)/mapistore_backends/
-
-mapistore_sqlite3-uninstall:
-       rm -rf $(DESTDIR)$(libdir)/mapistore_backends
-
-mapistore_sqlite3-clean:
-       rm -f mapiproxy/libmapistore/backends/mapistore_sqlite3.o
-       rm -f mapiproxy/libmapistore/backends/mapistore_sqlite3.po
-       rm -f mapiproxy/libmapistore/backends/mapistore_sqlite3.gcno
-       rm -f mapiproxy/libmapistore/backends/mapistore_sqlite3.gcda
-       rm -f mapiproxy/libmapistore/backends/mapistore_sqlite3.so
-
-clean:: mapistore_sqlite3-clean
-
-mapistore_sqlite3-distclean: mapistore_sqlite3-clean
+# mapistore_fsocpf: mapiproxy/libmapistore/backends/mapistore_fsocpf.$(SHLIBEXT)
 
-distclean:: mapistore_sqlite3-distclean
+# mapistore_fsocpf-install:
+#      $(INSTALL) -d $(DESTDIR)$(libdir)/mapistore_backends
+#      $(INSTALL) -m 0755 mapiproxy/libmapistore/backends/mapistore_fsocpf.$(SHLIBEXT) $(DESTDIR)$(libdir)/mapistore_backends/
 
-mapiproxy/libmapistore/backends/mapistore_sqlite3.$(SHLIBEXT): mapiproxy/libmapistore/backends/mapistore_sqlite3.po
-       @echo "Linking mapistore module $@"
-       @$(CC) $(SQLITE_CFLAGS) -o $@ $(DSOOPT) $(LDFLAGS) $^ -L. $(LIBS) $(SQLITE_LIBS)        \
-       -Lmapiproxy mapiproxy/libmapistore.$(SHLIBEXT).$(PACKAGE_VERSION)                       
+#mapistore_fsocpf-uninstall:
+#      rm -rf $(DESTDIR)$(libdir)/mapistore_backends/mapistore_fsocpf.$(SHLIBEXT)
 
+#mapistore_fsocpf-clean:
+#      rm -f mapiproxy/libmapistore/backends/mapistore_fsocpf.o
+#      rm -f mapiproxy/libmapistore/backends/mapistore_fsocpf.po
+#      rm -f mapiproxy/libmapistore/backends/mapistore_fsocpf.gcno
+#      rm -f mapiproxy/libmapistore/backends/mapistore_fsocpf.gcda
+#      rm -f mapiproxy/libmapistore/backends/mapistore_fsocpf.so
 
-mapistore_fsocpf: mapiproxy/libmapistore/backends/mapistore_fsocpf.$(SHLIBEXT)
+#clean:: mapistore_fsocpf-clean
 
-mapistore_fsocpf-install:
-       $(INSTALL) -d $(DESTDIR)$(libdir)/mapistore_backends
-       $(INSTALL) -m 0755 mapiproxy/libmapistore/backends/mapistore_fsocpf.$(SHLIBEXT) $(DESTDIR)$(libdir)/mapistore_backends/
+#mapistore_fsocpf-distclean: mapistore_fsocpf-clean
 
-mapistore_fsocpf-uninstall:
-       rm -rf $(DESTDIR)$(libdir)/mapistore_backends
-
-mapistore_fsocpf-clean:
-       rm -f mapiproxy/libmapistore/backends/mapistore_fsocpf.o
-       rm -f mapiproxy/libmapistore/backends/mapistore_fsocpf.po
-       rm -f mapiproxy/libmapistore/backends/mapistore_fsocpf.gcno
-       rm -f mapiproxy/libmapistore/backends/mapistore_fsocpf.gcda
-       rm -f mapiproxy/libmapistore/backends/mapistore_fsocpf.so
-
-clean:: mapistore_fsocpf-clean
-
-mapistore_fsocpf-distclean: mapistore_fsocpf-clean
-
-distclean:: mapistore_fsocpf-distclean
-
-mapiproxy/libmapistore/backends/mapistore_fsocpf.$(SHLIBEXT): mapiproxy/libmapistore/backends/mapistore_fsocpf.po
-       @echo "Linking mapistore module $@"
-       @$(CC) $(SQLITE_CFLAGS) -o $@ $(DSOOPT) $(LDFLAGS) $^ -L. $(LIBS) $(SQLITE_LIBS)        \
-       -Lmapiproxy mapiproxy/libmapistore.$(SHLIBEXT).$(PACKAGE_VERSION)                       \
-       -L. libocpf.$(SHLIBEXT).$(PACKAGE_VERSION)
+#distclean:: mapistore_fsocpf-distclean
 
+#mapiproxy/libmapistore/backends/mapistore_fsocpf.$(SHLIBEXT): mapiproxy/libmapistore/backends/mapistore_fsocpf.po
+#      @echo "Linking mapistore module $@"
+#      @$(CC) $(SQLITE_CFLAGS) -o $@ $(DSOOPT) $(LDFLAGS) $^ -L. $(LIBS) $(SQLITE_LIBS)        \
+#      -Lmapiproxy mapiproxy/libmapistore.$(SHLIBEXT).$(PACKAGE_VERSION)                       \
+#      -L. libocpf.$(SHLIBEXT).$(PACKAGE_VERSION)
 
 #######################
 # mapistore test tools
@@ -1049,7 +1058,7 @@ mapiproxy/servers/exchange_nsp.$(SHLIBEXT):       mapiproxy/servers/default/nspi/dcesr
                                                mapiproxy/servers/default/nspi/emsabp_tdb.po            \
                                                mapiproxy/servers/default/nspi/emsabp_property.po       
        @echo "Linking $@"
-       @$(CC) -o $@ $(DSOOPT) $(LDFLAGS) $^ -L. $(LIBS) $(SAMBASERVER_LIBS) -Lmapiproxy mapiproxy/libmapiproxy.$(SHLIBEXT).$(PACKAGE_VERSION)
+       @$(CC) -o $@ $(DSOOPT) $(LDFLAGS) $^ -L. $(LIBS) $(TDB_LIBS) $(SAMBASERVER_LIBS) -Lmapiproxy mapiproxy/libmapiproxy.$(SHLIBEXT).$(PACKAGE_VERSION)
 
 mapiproxy/servers/exchange_emsmdb.$(SHLIBEXT): mapiproxy/servers/default/emsmdb/dcesrv_exchange_emsmdb.po      \
                                                mapiproxy/servers/default/emsmdb/emsmdbp.po                     \
@@ -1057,6 +1066,7 @@ mapiproxy/servers/exchange_emsmdb.$(SHLIBEXT):    mapiproxy/servers/default/emsmdb/
                                                mapiproxy/servers/default/emsmdb/oxcstor.po                     \
                                                mapiproxy/servers/default/emsmdb/oxcprpt.po                     \
                                                mapiproxy/servers/default/emsmdb/oxcfold.po                     \
+                                               mapiproxy/servers/default/emsmdb/oxcfxics.po                    \
                                                mapiproxy/servers/default/emsmdb/oxctabl.po                     \
                                                mapiproxy/servers/default/emsmdb/oxcmsg.po                      \
                                                mapiproxy/servers/default/emsmdb/oxcnotif.po                    \
@@ -1304,6 +1314,7 @@ bin/mapitest:     utils/mapitest/mapitest.o                       \
                utils/mapitest/module.o                         \
                utils/mapitest/modules/module_oxcstor.o         \
                utils/mapitest/modules/module_oxcfold.o         \
+               utils/mapitest/modules/module_oxcfxics.o        \
                utils/mapitest/modules/module_oxomsg.o          \
                utils/mapitest/modules/module_oxcmsg.o          \
                utils/mapitest/modules/module_oxcprpt.o         \
@@ -1330,13 +1341,14 @@ utils/mapitest/proto.h:                                 \
        utils/mapitest/module.c                         \
        utils/mapitest/modules/module_oxcstor.c         \
        utils/mapitest/modules/module_oxcfold.c         \
+       utils/mapitest/modules/module_oxcfxics.c        \
        utils/mapitest/modules/module_oxomsg.c          \
        utils/mapitest/modules/module_oxcmsg.c          \
        utils/mapitest/modules/module_oxcprpt.c         \
+       utils/mapitest/modules/module_oxcfxics.c        \
        utils/mapitest/modules/module_oxctable.c        \
        utils/mapitest/modules/module_oxorule.c         \
        utils/mapitest/modules/module_oxcnotif.c        \
-       utils/mapitest/modules/module_oxcfxics.c        \
        utils/mapitest/modules/module_oxcperm.c         \
        utils/mapitest/modules/module_nspi.c            \
        utils/mapitest/modules/module_noserver.c        \
@@ -1431,6 +1443,32 @@ bin/check_fasttransfer:  testprogs/check_fasttransfer.o                  \
        @echo "Linking $@"
        @$(CC) -o $@ $^ $(LIBS) $(LDFLAGS) -lpopt
 
+###################
+# test_asyncnotif test app.
+###################
+
+test_asyncnotif:               bin/test_asyncnotif
+
+test_asyncnotif-install:       test_asyncnotif
+       $(INSTALL) -d $(DESTDIR)$(bindir)
+       $(INSTALL) -m 0755 bin/test_asyncnotif $(DESTDIR)$(bindir)
+
+test_asyncnotif-uninstall:
+       rm -f $(DESTDIR)$(bindir)/test_asyncnotif
+
+test_asyncnotif-clean::
+       rm -f bin/test_asyncnotif
+       rm -f testprogs/test_asyncnotif.o
+       rm -f testprogs/test_asyncnotif.gcno
+       rm -f testprogs/test_asyncnotif.gcda
+
+clean:: test_asyncnotif-clean
+
+bin/test_asyncnotif:   testprogs/test_asyncnotif.o                     \
+                       libmapi.$(SHLIBEXT).$(PACKAGE_VERSION)
+       @echo "Linking $@"
+       @$(CC) -o $@ $^ $(LIBS) $(LDFLAGS) -lpopt
+
 ###################
 # python code
 ###################
@@ -1480,9 +1518,9 @@ clean-python:
 
 clean:: clean-python
 
-pyopenchange:  $(pythonscriptdir)/openchange/mapi.$(SHLIBEXT)  \
-               $(pythonscriptdir)/openchange/ocpf.$(SHLIBEXT)  \
-               $(pythonscriptdir)/openchange/mapistore.$(SHLIBEXT)
+pyopenchange:  $(pythonscriptdir)/openchange/mapi.$(SHLIBEXT)                  \
+               $(pythonscriptdir)/openchange/ocpf.$(SHLIBEXT)                  \
+               $(pythonscriptdir)/openchange/mapistore.$(SHLIBEXT)             
 
 $(pythonscriptdir)/openchange/mapi.$(SHLIBEXT):        pyopenchange/pymapi.c                           \
                                                pyopenchange/pymapi_properties.c                \
@@ -1496,11 +1534,17 @@ $(pythonscriptdir)/openchange/ocpf.$(SHLIBEXT): pyopenchange/pyocpf.c                           \
        @echo "Linking $@"
        @$(CC) $(CFLAGS) $(DSOOPT) $(LDFLAGS) -o $@ $^ `$(PYTHON_CONFIG) --cflags --libs` $(LIBS) 
 
-$(pythonscriptdir)/openchange/mapistore.$(SHLIBEXT):   pyopenchange/pymapistore.c                              \
-                                                       mapiproxy/libmapistore.$(SHLIBEXT).$(PACKAGE_VERSION)
+ $(pythonscriptdir)/openchange/mapistore.$(SHLIBEXT):  pyopenchange/mapistore/pymapistore.c                    \
+                                                       pyopenchange/mapistore/mgmt.c                           \
+                                                       pyopenchange/mapistore/context.c                        \
+                                                       pyopenchange/mapistore/folder.c                         \
+                                                       pyopenchange/mapistore/table.c                          \
+                                                       mapiproxy/libmapistore.$(SHLIBEXT).$(PACKAGE_VERSION)   \
+                                                       mapiproxy/libmapiproxy.$(SHLIBEXT).$(PACKAGE_VERSION)
        @echo "Linking $@"
        @$(CC) $(CFLAGS) $(DSOOPT) $(LDFLAGS) -o $@ $^ `$(PYTHON_CONFIG) --cflags --libs` $(LIBS)
 
+
 pyopenchange/pymapi_properties.c:              \
        libmapi/conf/mapi-properties            \
        libmapi/conf/mparse.pl          
@@ -1509,8 +1553,8 @@ pyopenchange/pymapi_properties.c:         \
 pyopenchange-clean:
        rm -f pyopenchange/*.o
        rm -f pyopenchange/*.pyc
-       rm -f $(pythonscriptdir)/openchange/mapi.$(SHLIBEXT)
-       rm -f $(pythonscriptdir)/openchange/ocpf.$(SHLIBEXT)
+#      rm -f $(pythonscriptdir)/openchange/mapi.$(SHLIBEXT)
+#      rm -f $(pythonscriptdir)/openchange/ocpf.$(SHLIBEXT)
        rm -f $(pythonscriptdir)/openchange/mapistore.$(SHLIBEXT)
        rm -f pyopenchange/pymapi_properties.c
 
@@ -1599,7 +1643,7 @@ etags:
 ctags:
        ctags `find $(srcdir) -name "*.[ch]"`
 
-.PRECIOUS: exchange.h gen_ndr/ndr_exchange.h gen_ndr/ndr_exchange.c gen_ndr/ndr_exchange_c.c gen_ndr/ndr_exchange_c.h
+.PRECIOUS: exchange.h gen_ndr/ndr_exchange.h gen_ndr/ndr_exchange.c gen_ndr/ndr_exchange_c.c gen_ndr/ndr_exchange_c.h mapiproxy/libmapistore/mgmt/gen_ndr/ndr_mapistore_mgmt.c mapiproxy/libmapistore/mgmt/gen_ndr/mapistore_mgmt.h
 
 test:: check