CONFDIR=`./config.sub \`./config.guess\``

all:
	sh -c "target=${CONFDIR}; \
	mkdir -p \$${target}; \
	if [ -f Makefile ] ; then \
		mv nsyslog.h config.h config.status config.cache Makefile \$${target}; \
	fi ; \
	make -f \$${target}/Makefile"


clean:
	/bin/rm -f */*.o */lex.yy.c */y.tab.* */nsyslogd */y.output core \
		*/core *.ln *.core .depend

confclean cleanconf:
	/bin/rm -f config.status config.cache config.h Makefile config.log

realclean:
	/bin/rm -f */config.* */Makefile */nsyslog.h
	make clean
	for i in *-*-*; do if [ -d $$i ] ; then rmdir $$i; fi done
 
distclean cleandist:
	make realclean 
	make confclean

lint: $(OBJDIR)/y.tab.c $(OBJDIR)/lex.yy.c
	 lint -aa -c -h -x -I. -H *.c $(OBJDIR)/y.tab.c $(OBJDIR)/lex.yy.c

depend dep .depend:
	$(CC) $(CFLAGS) -MM *.c > .depend
