1# Copyright (c) 2017, Lawrence Livermore National Security, LLC. Produced at 2# the Lawrence Livermore National Laboratory. LLNL-CODE-734707. All Rights 3# reserved. See files LICENSE and NOTICE for details. 4# 5# This file is part of CEED, a collection of benchmarks, miniapps, software 6# libraries and APIs for efficient high-order finite element and spectral 7# element discretizations for exascale applications. For more information and 8# source code availability see http://github.com/ceed. 9# 10# The CEED research is supported by the Exascale Computing Project (17-SC-20-SC) 11# a collaborative effort of two U.S. Department of Energy organizations (Office 12# of Science and the National Nuclear Security Administration) responsible for 13# the planning and preparation of a capable exascale ecosystem, including 14# software, applications, hardware, advanced system engineering and early 15# testbed platforms, in support of the nation's exascale computing imperative. 16 17CEED_DIR ?= $(abspath ..) 18CEED_FLAGS ?= -I$(CEED_DIR)/include 19CEED_LIBS ?= -Wl,-rpath,$(CEED_DIR)/lib -L$(CEED_DIR)/lib -lceed 20 21# Use an MFEM build directory or an MFEM install directory 22MFEM_DIR ?= $(abspath ../../mfem) 23CONFIG_MK ?= $(or $(wildcard $(MFEM_DIR)/config/config.mk),$(wildcard\ 24 $(MFEM_DIR)/share/mfem/config.mk),invalid_mfem_dir) 25 26NEK5K_DIR ?= $(abspath ../../Nek5000) 27NEK5K_FC = $(if $(findstring mpi,$(FC)),$(FC),mpif77) 28NEK5K_CC = $(if $(findstring mpi,$(CC)),$(FC),mpicc) 29NEK5K_EXAMPLES ?= bp1 30 31PETSC_DIR ?= 32PETSC_ARCH ?= 33 34.PHONY: all nek mfem petsc ceed clean 35 36all: ceed nek mfem petsc ceed 37 38ceed: 39 make CEED_DIR=$(CEED_DIR) -C ceed all 40 41nek: 42 cd nek5000 && NEK5K_DIR=$(NEK5K_DIR) CEED_DIR=$(CEED_DIR) \ 43 FC=$(NEK5K_FC) CC=$(NEK5K_CC) \ 44 EXAMPLES=$(NEK5K_EXAMPLES) ./make-nek-examples.sh 45 46mfem: 47 make CEED_DIR=$(CEED_DIR) MFEM_DIR=$(MFEM_DIR) -C mfem all 48 49petsc: 50 make CEED_DIR=$(CEED_DIR) PETSC_DIR=$(PETSC_DIR) PETSC_ARCH=$(PETSC_ARCH) -C petsc all 51 52clean: 53 cd nek5000 && ./make-nek-examples.sh clean 54 make -C mfem clean 55 make -C petsc clean 56