File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change 1+ # Copyright (c) 2017-2025, Lawrence Livermore National Security, LLC and other CEED contributors
2+ # All Rights Reserved. See the top-level LICENSE and NOTICE files for details.
3+ #
4+ # SPDX-License-Identifier: BSD-2-Clause
5+ #
6+ # This file is part of CEED: http://github.com/ceed
7+
8+ OPT ?= -O -g
9+
10+ # Ceed directory
11+ CEED_DIR ?= ../..
12+ CEED_FLAGS ?= -I$(CEED_DIR ) /include -std=c11 $(OPT )
13+ CEED_LIBS ?= -Wl,-rpath,$(abspath $(CEED_DIR ) /lib) -L$(CEED_DIR ) /lib -lceed -L$(CEED_DIR ) /examples/ceed -lm
14+
15+ EXAMPLES.c = $(wildcard ex* .c)
16+ EXAMPLES = $(EXAMPLES.c:%.c=% )
17+
18+ .SUFFIXES :
19+ .SUFFIXES : .c
20+ .PHONY : all clean
21+
22+ all : $(EXAMPLES )
23+
24+ # Remove built-in rules
25+ % : % .c
26+
27+ # Special build rule for example 1 (rust)
28+ ex1-volume : ex1-volume.c
29+ cargo +nightly build --release --manifest-path ex1-volume-rs/Cargo.toml --config ex1-volume-rs/.cargo/config.toml
30+ $(LINK.c ) $(CEED_FLAGS ) $(CEED_LDFLAGS ) $< -o $@ $(CEED_LIBS ) -L$(CEED_DIR ) /examples/rust-qfunctions/ex1-volume-rs/target/release -lex1_volume_rs
31+
32+ clean :
33+ rm -f * ~ $(EXAMPLES )
34+ rm -rf * .dSYM * .TVD.* breakpoints
You can’t perform that action at this time.
0 commit comments