##
## legOS - the independent LEGO Mindstorms OS
## Makefile - allows you to keep the upper hand
## (c) 1998 by Markus L. Noga <markus@noga.de>
##
SUBDIRS=util lib boot demo

all:
	for i in $(SUBDIRS) ; do $(MAKE) $(MFLAGS) -C $$i || exit 2 ; done

depend:
	for i in $(SUBDIRS) ; do $(MAKE) $(MFLAGS) NODEPS=yes -C $$i depend || exit 2 ; done

clean:
	for i in $(SUBDIRS) ; do $(MAKE) $(MFLAGS) NODEPS=yes -C $$i clean ; done
	rm -rf *.o *.map *.coff *.srec *.dis* *~ *.bak *.tgz *.s tags

c++:
	$(MAKE) -C c++ all

realclean:
	for i in $(SUBDIRS) ; do $(MAKE) $(MFLAGS) NODEPS=yes -C $$i realclean ; done
	rm -rf *.o *.map *.coff *.srec *.dis* *~ *.bak *.tgz *.s tags
	rm -f doc/html/*.html doc/html/class*.gif

# doc/html subdirectory
html:
	doxygen Doxyfile

# tags
tag:
	ctags --format=1 kernel/*.c include/*.h include/*/*.h
