# +-======-+ # Copyright (c) 2003-2007 United States Government as represented by # the Admistrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # THIS OPEN SOURCE AGREEMENT ("AGREEMENT") DEFINES THE RIGHTS OF USE, # REPRODUCTION, DISTRIBUTION, MODIFICATION AND REDISTRIBUTION OF CERTAIN # COMPUTER SOFTWARE ORIGINALLY RELEASED BY THE UNITED STATES GOVERNMENT AS # REPRESENTED BY THE GOVERNMENT AGENCY LISTED BELOW ("GOVERNMENT AGENCY"). # THE UNITED STATES GOVERNMENT, AS REPRESENTED BY GOVERNMENT AGENCY, IS AN # INTENDED THIRD-PARTY BENEFICIARY OF ALL SUBSEQUENT DISTRIBUTIONS OR # REDISTRIBUTIONS OF THE SUBJECT SOFTWARE. ANYONE WHO USES, REPRODUCES, # DISTRIBUTES, MODIFIES OR REDISTRIBUTES THE SUBJECT SOFTWARE, AS DEFINED # HEREIN, OR ANY PART THEREOF, IS, BY THAT ACTION, ACCEPTING IN FULL THE # RESPONSIBILITIES AND OBLIGATIONS CONTAINED IN THIS AGREEMENT. # # Government Agency: National Aeronautics and Space Administration # Government Agency Original Software Designation: GSC-15354-1 # Government Agency Original Software Title: GEOS-5 GCM Modeling Software # User Registration Requested. Please Visit http://opensource.gsfc.nasa.gov # Government Agency Point of Contact for Original Software: # Dale Hithon, SRA Assistant, (301) 286-2691 # # +-======-+ SHELL=/bin/sh #....................................................................... # # Makefile for ESMA components # # REVISION HISTORY: # # 08Jan2013 jstassi Created with gmm script. # #....................................................................... #--------------------------------------------------- # Get GNUmakefile name # note: MAKEFILE_LIST defined for gmake versions >= 3.80 #--------------------------------------------------- ifdef MAKEFILE_LIST GNUMAKEFILE := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) else GNUMAKEFILE := GNUmakefile endif #------------------------------ # Make sure ESMADIR is defined # ----------------------------- ifndef ESMADIR ESMADIR := $(PWD)/../../../.. endif #------------------------------- # Compilation rules, flags, etc #------------------------------- include $(ESMADIR)/Config/ESMA_base.mk # Generic stuff include $(ESMADIR)/Config/ESMA_arch.mk # System dependencies include $(ESMADIR)/Config/GMAO_base.mk # System dependencies ######################################################################## ALLDIRS = OSTIA NSIDC-OSTIA_SST-ICE_blend SUBDIRS = $(wildcard $(ALLDIRS)) ######################################################################## #----------------------- # Standard ESMA Targets #----------------------- TARGETS = esma_install esma_clean esma_distclean esma_doc \ install clean distclean doc $(TARGETS): @echo @if [ "$(SUBDIRS)" != "" ]; then ( \ SUBTARGET=$@; export SUBTARGET; $(MAKE) -f $(GNUMAKEFILE) subdirs \ ) fi $(MAKE) -f $(GNUMAKEFILE) local_$@ local_esma_install local_install: @echo No local install in here local_esma_clean local_clean: $(RM) *~ $(BINS) *.[aox] *.[Mm][Oo][Dd] local_esma_distclean local_distclean: $(RM) *~ $(BINS) *.[aoxd] *.[Mm][Oo][Dd] local_esma_doc local_doc: @echo No documentation here esma_help help: @echo "Standard ESMA targets:" @echo "% gmake install (builds and install under ESMADIR)" @echo "% gmake clean (removes deliverables: *.[aox], etc)" @echo "% gmake distclean (leaves in the same state as cvs co)" @echo "% gmake esma_doc (generates PDF, installs under ESMADIR)" @echo "% gmake help (this message)" @echo @echo "Environment:" @echo " ESMADIR = $(ESMADIR)" @echo " BASEDIR = $(BASEDIR)" @echo " ARCH = $(ARCH)" @echo " SITE = $(SITE)" ######################################################################## subdirs: @for subdir in $(SUBDIRS); do \ ( echo "> cd $$subdir; $(MAKE) -e $(SUBTARGET)"; \ cd $$subdir; $(MAKE) -e $(SUBTARGET) ) \ done; \ ######################################################################## #---------------------- # User Defined Targets #---------------------- vpath % $(INC_LIST) /usr/include #---------------------------------------------------- # Hack to prevent remaking dep files during cleaning #---------------------------------------------------- ifneq ($(findstring clean,$(MAKECMDGOALS)),clean) ifneq ($(findstring clean,$(SUBTARGET)),clean) -include $(ALLDEPS) endif endif -include $(ESMADIR)/Config/ESMA_post.mk # ESMA additional targets, macros #.