# -*- Makefile -*-
sbin_PROGRAMS += bongo-config

conf_defaults =                            \
	src/apps/config/config/global      \
	src/apps/config/config/aliases/default_config  \
	src/apps/config/config/antispam    \
	src/apps/config/config/antivirus   \
	src/apps/config/config/imap        \
	src/apps/config/config/mailproxy   \
	src/apps/config/config/manager     \
	src/apps/config/config/pop3        \
	src/apps/config/config/queue       \
	src/apps/config/config/smtp     \
	src/apps/config/hawkeye/history

bongo_config_SOURCES =			\
	$(conf_defaults)		\
	src/apps/config/config.c	\
	src/apps/config/config.h	\
	src/apps/config/store.c

bongo_config_CPPFLAGS = $(AM_CPPFLAGS)	\
	$(GNUTLS_CFLAGS)

bongo_config_LDADD =					   \
	libbongonmap.la					   \
	libbongomsgapi.la				   \
	libbongoconnio.la				   \
	libbongomemmgr.la				   \
	libbongoutil.la					   \
	libbongoxpl.la					   \
	$(PTHREAD_LIBS)					   \
	$(GNUTLS_LIBS)                                     \
	$(ALL_LIBS)

confdir = $(pkgdatadir)/conf

conf_DATA = \
        src/apps/config/default.set

src/apps/config/default.set: $(conf_defaults)
	(cd $(top_srcdir)/src/apps/config && tar chof - --exclude .svn config hawkeye) > $@

src/apps/config/all: bongo-config
src/apps/config/clean: clean
src/apps/config/install:
	@cd $(top_builddir) && $(MAKE) $(MFLAGS) sbin_PROGRAMS=bongo-config install-sbinPROGRAMS
