################################################################################
#                                                                              #
# Makefile for ROPP build file distro                                          #
# -----------------------------------                                          #
#                                                                              #
#  Run from ROPP root source directory:                                        #
#   $ make -f ropp_build/Makefile                                              #
#                                                                              #
# Met Office, Exeter   <romsaf@metoffice.gov.uk>                               #
#                                                                              #
################################################################################

VERSION = 10.0

MAKEFILE = ropp_build/Makefile
SOURCES  = README.* setroppenv buildpack build_deps build*_ropp \
           configure/*_configure_* configure/nag_interfaces.f90 \
           ropp_build/

EXCLUDE  = configure/*_deb configure/*IUP configure/*EUM
TARFILE  = ropp_build-$(VERSION).tar.gz

all  : clean $(TARFILE)

$(TARFILE) : $(SOURCES) $(MAKEFILE)
		@ls $(EXCLUDE) > xfiles
		tar -zcf $(TARFILE) -X xfiles $(SOURCES)
		@rm xfiles > /dev/null 2>&1

clean :
		@rm -f $(TARFILE) > /dev/null 2>&1
