9563e6542b7a8a13b13a0ef62ec68b0383b99293Timo Sirainendoveadm_moduledir = $(moduledir)/doveadm
53febe02364e20b2b95594ca8e7906a37973be01Timo Sirainenpkglibexecdir = $(libexecdir)/dovecot
c0699d9e0842a53c047fcbd695fa93ce435baa8fTimo Sirainenpkglibexec_PROGRAMS = quota-status
1795e934ebcd58175d3b5bbdd811b13c7889efa3Timo SirainenAM_CPPFLAGS = \
1795e934ebcd58175d3b5bbdd811b13c7889efa3Timo Sirainen -I$(top_srcdir)/src/lib \
de02255bbe97d5d5c54ca1054bb7c9304ee025a1Timo Sirainen -I$(top_srcdir)/src/lib-test \
c0699d9e0842a53c047fcbd695fa93ce435baa8fTimo Sirainen -I$(top_srcdir)/src/lib-master \
1795e934ebcd58175d3b5bbdd811b13c7889efa3Timo Sirainen -I$(top_srcdir)/src/lib-dict \
677e22747b82bf15b339e31d1d0106d62bf806daTimo Sirainen -I$(top_srcdir)/src/lib-index \
1795e934ebcd58175d3b5bbdd811b13c7889efa3Timo Sirainen -I$(top_srcdir)/src/lib-mail \
52f6112882fb2a4b7b921fc45640f4a9d748bae7Stephan Bosch -I$(top_srcdir)/src/lib-smtp \
654c60f1741fd195878d74a30df90bf130649d64Timo Sirainen -I$(top_srcdir)/src/lib-imap \
677e22747b82bf15b339e31d1d0106d62bf806daTimo Sirainen -I$(top_srcdir)/src/lib-storage \
9563e6542b7a8a13b13a0ef62ec68b0383b99293Timo Sirainen -I$(top_srcdir)/src/lib-storage/index/maildir \
fa3fc0b4c821874ccc56a1512604f661b411d3a4Aki Tuomi -I$(top_srcdir)/src/lib-program-client \
a966016e605eea27e02d73ff1412632cd684d770Timo SirainenNOPLUGIN_LDFLAGS =
bc10373fc050eb9dd23f6ed5ee8207d0e4d142eeTimo Sirainenlib10_doveadm_quota_plugin_la_LDFLAGS = -module -avoid-version
9d1526ac8bcec9aff3c3a32f092ee2f3da2760b7Timo Sirainenlib10_quota_plugin_la_LDFLAGS = -module -avoid-version
1795e934ebcd58175d3b5bbdd811b13c7889efa3Timo Sirainenmodule_LTLIBRARIES = \
23ad3970cd22adb6c875caf95fa791548849f0d1Timo Sirainenquota_dist_sources = \
c0699d9e0842a53c047fcbd695fa93ce435baa8fTimo Sirainenquota_common_objects = \
c0699d9e0842a53c047fcbd695fa93ce435baa8fTimo Sirainen $(RQUOTA_XDR_LO)
e1b13a5c1507c2583fc6bd07e690037be8a802a7Timo Sirainenlib10_quota_plugin_la_SOURCES = $(quota_dist_sources)
e1b13a5c1507c2583fc6bd07e690037be8a802a7Timo Sirainennodist_lib10_quota_plugin_la_SOURCES = $(RQUOTA_XDR)
26ada766cfff6ebfb91d100936118cf8aa51e3aeTimo Sirainenlib10_quota_plugin_la_LIBADD = $(QUOTA_LIBS)
9563e6542b7a8a13b13a0ef62ec68b0383b99293Timo Sirainendoveadm_module_LTLIBRARIES = \
9563e6542b7a8a13b13a0ef62ec68b0383b99293Timo Sirainenlib10_doveadm_quota_plugin_la_SOURCES = \
c0699d9e0842a53c047fcbd695fa93ce435baa8fTimo Sirainenquota_status_SOURCES = \
b200bc3875fa06d42c8619865cc306c3297fcaccAki Tuomiquota_status_CPPFLAGS = $(AM_CPPFLAGS) $(BINARY_CFLAGS)
c0699d9e0842a53c047fcbd695fa93ce435baa8fTimo Sirainenquota_status_LDADD = \
c0699d9e0842a53c047fcbd695fa93ce435baa8fTimo Sirainen $(quota_common_objects) \
c0699d9e0842a53c047fcbd695fa93ce435baa8fTimo Sirainen $(LIBDOVECOT_STORAGE) \
c0699d9e0842a53c047fcbd695fa93ce435baa8fTimo Sirainen $(LIBDOVECOT) \
b200bc3875fa06d42c8619865cc306c3297fcaccAki Tuomi $(QUOTA_LIBS) \
b200bc3875fa06d42c8619865cc306c3297fcaccAki Tuomi $(BINARY_LDFLAGS)
c0699d9e0842a53c047fcbd695fa93ce435baa8fTimo Sirainenquota_status_DEPENDENCIES = \
c0699d9e0842a53c047fcbd695fa93ce435baa8fTimo Sirainen $(quota_common_objects) \
c0699d9e0842a53c047fcbd695fa93ce435baa8fTimo Sirainen $(LIBDOVECOT_STORAGE_DEPS) \
c0699d9e0842a53c047fcbd695fa93ce435baa8fTimo Sirainen $(LIBDOVECOT_DEPS)
23ad3970cd22adb6c875caf95fa791548849f0d1Timo Sirainenif HAVE_RQUOTA
667f09546abd3d3636b277fec9dba8622cb3d644Timo SirainenRQUOTA_X = $(srcdir)/rquota.x
acbd82bd456316a32f61df67fc41bbff681119c7Timo Sirainen if [ "$(top_srcdir)" != "$(top_builddir)" ]; then \
acbd82bd456316a32f61df67fc41bbff681119c7Timo Sirainen cp $(RQUOTA_X) $(top_builddir)/src/plugins/quota/; \
d0cc826dab58ed8e30e1ccd7cb6ad2f44b391a00Timo Sirainen (echo '#include "lib.h"'; \
f0339f522dc9c8e2e8a29ef9a3f937c431c6bd1bTimo Sirainen echo '#undef FALSE'; \
f0339f522dc9c8e2e8a29ef9a3f937c431c6bd1bTimo Sirainen echo '#undef TRUE'; \
d0cc826dab58ed8e30e1ccd7cb6ad2f44b391a00Timo Sirainen echo '#include <rpc/rpc.h>'; \
acbd82bd456316a32f61df67fc41bbff681119c7Timo Sirainen $(RPCGEN) -c $(top_builddir)/src/plugins/quota/rquota.x | \
fba3d682d6bad6a9530b254d6fd07dc5577be7feTimo Sirainen sed -e 's/IXDR_PUT/(void)IXDR_PUT/g' \
23bdbb7b1831785c6ba6df190f6369da882d2b9dTimo Sirainen -e 's,!xdr_,0 == xdr_,' \
d0cc826dab58ed8e30e1ccd7cb6ad2f44b391a00Timo Sirainen -e 's,/usr/include/rpcsvc/rquota.h,rquota.h,' \
a321662b406acc9c9e6fe52332236740d449f591Timo Sirainen -e 's/int32_t \*buf/int32_t *buf ATTR_UNUSED/' \
a5563dc790a44bb58860d74479a24349f593d68fTimo Sirainen -e 's/^static char rcsid.*//' ) > rquota_xdr.c
23ad3970cd22adb6c875caf95fa791548849f0d1Timo Sirainenrquota.h: Makefile $(RQUOTA_X)
a5563dc790a44bb58860d74479a24349f593d68fTimo Sirainen $(RPCGEN) -h $(RQUOTA_X) > rquota.h
3a53aff14d327af2819b4755864b3571703683b8Timo Sirainenpkginc_libdir=$(pkgincludedir)
3a53aff14d327af2819b4755864b3571703683b8Timo Sirainenpkginc_lib_HEADERS = \
7dd64d2faf200cb8b87569cbc3206b54f95c9ff5Aki Tuominoinst_HEADERS = \
23ad3970cd22adb6c875caf95fa791548849f0d1Timo Sirainenclean-generic:
acbd82bd456316a32f61df67fc41bbff681119c7Timo Sirainen if [ "$(top_srcdir)" != "$(top_builddir)" ]; then \
acbd82bd456316a32f61df67fc41bbff681119c7Timo Sirainen rm -f $(top_builddir)/src/plugins/quota/rquota.x; \
de02255bbe97d5d5c54ca1054bb7c9304ee025a1Timo Sirainentest_programs = \
de02255bbe97d5d5c54ca1054bb7c9304ee025a1Timo Sirainen test-quota-util
de02255bbe97d5d5c54ca1054bb7c9304ee025a1Timo Sirainennoinst_PROGRAMS = $(test_programs)
de02255bbe97d5d5c54ca1054bb7c9304ee025a1Timo Sirainentest_deps = $(noinst_LTLIBRARIES) $(test_libs)
de02255bbe97d5d5c54ca1054bb7c9304ee025a1Timo Sirainentest_quota_util_SOURCES = test-quota-util.c
c35e049bf1b9bbee97551bcb029e53a10cafd761Timo Sirainentest_quota_util_LDADD = quota-util.lo $(test_libs)
c35e049bf1b9bbee97551bcb029e53a10cafd761Timo Sirainentest_quota_util_DEPENDENCIES = quota-util.lo $(test_deps)
de02255bbe97d5d5c54ca1054bb7c9304ee025a1Timo Sirainen for bin in $(test_programs); do \
de02255bbe97d5d5c54ca1054bb7c9304ee025a1Timo Sirainen if ! $(RUN_TEST) ./$$bin; then exit 1; fi; \