# Generated automatically from Makefile.in by configure.
#

include ./Rules.make
CFLAGS+=-I./libipulog/include -I./conffile

SUBDIRS=conffile libipulog extensions doc

ifeq (x,x)
else
SUBDIRS+=mysql
endif

ifeq (x,x)
else
SUBDIRS+=pgsql
endif

ifeq (x,x)
else
SUBDIRS+=pcap
endif

#  Normally You should not need to change anything below

all: recurse ulogd

distrib:
	@for d in $(SUBDIRS); do if ! make -C $$d distrib; then exit 1; fi; done
	@make distclean

recurse: 
	@for d in $(SUBDIRS); do if ! make -C $$d; then exit 1; fi; done

ulogd: ulogd.c $(LIBIPULOG) ulogd.h conffile/conffile.o $(LIBIPULOG)/libipulog.a
	$(CC) $(CFLAGS) -rdynamic $(LIBS) $< conffile/conffile.o $(LIBIPULOG)/libipulog.a -o $@

clean:
#	rm -f ulogd *.o extensions/*.o extensions/*.so conffile/*.o
	rm -f ulogd ulogd.o
	@for d in $(SUBDIRS); do if ! make -C $$d $@; then exit 1; fi; done

distclean: clean
	@for d in $(SUBDIRS); do if ! make -C $$d $@; then exit 1; fi; done
	rm -f Makefile config.cache config.log config.status Rules.make

install: all
	@for d in $(SUBDIRS); do if ! make -C $$d $@; then exit 1; fi; done
	/usr/bin/install -c -D -m 755 ulogd $(DESTDIR)${exec_prefix}/sbin/ulogd
	/usr/bin/install -c -D -m 600 ulogd.conf $(DESTDIR)${prefix}/etc/ulogd.conf
	
doc:
	$(MAKE) -C $@
