# Makefile for the Sherlock Gatherer (c) 2001--2006 Martin Mares <mj@ucw.cz>

DIRS+=gather

ifdef CONFIG_GATHERER

PROGS+=$(o)/gather/gtest $(o)/gather/gbatch
CONFIGS+=gatherer checker checker-filter

LIBGATH_MODS=ginit gobject gconfig charset content gfilter bucket diff ganalyse
LIBGATH_LIBS=-lz $(LIBLANG_LIBS)
LIBGATH=$(o)/gather/libgather.$(LS) $(LIBANAL) $(LIBFILTER) $(LIBLANG) $(LIBCHARSET)

include $(s)/gather/proto/Makefile
include $(s)/gather/format/Makefile

$(o)/gather/libgather.a: $(addsuffix .o,$(addprefix $(o)/gather/,$(LIBGATH_MODS)))
$(o)/gather/libgather.so: $(addsuffix .oo,$(addprefix $(o)/gather/,$(LIBGATH_MODS)))

$(o)/gather/gtest: $(o)/gather/gtest.o $(LIBGATH) $(LIBSH)
$(o)/gather/gtest: LIBS+=$(LIBGATH_LIBS)

$(o)/gather/gbatch: $(o)/gather/gbatch.o $(LIBGATH) $(LIBSH)
$(o)/gather/gbatch: LIBS+=$(LIBGATH_LIBS)

ifdef CONFIG_GATHERD
include $(s)/gather/daemon/Makefile
endif

endif

