#################################################################
#            Makefile for the drawing                           #
#            of the orography of the model's domain             #
#                                           last update: 01.2005#
#################################################################
SHELL    = /bin/sh
CPP      = /lib/cpp -P -traditional -DUNDERSCORE -I$(INCLUDE)
RM       = rm -f
INCLUDE  = ../../../include/
MNTINC   = $(INCLUDE)all.inc
EXECS    = plot_orography
default	:
	@echo "Type :"
	@echo "make sgi       to make for SGI workstation      "
	@echo "make ibm       to make for IBM workstation      "
	@echo "make convex    to make for CONVEX with IEEE     "
	@echo "make HP        to make for HP  workstation      "
	@echo "make linux     to make for linux workstation    "
	@echo "make Sun       to make for Sun BDS os           "
	@echo "make clean     to remove all files except sources and input data"

all	:
	@for name in $(EXECS); do\
	(echo "*** Compiling the $$name ***"); \
	(make ./exe/$$name); \
	done

./exe/plot_orography	: ./src/plot_orography.F $(MNTINC)
	$(CPP) ./src/plot_orography.F > ./src/plot_orography.f ; \
	$(NCARGF77) ./src/plot_orography.f -o $@ ; $(RM) ./src/plot_orography.f


sgi	:
	@make all \
	"F77    = f77 -O2" "NCARGF77 = ncargf77"

Sun	:
	@make all \
	"F77    = f77 -O" "NCARGF77 = ncargf77"

ibm	:
	@make all  \
	"F77    = xlf -O3 -qstrict " "NCARGF77 = ncargf77"

convex	:
	@make all \
	"F77    = fc -O2" "NCARGF77 = ncargf77" 

HP	:
	@make all \
	"F77=f77" "NCARGF77 = ncargf77"

cluster	:
	@make all \
	"NCARGF77 = ncargf90 -O3"

linux	:
	@make all \
	"NCARGF77 = ncargf77 -O3"

clean	:
	@for name in $(EXECS); do\
	(echo "*** Cleaning the $$name ***"); \
	($(RM) ./exe/$$name ./src/$$name.f ./$$name.o); \
	done ;\
	$(RM) ./tmp/* 
