xref: /libCEED/examples/ceed/Makefile (revision 54b2713b25da0fd3a991ab8abc576af308f5acf9)
1182fbe45STzanio# Copyright (c) 2017, Lawrence Livermore National Security, LLC. Produced at
2182fbe45STzanio# the Lawrence Livermore National Laboratory. LLNL-CODE-734707. All Rights
3182fbe45STzanio# reserved. See files LICENSE and NOTICE for details.
4182fbe45STzanio#
5182fbe45STzanio# This file is part of CEED, a collection of benchmarks, miniapps, software
6182fbe45STzanio# libraries and APIs for efficient high-order finite element and spectral
7182fbe45STzanio# element discretizations for exascale applications. For more information and
8182fbe45STzanio# source code availability see http://github.com/ceed.
9182fbe45STzanio#
10182fbe45STzanio# The CEED research is supported by the Exascale Computing Project 17-SC-20-SC,
11182fbe45STzanio# a collaborative effort of two U.S. Department of Energy organizations (Office
12182fbe45STzanio# of Science and the National Nuclear Security Administration) responsible for
13182fbe45STzanio# the planning and preparation of a capable exascale ecosystem, including
14182fbe45STzanio# software, applications, hardware, advanced system engineering and early
15182fbe45STzanio# testbed platforms, in support of the nation's exascale computing imperative.
16182fbe45STzanio
17182fbe45STzanio# Ceed directory
18182fbe45STzanioCEED_DIR ?= ../..
19182fbe45STzanioCEED_FLAGS ?= -I$(CEED_DIR)/include -std=c99
20182fbe45STzanioCEED_LIBS ?= -Wl,-rpath,$(abspath $(CEED_DIR)/lib) -L$(CEED_DIR)/lib -lceed -lm
21182fbe45STzanio
22182fbe45STzanioEXAMPLES.c = $(wildcard ex*.c)
23182fbe45STzanioEXAMPLES = $(EXAMPLES.c:%.c=%)
24182fbe45STzanio
25182fbe45STzanio.SUFFIXES:
26182fbe45STzanio.SUFFIXES: .c
27182fbe45STzanio.PHONY: all clean
28182fbe45STzanio
29182fbe45STzanioall: $(EXAMPLES)
30182fbe45STzanio
31182fbe45STzanio# Remove built-in rules
32182fbe45STzanio%: %.c
33182fbe45STzanio
34182fbe45STzanio# Rules for building the examples
35*54b2713bSVeselin Dobrev%: %.c
36182fbe45STzanio	$(LINK.c) $(CEED_FLAGS) $< -o $@ $(CEED_LIBS)
37182fbe45STzanio
38182fbe45STzanioclean:
39182fbe45STzanio	rm -f *~ $(EXAMPLES)
40182fbe45STzanio	rm -rf *.dSYM *.TVD.*breakpoints
41