SHELL = /bin/sh

all:
	@make -C src
	@make -C kptool
	@make -C gkeeper

install:
	@make -C src install
	@make -C kptool install
	@make -C doc install
	@make -C gkeeper install

clean:
	rm -f kptool/kptool
	rm -f example/example example/kptest example/test_reload
	rm -f example/util_example
	rm -f gkeeper/gkeeper
	rm -f `find . \( -name "*.o" -o -name "*.so" -o -name "*.a" \
            -o -name ".*~" -o -name "*~" -o -name "*.s" -o -name "*.orig" \
            -o -name t -o -name core -o -name gmon.out \) -print`

realclean: clean
	rm -f config.status config.cache config.log config.h
	rm -f */Makefile  */Makefile.old

depend:
	@make -C src depend
	@make -C kptool depend
	@make -C example depend
	@make -C gkeeper depend
