#
# Copyright (c) 1994 University College London
# All rights reserved.
#
# Redistribution and use in source and binary forms are permitted
# provided that the above copyright notice and this paragraph are
# duplicated in all such forms and that any documentation,
# advertising materials, and other materials related to such
# distribution and use acknowledge that the software was developed
# by the Department of Computer Science, University College London.
# The name of the University may not be used to
# endorse or promote products derived from this software without
# specific prior written permission.
# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#

LIBDIRS =	provide use
PROGDIRS =	test
HDIRS = 	include
DIRS =		$(LIBDIRS) $(PROGDIRS) $(HDIRS)

all:		lib

lib:;		@for i in $(LIBDIRS); \
		    do (echo "cd $$i; ./make lib"; \
			      cd $$i; ./make lib); \
		    done

glib:		lib

install:	install-gh install-h \
		install-glib install-lib \
		install-gprog install-prog

# Install man pages
install-gman:
install-man:

# Install libraries
install-glib:
install-lib:;	@for i in $(LIBDIRS); \
		     do (echo "cd $$i; ./make install-lib"; \
		               cd $$i; ./make install-lib); \
		  done

# Install binaries
install-gprog:
install-prog:

# Make binaries
gprog:
prog:;		@for i in $(PROGDIRS); \
		     do (echo "cd $$i; ./make prog"; \
		               cd $$i; ./make prog); \
		  done

# Install header files
install-gh:
install-h:;	@for i in $(HDIRS); \
		     do (echo "cd $$i; ./make install-h"; \
		               cd $$i; ./make install-h); \
		  done

clean:;
		rm -f *~ *.log
		@for i in $(DIRS); \
		     do (echo "cd $$i; ./make clean"; \
		               cd $$i; ./make clean); \
		  done

