Fix naming for some freebusy properties and add alternative names for some properties
[jelmer/openchange.git] / Makefile
index feabb7bd9e38bcf83093293a672175b4313200db..d4e4fbba04dc5441f5fd5e87b5dd3d684cfb8467 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -21,7 +21,7 @@ config.status: configure
          echo "Running configure with prefix '$(prefix)'..."; \
          ./configure --prefix=$(prefix); \
        else \
-         echo "Running configure withut prefix"; \
+         echo "Running configure without prefix"; \
          ./configure; \
        fi
 
@@ -71,6 +71,7 @@ dist:: distclean
        ./autogen.sh
 
 distclean:: clean
+       rm -f aclocal.m4
        rm -rf autom4te.cache
        rm -f Doxyfile
        rm -f libmapi/Doxyfile
@@ -193,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
@@ -235,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
@@ -296,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                       \
@@ -310,7 +316,7 @@ 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
 
@@ -522,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
@@ -593,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
@@ -715,7 +721,7 @@ mapiproxy/dcesrv_mapiproxy.$(SHLIBEXT):     mapiproxy/dcesrv_mapiproxy.po           \
                                                gen_ndr/ndr_exchange.po                         
 
        @echo "Linking $@"
-       @$(CC) -o $@ $(DSOOPT) $^ -L. $(LDFLAGS) $(LIBS) -ldcerpc-server -Lmapiproxy mapiproxy/libmapiproxy.$(SHLIBEXT).$(PACKAGE_VERSION) libmapi.$(SHLIBEXT).$(PACKAGE_VERSION)
+       @$(CC) -o $@ $(DSOOPT) $^ -L. $(LDFLAGS) $(LIBS) $(SAMBASERVER_LIBS) -Lmapiproxy mapiproxy/libmapiproxy.$(SHLIBEXT).$(PACKAGE_VERSION) libmapi.$(SHLIBEXT).$(PACKAGE_VERSION)
 
 mapiproxy/dcesrv_mapiproxy.c: gen_ndr/ndr_exchange_s.c gen_ndr/ndr_exchange.c
 
@@ -738,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.*
@@ -786,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.*
@@ -824,6 +828,20 @@ mapiproxy/libmapiserver.$(SHLIBEXT).$(LIBMAPISERVER_SO_VERSION): libmapiserver.$
 ################
 LIBMAPISTORE_SO_VERSION = 0
 
+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               \
@@ -850,10 +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.*
@@ -866,14 +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/mapistore_notification.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)
@@ -890,34 +913,6 @@ 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
-
-distclean:: mapistore_sqlite3-distclean
-
-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: mapiproxy/libmapistore/backends/mapistore_fsocpf.$(SHLIBEXT)
 
 # mapistore_fsocpf-install:
@@ -1063,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) -ldcerpc-server -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                     \
@@ -1079,13 +1074,13 @@ mapiproxy/servers/exchange_emsmdb.$(SHLIBEXT):  mapiproxy/servers/default/emsmdb/
                                                mapiproxy/servers/default/emsmdb/oxorule.po                     \
                                                mapiproxy/servers/default/emsmdb/oxcperm.po
        @echo "Linking $@"
-       @$(CC) -o $@ $(DSOOPT) $(LDFLAGS) $^ -L. $(LIBS) -ldcerpc-server -Lmapiproxy mapiproxy/libmapiproxy.$(SHLIBEXT).$(PACKAGE_VERSION) \
+       @$(CC) -o $@ $(DSOOPT) $(LDFLAGS) $^ -L. $(LIBS) $(SAMBASERVER_LIBS) -Lmapiproxy mapiproxy/libmapiproxy.$(SHLIBEXT).$(PACKAGE_VERSION) \
                                                mapiproxy/libmapiserver.$(SHLIBEXT).$(PACKAGE_VERSION)          \
                                                mapiproxy/libmapistore.$(SHLIBEXT).$(PACKAGE_VERSION)
 
 mapiproxy/servers/exchange_ds_rfr.$(SHLIBEXT): mapiproxy/servers/default/rfr/dcesrv_exchange_ds_rfr.po
        @echo "Linking $@"
-       @$(CC) -o $@ $(DSOOPT) $(LDFLAGS) $^ -L. $(LIBS) -ldcerpc-server -Lmapiproxy mapiproxy/libmapiproxy.$(SHLIBEXT).$(PACKAGE_VERSION)
+       @$(CC) -o $@ $(DSOOPT) $(LDFLAGS) $^ -L. $(LIBS) $(SAMBASERVER_LIBS) -Lmapiproxy mapiproxy/libmapiproxy.$(SHLIBEXT).$(PACKAGE_VERSION)
 
 #################################################################
 # Tools compilation rules
@@ -1523,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                \
@@ -1539,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          
@@ -1552,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
 
@@ -1642,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