##############################################################################
#
# Makefile
#
# Make program to build the libraries.
#
# Copyright (c) 1990-2007 Aldor Software Organization Ltd (Aldor.org).
#
##############################################################################
#
#  2006/Dec/22
#
#  On Solaris, the value of PWD does not change when make is invoked
#  recursively.  Consequently, it is necessary to explicitly set it
#  at the start of the makefile.
#
PWD = $(shell pwd)

RM	= rm -f

SHELL=/bin/sh

OKFILES = Makefile Makefile.win32 NMakefile libfoamlib libfoam

LibDir  = $(ALDORROOT)/lib

all:	libfoaminc libfoamlibdir libfoamdir

clean::
	@ $(RM) *~

junk::	
	@ ls -d $(OKFILES) * | sort | grep -v CVS | uniq -u

libfoaminc:
	(cd libfoam/links ; $(MAKE) include)


libfoamlibdir:
	(cd libfoamlib ; $(MAKE) all)
clean::
	-(cd libfoamlib ; $(MAKE) clean)
libclean::
	-(cd libfoamlib ; $(MAKE) libclean)
junk::
	-(cd libfoamlib ; $(MAKE) junk)


libfoamdir: libfoamlibdir
	(cd libfoam ; $(MAKE) all)
clean::
	-(cd libfoam ; $(MAKE) clean)
libclean::
	-(cd libfoam ; $(MAKE) libclean)
junk::
	-(cd libfoam ; $(MAKE) junk)
