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

DIRS+=gather

ifdef CONFIG_GATHERER

PROGS+=obj/gather/gtest obj/gather/gbatch
CONFIGS+=checker checker-filter

LIBGATH_MODS=gobject gconfig charset content gfilter
LIBGATH_LIBS=-lz
LIBGATH=obj/gather/libgather.$(LS)

include gather/proto/Makefile
include gather/format/Makefile

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

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

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

ifdef CONFIG_GATHERD
include gather/daemon/Makefile
endif

endif

