Lines Matching +full:requirements +full:- +full:test
1 # Copyright (c) 2017-2026, Lawrence Livermore National Security, LLC and other CEED contributors.
2 # All Rights Reserved. See the top-level LICENSE and NOTICE files for details.
4 # SPDX-License-Identifier: BSD-2-Clause
8 # ------------------------------------------------------------
10 # ------------------------------------------------------------
14 -include $(CONFIG)
18 -include $(COMMON)
23 # Cancel built-in and old-fashioned implicit rules which we don't use
29 @mkdir -p $(@D)
35 DARWIN := $(filter Darwin,$(shell uname -s))
38 # ------------------------------------------------------------
40 # ------------------------------------------------------------
57 # ------------------------------------------------------------
59 # ------------------------------------------------------------
62 ifeq (,$(filter-out undefined default,$(origin CC)))
65 ifeq (,$(filter-out undefined default,$(origin CXX)))
68 ifeq (,$(filter-out undefined default,$(origin FC)))
71 ifeq (,$(filter-out undefined default,$(origin LINK)))
74 ifeq (,$(filter-out undefined default,$(origin AR)))
77 ifeq (,$(filter-out undefined default,$(origin ARFLAGS)))
88 EM_LDFLAGS = -s TOTAL_MEMORY=256MB
107 AFLAGS ?= -fsanitize=address #-fsanitize=undefined -fno-omit-frame-pointer
110 CC_VENDOR := $(firstword $(filter gcc (GCC) clang cc icc icc_orig oneAPI XL emcc,$(subst -, ,$(shell $(CC) --version))))
113 FC_VENDOR := $(if $(FC),$(firstword $(filter GNU ifort ifx XL,$(shell $(FC) --version 2>&1 || $(FC) -qversion))))
116 UNAME_M := $(shell uname -m)
119 # GCC: use -march=native only on x86 (where -mcpu doesn't exist); use -mcpu=native elsewhere
120 MARCHFLAG.gcc := $(if $(filter x86_64 i%86,$(UNAME_M)),-march=native,-mcpu=native)
124 OMP_SIMD_FLAG.gcc := -fopenmp-simd
126 OMP_SIMD_FLAG.icc := -qopenmp-simd
128 OMP_FLAG.gcc := -fopenmp
130 OMP_FLAG.icc := -qopenmp
133 SYCL_FLAG.clang := -fsycl
135 SYCL_FLAG.oneAPI := -fsycl -fno-sycl-id-queries-fit-in-int
136 OPT.gcc := -g -ffp-contract=fast
141 CFLAGS.gcc := $(if $(STATIC),,-fPIC) -std=c11 -Wall -Wextra -Wno-unused-parameter -MMD -MP
145 CFLAGS.XL := $(if $(STATIC),,-qpic) -MMD
147 CXXFLAGS.gcc := $(if $(STATIC),,-fPIC) -std=c++11 -Wall -Wextra -Wno-unused-parameter -MMD -MP
151 CXXFLAGS.XL := $(if $(STATIC),,-qpic) -std=c++11 -MMD
153 FFLAGS.GNU := $(if $(STATIC),,-fPIC) -cpp -Wall -Wextra -Wno-unused-parameter -Wno-unused-dummy-argument -MMD -MP
154 FFLAGS.ifort := $(if $(STATIC),,-fPIC) -cpp
156 FFLAGS.XL := $(if $(STATIC),,-qpic) -ffree-form -qpreprocess -qextname -MMD
159 # compilers; e.g., xlc apparently ignores all options when -E is passed, thus
161 cc_check_flag = $(shell $(CC) -E -Werror $(1) -x c /dev/null > /dev/null 2>&1 && echo 1)
163 MARCHFLAG := $(if $(call cc_check_flag,$(MARCHFLAG)),$(MARCHFLAG),-mcpu=native)
171 PEDANTICFLAGS ?= -Werror -pedantic
174 OPT ?= -O $(MARCHFLAG) $(OPT.$(CC_VENDOR)) $(OMP_SIMD_FLAG)
178 LIBCXX ?= -lstdc++
179 NVCCFLAGS ?= -ccbin $(CXX) -Xcompiler '$(OPT)' -Xcompiler -fPIC
181 NVCCFLAGS += -arch=$(CUDA_ARCH)
183 HIPCCFLAGS ?= $(filter-out $(OMP_SIMD_FLAG),$(OPT)) -fPIC -munsafe-fp-atomics
185 HIPCCFLAGS += --offload-arch=$(HIP_ARCH)
188 SYCLFLAGS ?= $(SYCL_FLAG) -fPIC -std=c++17 $(filter-out -std=c++11,$(CXXFLAGS)) $(filter-out $(OMP_SIMD_FLAG),$(OPT))
199 CFLAGS += --coverage
200 CXXFLAGS += --coverage
201 CEED_LDFLAGS += --coverage
207 CPPFLAGS += -I./include
208 CEED_LDLIBS = -lm
221 INSTALL_DATA = $(INSTALL) -m644
226 MFLAGS := -j $(NPROCS) --warn-undefined-variables \
227 --no-print-directory --no-keep-going
231 PROVE_OPTS ?= -j $(NPROCS)
238 CEED_LIBS = -lceed
244 # ------------------------------------------------------------
246 # ------------------------------------------------------------
274 # ------------------------------------------------------------
276 # ------------------------------------------------------------
282 $(libceed.so) : CEED_LDFLAGS += $(if $(DARWIN), -install_name @rpath/$(notdir $(libceed.so)))
284 # ------------------------------------------------------------
286 # ------------------------------------------------------------
289 libceed.c := $(filter-out interface/ceed-cuda.c interface/ceed-hip.c interface/ceed-jit-source-root-$(if $(for_install),default,install).c, $(wildcard interface/ceed*.c backends/weak/*.c gallery/*.c))
294 # - CPU
301 # - GPU
304 cuda-ref.c := $(sort $(wildcard backends/cuda-ref/*.c))
305 cuda-ref.cpp := $(sort $(wildcard backends/cuda-ref/*.cpp))
306 cuda-ref.cu := $(sort $(wildcard backends/cuda-ref/kernels/*.cu))
307 cuda-shared.c := $(sort $(wildcard backends/cuda-shared/*.c))
308 cuda-gen.c := $(sort $(wildcard backends/cuda-gen/*.c))
309 cuda-gen.cpp := $(sort $(wildcard backends/cuda-gen/*.cpp))
310 cuda-all.c := interface/ceed-cuda.c $(cuda.c) $(cuda-ref.c) $(cuda-shared.c) $(cuda-gen.c)
311 cuda-all.cpp := $(cuda.cpp) $(cuda-ref.cpp) $(cuda-gen.cpp)
312 cuda-all.cu := $(cuda-ref.cu)
315 hip-ref.c := $(sort $(wildcard backends/hip-ref/*.c))
316 hip-ref.cpp := $(sort $(wildcard backends/hip-ref/*.cpp))
317 hip-ref.hip := $(sort $(wildcard backends/hip-ref/kernels/*.hip.cpp))
318 hip-shared.c := $(sort $(wildcard backends/hip-shared/*.c))
319 hip-gen.c := $(sort $(wildcard backends/hip-gen/*.c))
320 hip-gen.cpp := $(sort $(wildcard backends/hip-gen/*.cpp))
321 hip-all.c := interface/ceed-hip.c $(hip.c) $(hip-ref.c) $(hip-shared.c) $(hip-gen.c)
322 hip-all.cpp := $(hip.cpp) $(hip-ref.cpp) $(hip-gen.cpp)
323 hip-all.hip := $(hip-ref.hip)
324 sycl-core.cpp := $(sort $(wildcard backends/sycl/*.sycl.cpp))
325 sycl-ref.cpp := $(sort $(wildcard backends/sycl-ref/*.sycl.cpp))
326 sycl-shared.cpp:= $(sort $(wildcard backends/sycl-shared/*.sycl.cpp))
327 sycl-gen.cpp := $(sort $(wildcard backends/sycl-gen/*.sycl.cpp))
332 tests.c := $(sort $(wildcard tests/t[0-9][0-9][0-9]-*.c))
333 tests.f := $(if $(FC),$(sort $(wildcard tests/t[0-9][0-9][0-9]-*.f90)))
346 dealiiexamples := $(dealiiexamples.cc:examples/deal.II/%.cc=$(OBJDIR)/dealii-%)
350 mfemexamples := $(mfemexamples.cpp:examples/mfem/%.cpp=$(OBJDIR)/mfem-%)
353 nekexamples := $(OBJDIR)/nek-bps
356 rustqfunctions.c := $(sort $(wildcard examples/rust-qfunctions/*.c))
357 rustqfunctionsexamples := $(rustqfunctions.c:examples/rust-qfunctions/%.c=$(OBJDIR)/rustqfunctions-%)
361 petscexamples := $(petscexamples.c:examples/petsc/%.c=$(OBJDIR)/petsc-%)
365 fluidsexamples := $(fluidsexamples.c:examples/fluids/%.c=$(OBJDIR)/fluids-%)
369 solidsexamples := $(solidsexamples.c:examples/solids/%.c=$(OBJDIR)/solids-%)
372 # ------------------------------------------------------------
374 # ------------------------------------------------------------
378 info-basic:
379 $(info -----------------------------------------)
385 $(info -----------------------------------------)
387 $(info -----------------------------------------)
389 $(info Built-in Backends:)
393 $(info $(filter-out $(BACKENDS_BUILTIN),$(BACKENDS)))
395 $(info -----------------------------------------)
400 $(info -----------------------------------------)
406 $(info -----------------------------------------)
408 $(info -----------------------------------------)
410 $(info Built-in Backends:)
414 $(info $(filter-out $(BACKENDS_BUILTIN),$(BACKENDS)))
416 $(info -----------------------------------------)
438 $(info -----------------------------------------)
449 $(info -----------------------------------------)
457 $(info -----------------------------------------)
465 $(info -----------------------------------------)
470 $(info -----------------------------------------)
473 info-backends:
474 $(info make: 'lib' with optional backends: $(filter-out $(BACKENDS_BUILTIN),$(BACKENDS)))
477 info-backends-all:
482 # ------------------------------------------------------------
484 # ------------------------------------------------------------
493 MEMCHK := $(shell echo "$(HASH)include <valgrind/memcheck.h>" | $(CC) $(CPPFLAGS) -E - >/dev/null 2>&1 && echo 1)
503 AVX_FLAG := $(if $(filter clang,$(CC_VENDOR)),+avx,-mavx)
504 AVX := $(filter $(AVX_FLAG),$(shell $(CC) $(CFLAGS:-M%=) -v -E -x c /dev/null 2>&1))
512 # Collect list of libraries and paths for use in linking and pkg-config
520 PKG_LIBS += -L$(abspath $(XSMM_DIR))/lib -lxsmm
523 BLAS_LIB ?= -lblas -ldl
528 MKL_LINK = -L$(MKL_LIBDIR)
530 BLAS_LIB ?= $(MKL_LINK) -Wl,--push-state,--no-as-needed -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lpthread -lm -ldl -Wl,--pop-state
534 $(xsmm.c:%.c=$(OBJDIR)/%.o) $(xsmm.c:%=%.tidy) : CPPFLAGS += -I$(XSMM_DIR)/include
540 CUDA_LIB_DIR := $(wildcard $(foreach d,lib lib64 lib/x86_64-linux-gnu,$(CUDA_DIR)/$d/libcudart.${SO_EXT}))
546 $(libceeds) : CPPFLAGS += -I$(CUDA_DIR)/include
547 PKG_LIBS += -L$(abspath $(CUDA_LIB_DIR)) -lcudart -lnvrtc -lcuda -lcublas
548 PKG_STUBS_LIBS += -L$(CUDA_LIB_DIR_STUBS)
550 libceed.c += interface/ceed-cuda.c
551 libceed.c += $(cuda-all.c)
552 libceed.cpp += $(cuda-all.cpp)
553 libceed.cu += $(cuda-all.cu)
562 HIPCONFIG_CPPFLAGS := $(subst =,,$(shell $(ROCM_DIR)/bin/hipconfig -C))
563 $(hip-all.c:%.c=$(OBJDIR)/%.o) $(hip-all.c:%=%.tidy): CPPFLAGS += $(HIPCONFIG_CPPFLAGS)
565 $(hip-all.cpp:%.cpp=$(OBJDIR)/%.o) $(hip-all.cpp:%=%.tidy): CPPFLAGS += $(HIPCONFIG_CPPFLAGS)
567 PKG_LIBS += -L$(abspath $(HIP_LIB_DIR)) -lamdhip64 -lhipblas
569 libceed.c += $(hip-all.c)
570 libceed.cpp += $(hip-all.cpp)
571 libceed.hip += $(hip-all.hip)
582 PKG_LIBS += $(SYCL_FLAG) -lze_loader
584 libceed.sycl += $(sycl-core.cpp) $(sycl-ref.cpp) $(sycl-shared.cpp) $(sycl-gen.cpp)
590 MAGMA_ARCH=$(shell nm -g $(MAGMA_DIR)/lib/libmagma.* | grep -c "hipblas")
593 cuda_link = $(if $(STATIC),,-Wl,-rpath,$(CUDA_LIB_DIR)) -L$(CUDA_LIB_DIR) -lcublas -lcusparse -lcudart
594 omp_link = -fopenmp
595 magma_link_static = -L$(MAGMA_DIR)/lib -lmagma $(cuda_link) $(omp_link)
596 magma_link_shared = -L$(MAGMA_DIR)/lib $(if $(STATIC),,-Wl,-rpath,$(abspath $(MAGMA_DIR)/lib)) -lmagma
601 $(magma.c:%.c=$(OBJDIR)/%.o) $(magma.c:%=%.tidy) : CPPFLAGS += -DADD_ -I$(MAGMA_DIR)/include -I$(CUDA_DIR)/include
602 $(magma.cpp:%.cpp=$(OBJDIR)/%.o) $(magma.cpp:%=%.tidy) : CPPFLAGS += -DADD_ -I$(MAGMA_DIR)/include -I$(CUDA_DIR)/include
607 omp_link = -fopenmp
608 hip_link = $(if $(STATIC),,-Wl,-rpath,$(HIP_LIB_DIR)) -L$(HIP_LIB_DIR) -lhipblas -lhipsparse -lamdhip64
609 magma_link_static = -L$(MAGMA_DIR)/lib -lmagma $(hip_link) $(omp_link)
610 magma_link_shared = -L$(MAGMA_DIR)/lib $(hip_link) $(omp_link) $(if $(STATIC),,-Wl,-rpath,$(abspath $(MAGMA_DIR)/lib)) -lmagma
615 $(magma.c:%.c=$(OBJDIR)/%.o) $(magma.c:%=%.tidy) : CPPFLAGS += $(HIPCONFIG_CPPFLAGS) -I$(MAGMA_DIR)/include -I$(ROCM_DIR)/include -DCEED_MAGMA_USE_HIP -DADD_
616 $(magma.cpp:%.cpp=$(OBJDIR)/%.o) $(magma.cpp:%=%.tidy) : CPPFLAGS += $(HIPCONFIG_CPPFLAGS) -I$(MAGMA_DIR)/include -I$(ROCM_DIR)/include -DCEED_MAGMA_USE_HIP -DADD_
628 # ------------------------------------------------------------
630 # ------------------------------------------------------------
632 _pkg_ldflags = $(filter -L%,$(PKG_LIBS))
633 _pkg_ldlibs = $(filter-out -L%,$(PKG_LIBS))
634 $(libceeds) : CEED_LDFLAGS += $(_pkg_ldflags) $(if $(STATIC),,$(_pkg_ldflags:-L%=-Wl,-rpath,%)) $(PKG_STUBS_LIBS)
637 $(examples) $(tests) : CEED_LDFLAGS += $(EM_LDFLAGS) $(_pkg_ldflags) $(if $(STATIC),,$(_pkg_ldflags:-L%=-Wl,-rpath,%)) $(PKG_STUBS_LIBS)
641 pkgconfig-libs-private = $(PKG_LIBS)
646 pkgconfig-libs-private += $(LIBCXX)
651 # ------------------------------------------------------------
653 # ------------------------------------------------------------
655 # File names *-weak.c contain weak symbol definitions, which must be listed last
657 weak_last = $(filter-out %-weak.o,$(1)) $(filter %-weak.o,$(1))
660 $(filter %fortran.o,$(libceed.o)) : CPPFLAGS += $(if $(filter 1,$(UNDERSCORE)),-DUNDERSCORE)
661 $(libceed.o): | info-backends
663 $(call quiet,LINK) $(LDFLAGS) $(CEED_LDFLAGS) -shared -o $@ $^ $(CEED_LDLIBS) $(LDLIBS)
669 $(call quiet,CC) $(CPPFLAGS) $(CFLAGS) $(CONFIGFLAGS) -c -o $@ $(abspath $<)
672 $(call quiet,CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(abspath $<)
675 $(call quiet,NVCC) $(filter-out -Wno-unused-function, $(CPPFLAGS)) $(NVCCFLAGS) -c -o $@ $(abspath $<)
678 $(call quiet,HIPCC) $(CPPFLAGS) $(HIPCCFLAGS) -c -o $@ $(abspath $<)
681 $(call quiet,SYCLCXX) $(SYCLFLAGS) $(CPPFLAGS) -c -o $@ $(abspath $<)
684 $(call quiet,SYCLCXX) $(SYCLFLAGS) $(CPPFLAGS) -c -o $@ $(abspath $<)
687 $(call quiet,LINK.c) $(CEED_LDFLAGS) -o $@ $(abspath $<) $(CEED_LIBS) $(CEED_LDLIBS) $(LDLIBS) -I./tests/test-include
690 $(call quiet,LINK.F) -DSOURCE_DIR='"$(abspath $(<D))/"' $(CEED_LDFLAGS) -o $@ $(abspath $<) $(CEED_LIBS) $(CEED_LDLIBS) $(LDLIBS)
693 $(call quiet,LINK.c) $(CEED_LDFLAGS) -o $@ $(abspath $<) $(CEED_LIBS) $(CEED_LDLIBS) $(LDLIBS)
696 $(call quiet,LINK.F) -DSOURCE_DIR='"$(abspath $(<D))/"' $(CEED_LDFLAGS) -o $@ $(abspath $<) $(CEED_LIBS) $(CEED_LDLIBS) $(LDLIBS)
699 # ------------------------------------------------------------
701 # ------------------------------------------------------------
705 $(OBJDIR)/dealii-% : examples/deal.II/*.cc examples/deal.II/*.h $(libceed) | $$(@D)/.DIR
706 mkdir -p examples/deal.II/build
707 cmake -B examples/deal.II/build -S examples/deal.II -DDEAL_II_DIR=$(DEAL_II_DIR) -DCEED_DIR=$(PWD)
708 +$(call quiet,MAKE) -C examples/deal.II/build
712 $(OBJDIR)/mfem-% : examples/mfem/%.cpp $(libceed) | $$(@D)/.DIR
713 +$(MAKE) -C examples/mfem CEED_DIR=`pwd` \
720 # such as when calling `make prove-all -j2`.
721 $(OBJDIR)/nek-bps : examples/nek/bps/bps.usr examples/nek/nek-examples.sh $(libceed) | $$(@D)/.DIR
722 +$(MAKE) -C examples MPI=$(MPI) CEED_DIR=`pwd` NEK5K_DIR="$(abspath $(NEK5K_DIR))" nek
724 cp examples/nek/nek-examples.sh $(OBJDIR)/nek-bps
727 $(OBJDIR)/rustqfunctions-% : examples/rust-qfunctions/%.c $(libceed) | $$(@D)/.DIR
728 +$(MAKE) -C examples/rust-qfunctions CEED_DIR=`pwd`
729 cp examples/rust-qfunctions/$* $@
738 +$(call quiet,MAKE) -C examples/petsc CEED_DIR=`pwd` AR=$(AR) ARFLAGS=$(ARFLAGS) \
741 $(OBJDIR)/petsc-% : examples/petsc/%.c examples/petsc/libutils.a.PHONY $(libceed) $(ceed.pc) | $$(@D)/.DIR
742 +$(call quiet,MAKE) -C examples/petsc CEED_DIR=`pwd` \
747 $(OBJDIR)/fluids-% : examples/fluids/%.c examples/fluids/src/*.c examples/fluids/*.h examples/fluids/include/*.h examples/fluids/problems/*.c examples/fluids/qfunctions/*.h $(libceed) $(ceed.pc) examples/fluids/Makefile | $$(@D)/.DIR
748 +$(call quiet,MAKE) -C examples/fluids CEED_DIR=`pwd` \
753 $(OBJDIR)/solids-% : examples/solids/%.c examples/solids/%.h \
757 +$(call quiet,MAKE) -C examples/solids CEED_DIR=`pwd` \
782 $(tests) $(examples) : override LDFLAGS += $(if $(STATIC),,-Wl,-rpath,$(abspath $(LIBDIR))) -L$(LIBDIR)
785 # ------------------------------------------------------------
787 # ------------------------------------------------------------
797 run-% : $(OBJDIR)/%
798 @$(PYTHON) tests/junit.py --mode tap --ceed-backends $(BACKENDS) --nproc $(NPROC_TEST) --pool-size $(NPROC_POOL) --search '$(subsearch)' $(<:$(OBJDIR)/%=%)
800 # The test and prove targets can be controlled via pattern searches. The
804 # make test search='petsc mfem' # PETSc and MFEM examples
813 # Test core libCEED
814 test : $(matched:$(OBJDIR)/%=run-%)
816 # Run test target in parallel
817 tst : ;@$(MAKE) $(MFLAGS) V=$(V) test
819 ctc-% : $(ctests);@$(foreach tst,$(ctests),$(tst) /cpu/$*;)
822 # https://testanything.org/tap-specification.html
825 $(PROVE) $(PROVE_OPTS) --exec '$(PYTHON) tests/junit.py' $(matched:$(OBJDIR)/%=%) :: --mode tap --ceed-backends $(BACKENDS) --nproc $(NPROC_TEST) --pool-size $(NPROC_POOL) --search '$(subsearch)'
829 prove-all :
832 junit-% : $(OBJDIR)/%
833 @printf " %10s %s\n" TEST $(<:$(OBJDIR)/%=%); $(PYTHON) tests/junit.py --ceed-backends $(BACKENDS) --nproc $(NPROC_TEST) --pool-size $(NPROC_POOL) --search '$(subsearch)' --junit-batch $(JUNIT_BATCH) $(<:$(OBJDIR)/%=%)
835 junit : $(matched:$(OBJDIR)/%=junit-%)
840 allbenchmarks = petsc-bps
841 bench_targets = $(addprefix bench-,$(allbenchmarks))
843 $(bench_targets): bench-%: $(OBJDIR)/%
844 cd benchmarks && ./benchmark.sh --ceed "$(BACKENDS)" -r $(*).sh
847 $(ceed.pc) : pkgconfig-prefix = $(abspath .)
848 $(OBJDIR)/ceed.pc : pkgconfig-prefix = $(prefix)
852 -e "s:%prefix%:$(pkgconfig-prefix):" \
853 -e "s:%opt%:$(OPT):" \
854 -e "s:%libs_private%:$(pkgconfig-libs-private):" $< > $@
856 GIT_DESCRIBE = $(shell git -c safe.directory=$PWD describe --always --dirty 2>/dev/null || printf "unknown\n")
858 $(OBJDIR)/interface/ceed-config.o: Makefile
859 $(OBJDIR)/interface/ceed-config.o: CONFIGFLAGS += -DCEED_GIT_VERSION="\"$(GIT_DESCRIBE)\""
860 $(OBJDIR)/interface/ceed-config.o: CONFIGFLAGS += -DCEED_BUILD_CONFIGURATION="\"// Build Configuration:$(foreach v,$(CONFIG_VARS),\n$(v) = $($(v)))\""
862 $(OBJDIR)/interface/ceed-jit-source-root-default.o : CPPFLAGS += -DCEED_JIT_SOURCE_ROOT_DEFAULT="\"$(abspath ./include)/\""
863 $(OBJDIR)/interface/ceed-jit-source-root-install.o : CPPFLAGS += -DCEED_JIT_SOURCE_ROOT_DEFAULT="\"$(abspath $(includedir))/\""
866 # ------------------------------------------------------------
868 # ------------------------------------------------------------
871 $(INSTALL) -d $(addprefix $(if $(DESTDIR),"$(DESTDIR)"),"$(includedir)"\
872 "$(includedir)/ceed/" "$(includedir)/ceed/jit-source/"\
873 "$(includedir)/ceed/jit-source/cuda/" "$(includedir)/ceed/jit-source/hip/"\
874 "$(includedir)/ceed/jit-source/gallery/" "$(includedir)/ceed/jit-source/magma/"\
875 "$(includedir)/ceed/jit-source/sycl/" "$(libdir)" "$(pkgconfigdir)")
879 $(INSTALL_DATA) include/ceed/ceed-f32.h "$(DESTDIR)$(includedir)/ceed/"
880 $(INSTALL_DATA) include/ceed/ceed-f64.h "$(DESTDIR)$(includedir)/ceed/"
889 $(INSTALL_DATA) $(wildcard include/ceed/jit-source/cuda/*.h) "$(DESTDIR)$(includedir)/ceed/jit-source/cuda/"
890 $(INSTALL_DATA) $(wildcard include/ceed/jit-source/hip/*.h) "$(DESTDIR)$(includedir)/ceed/jit-source/hip/"
891 $(INSTALL_DATA) $(wildcard include/ceed/jit-source/gallery/*.h) "$(DESTDIR)$(includedir)/ceed/jit-source/gallery/"
892 $(INSTALL_DATA) $(wildcard include/ceed/jit-source/magma/*.h) "$(DESTDIR)$(includedir)/ceed/jit-source/magma/"
893 $(INSTALL_DATA) $(wildcard include/ceed/jit-source/sycl/*.h) "$(DESTDIR)$(includedir)/ceed/jit-source/sycl/"
896 # ------------------------------------------------------------
898 # ------------------------------------------------------------
901 $(RM) -r $(OBJDIR) $(LIBDIR) dist *egg* .pytest_cache *cffi*
902 $(call quiet,MAKE) -C examples clean NEK5K_DIR="$(abspath $(NEK5K_DIR))"
903 $(call quiet,MAKE) -C python/tests clean
905 $(RM) -rf temp
908 $(RM) -r doc/html doc/sphinx/build $(CONFIG)
911 # ------------------------------------------------------------
913 # ------------------------------------------------------------
918 $(DOXYGEN) -q Doxyfile
920 doc-html doc-latexpdf doc-epub doc-livehtml : doc-% : doxygen
921 make -C doc/sphinx $*
923 doc : doc-html
926 # ------------------------------------------------------------
928 # ------------------------------------------------------------
931 CLANG_FORMAT ?= clang-format
932 CLANG_FORMAT_OPTS += -style=file -i
934 AUTOPEP8_OPTS += --in-place --aggressive --max-line-length 120
936 format.ch := $(filter-out include/ceedf.h $(wildcard tests/t*-f.h) $(wildcard examples/ceed/ex*-f.h), $(shell git ls-files '*.[ch]pp' '*.[ch]' '*.cu'))
937 format.py := $(filter-out tests/junit-xml/junit_xml/__init__.py, $(shell git ls-files '*.py'))
938 format.ot := $(filter-out doc/sphinx/source/CODE_OF_CONDUCT.md doc/sphinx/source/CONTRIBUTING.md, $(shell git ls-files '*.md' '*.f90'))
940 format-c :
943 format-py :
946 format-ot:
947 @$(SED) -r 's/\s+$$//' -i $(format.ot)
949 format : format-c format-py format-ot
951 # Vermin - python version requirements
953 VERMIN_OPTS += -t=3.8- --violations
959 CLANG_TIDY ?= clang-tidy
962 $(CLANG_TIDY) $(TIDY_OPTS) $^ -- $(CPPFLAGS) --std=c11 -I$(CUDA_DIR)/include -I$(ROCM_DIR)/include -DCEED_JIT_SOURCE_ROOT_DEFAULT="\"$(abspath ./include)/\"" -DCEED_GIT_VERSION="\"$(GIT_DESCRIBE)\"" -DCEED_BUILD_CONFIGURATION="\"// Build Configuration:$(foreach v,$(CONFIG_VARS),\n$(v) = $($(v)))\""
965 $(CLANG_TIDY) $(TIDY_OPTS) $^ -- $(CPPFLAGS) --std=c++11 -I$(CUDA_DIR)/include -I$(ROCM_DIR)/include
967 tidy-c : $(libceed.c:%=%.tidy)
968 tidy-cpp : $(libceed.cpp:%=%.tidy)
970 tidy : tidy-c tidy-cpp
972 # Include-What-You-Use
975 IWYU_CC ?= $(IWYU_DIR)/build/bin/include-what-you-use
978 $(MAKE) -B CC=$(IWYU_CC)
981 # ------------------------------------------------------------
983 # ------------------------------------------------------------
988 print-% :
998 # ------------------------------------------------------------
1000 # ------------------------------------------------------------
1035 # ------------------------------------------------------------
1037 # ------------------------------------------------------------
1039 wheel : export MARCHFLAG = -march=generic
1042 docker run -it --user $(shell id -u):$(shell id -g) --rm -v $(PWD):/io -w /io \
1043 -e MARCHFLAG -e WHEEL_PLAT \
1044 quay.io/pypa/$(WHEEL_PLAT) python/make-wheels.sh
1046 # ------------------------------------------------------------
1048 # ------------------------------------------------------------
1051 .PHONY : all cln clean doxygen doc format lib install par print test tst prove prv prove-all junit examples tidy iwyu info info-backends info-backends-all configure wheel
1054 # Include *.d deps when not -B = --always-make: useful if the paths are wonky in a container
1055 -include $(if $(filter B,$(MAKEFLAGS)),,$(libceed.c:%.c=$(OBJDIR)/%.d) $(tests.c:tests/%.c=$(OBJDIR)/%.d))