#######################################################################
##                             Copyright (C) 1999                    ##
##              Keldysh Institute of Appllied Mathematics            ##
#######################################################################
# dvm/fdvm/makefile.uni
#
# This makefile recursively calls MAKE in each subdirectory
#

# What to compile
SUBDIR=Sage parser fdvm InlineExpansion

Sage:
	cd Sage; $(MAKE) "MAKE=$(MAKE)" "CC=$(CC)" "CXX=$(CXX)" "LINKER=$(LINKER)" all

parser: Sage
	cd parser; $(MAKE) "MAKE=$(MAKE)" "CC=$(CC)" "CXX=$(CXX)" "LINKER=$(LINKER)" all

fdvm: Sage
	cd fdvm; $(MAKE) "MAKE=$(MAKE)" "CC=$(CC)" "CXX=$(CXX)" "LINKER=$(LINKER)" all

inliner: Sage
	cd InlineExpansion; $(MAKE) "MAKE=$(MAKE)" "CC=$(CC)" "CXX=$(CXX)" "LINKER=$(LINKER)" all

all: Sage parser fdvm inliner
	@echo "****** DONE MAKING SUBDIRECTORIES dvm/fdvm/: $(SUBDIR) ******"

clean:
	@echo "****** RECURSIVELY CLEAN SUBDIRECTORIES dvm/fdvm/: $(SUBDIR) ******"
	cd Sage; $(MAKE) "MAKE=$(MAKE)" "CC=$(CC)" "CXX=$(CXX)" "LINKER=$(LINKER)" clean
	cd parser; $(MAKE) "MAKE=$(MAKE)" "CC=$(CC)" "CXX=$(CXX)" "LINKER=$(LINKER)" clean
	cd fdvm;$(MAKE) "MAKE=$(MAKE)" "CC=$(CC)" "CXX=$(CXX)" "LINKER=$(LINKER)" clean
	cd InlineExpansion;$(MAKE) "MAKE=$(MAKE)" "CC=$(CC)" "CXX=$(CXX)" "LINKER=$(LINKER)" clean
	rm -fr lib
	@echo "****** DONE CLEAN SUBDIRECTORIES dvm/fdvm/: $(SUBDIR) ******"

cleanall:
	@echo "****** RECURSIVELY CLEANALL SUBDIRECTORIES dvm/fdvm/: $(SUBDIR) ******"
	cd Sage; $(MAKE) "MAKE=$(MAKE)" "CC=$(CC)" "CXX=$(CXX)" "LINKER=$(LINKER)" cleanall
	cd parser; $(MAKE) "MAKE=$(MAKE)" "CC=$(CC)" "CXX=$(CXX)" "LINKER=$(LINKER)" cleanall
	cd fdvm; $(MAKE) "MAKE=$(MAKE)" "CC=$(CC)" "CXX=$(CXX)" "LINKER=$(LINKER)" cleanall
	cd InlineExpansion; $(MAKE) "MAKE=$(MAKE)" "CC=$(CC)" "CXX=$(CXX)" "LINKER=$(LINKER)" cleanall
	rm -fr lib
	@echo "****** DONE CLEANALL SUBDIRECTORIES dvm/fdvm/: $(SUBDIR) ******"

.PHONY: all clean cleanall Sage parser fdvm inliner
