Lines Matching +full:- +full:o
2 -include $(CONFIG)
4 -include $(COMMON)
6 pkgconf-path = $(if $(wildcard $(1)/$(2).pc),$(1)/$(2).pc,$(2))
10 # PETSC_ARCH - for example when using PETSc installed through Spack.
14 petsc.pc := $(call pkgconf-path,$(PETSC_DIR)/$(PETSC_ARCH)/lib/pkgconfig,petsc)
17 ceed.pc := $(call pkgconf-path,$(CEED_DIR)/lib/pkgconfig,ceed)
19 pkgconf = $(shell pkg-config $(if $(STATIC),--static) $1 | $(SED) -e 's/^"//g' -e 's/"$$//g')
23 PEDANTICFLAGS ?= -Werror -pedantic
25 CC = $(call pkgconf, --variable=ccompiler $(petsc.pc) $(ceed.pc))
26 CFLAGS = -std=c99 \
27 $(call pkgconf, --variable=cflags_extra $(petsc.pc)) \
28 $(call pkgconf, --cflags-only-other $(petsc.pc)) \
31 CPPFLAGS = $(call pkgconf, --cflags-only-I $(petsc.pc) $(ceed.pc)) \
32 $(call pkgconf, --variable=cflags_dep $(petsc.pc)) \
34 CXX = $(call pkgconf, --variable=cxxcompiler $(petsc.pc) $(ceed.pc)) $(if $(PEDANTIC),$(PEDAN…
35 CXXFLAGS = -std=c++17 -Wno-deprecated -Wno-tautological-compare
36 LDFLAGS = $(call pkgconf, --libs-only-L --libs-only-other $(petsc.pc) $(ceed.pc))
37 LDFLAGS += $(patsubst -L%, $(call pkgconf, --variable=ldflag_rpath $(petsc.pc))%, $(call pkgconf, …
38 LDLIBS = $(call pkgconf, --libs-only-l $(petsc.pc) $(ceed.pc)) -lm -lstdc++
43 AFLAGS ?= -fsanitize=address
48 CPPFLAGS += -I./include
58 CPPFLAGS += $(call pkgconf, --cflags-only-I $(libtorch.pc))
59 CXXFLAGS += $(call pkgconf, --cflags-only-other $(libtorch.pc))
60 LDFLAGS += $(call pkgconf, --libs-only-L --libs-only-other $(libtorch.pc))
61 …LDFLAGS += $(patsubst -L%, $(call pkgconf, --variable=ldflag_rpath $(petsc.pc))%, $(call pkgco…
62 LDLIBS += $(call pkgconf, --libs-only-l $(libtorch.pc))
70 LDFLAGS += -L$(IPEX_DIR)/lib/
71 LDFLAGS += -Wl,-rpath,$(IPEX_DIR)/lib/
72 LDLIBS += -lintel-ext-pt-gpu
81 src.c := examples/navierstokes.c $(filter-out $(wildcard **/smartsim/*), $(sort $(wildcard $(PROBLE…
82 src.o = $(src.c:%.c=$(OBJDIR)/%.o) $(src.cpp:%.cpp=$(OBJDIR)/%.o)
87 CPPFLAGS += -I$(SMARTREDIS_DIR)/include
88 …LDFLAGS += -L$(SMARTREDIS_DIR)/lib $(call pkgconf, --variable=ldflag_rpath $(petsc.pc))$(SMARTREDI…
89 LDLIBS += -lsmartredis
96 info-basic:
97 $(info -----------------------------------------)
103 $(info -----------------------------------------)
105 $(info -----------------------------------------)
116 $(info -----------------------------------------)
121 $(info -----------------------------------------)
127 $(info -----------------------------------------)
129 $(info -----------------------------------------)
140 $(info -----------------------------------------)
155 $(info -----------------------------------------)
164 $(info -----------------------------------------)
169 $(info -----------------------------------------)
176 MFLAGS := -j $(NPROCS) --warn-undefined-variables \
177 --no-print-directory --no-keep-going
179 $(OBJDIR)/navierstokes: $(src.o) | navierstokes
180 navierstokes: $(src.o) | $(petsc.pc) $(ceed.pc)
181 $(call quiet,LINK.o) $(LDFLAGS) $^ $(LOADLIBES) $(LDLIBS) -o $(OBJDIR)/$@
185 @mkdir -p $(@D)
191 # Inject Git/version macros when compiling honee-version.c
192 GIT_DESCRIBE := $(shell git -c safe.directory=$PWD describe --always --dirty 2>/dev/null || printf …
194 $(OBJDIR)/src/honee-config.o: Makefile
195 $(OBJDIR)/src/honee-config.o src/honee-config.c.tidy: CONFIGFLAGS += -DHONEE_GIT_VERSION="\"$(GIT_D…
196 $(OBJDIR)/src/honee-config.o src/honee-config.c.tidy: CONFIGFLAGS += -DHONEE_BUILD_CONFIGURATION="\…
198 $(OBJDIR)/%.o : %.c | $$(@D)/.DIR
199 $(call quiet,CC) $(CPPFLAGS) $(CFLAGS) $(CONFIGFLAGS) -c -o $@ $(abspath $<)
201 $(OBJDIR)/%.o : %.cpp | $$(@D)/.DIR
202 $(call quiet,CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(abspath $<)
213 print-% :
223 $(RM) -r $(OBJDIR) navierstokes *.vtu *.bin* *.csv *.png
234 tests.smartsim := test-smartsim
241 DOXYGENOPTS ?= -q
246 SPHINXBUILD = sphinx-build
247 SPHINXAUTOBUILD = sphinx-autobuild
251 doc-html doc-dirhtml doc-latexpdf doc-epub doc-help : doc-% : doxygen
252 @$(SPHINXBUILD) -M $* . "$(SPHINXBUILDDIR)" $(SPHINXOPTS)
254 doc-livehtml : doxygen
257 doc : doc-html
259 doc-clean:
260 $(RM) -r doc/html doc/build
263 CLANG_TIDY ?= clang-tidy
264 TIDY_OPTS ?= --quiet
265 TIDY_FILE_OPTS += $(CPPFLAGS) $(CONFIGFLAGS) --std=c99
268 $(call quiet,CLANG_TIDY) $(TIDY_OPTS) $^ -- $(TIDY_FILE_OPTS)
270 tidy-c : $(src.c:%=%.tidy)
272 tidy : tidy-c
275 CLANG_FORMAT ?= clang-format
276 FORMAT_OPTS += -style=file -i
278 AUTOPEP8_OPTS += --in-place --aggressive --max-line-length 120
279 SED_FMT_OPTS += -r 's/\s+$$//' -i
284 format.ch := $(shell git ls-files '*.[ch]pp' '*.[ch]')
285 format.py := $(filter-out tests/junit-xml/junit_xml/__init__.py, $(shell git ls-files '*.py'))
286 format.ot := $(shell git ls-files '*.md')
288 format-c :
291 format-py :
294 format-ot :
297 format : format-c format-py format-ot
301 CFLAGS += --coverage
302 LDFLAGS += --coverage
306 PROVE_OPTS ?= -j $(NPROCS)
322 run-% : $(OBJDIR)/%
323 …--ceed-backends $(CEED_BACKENDS) --mode tap $(if $(SMARTREDIS_DIR),--smartredis-dir $(SMARTREDIS_D…
336 test : $(matched:$(OBJDIR)/%=run-%)
343 $(info - Testing with libCEED backends: $(CEED_BACKENDS))
344 $(info - Testing on $(NPROC_TEST) processes)
345 …--exec '$(PYTHON) tests/junit.py' $(matched:$(OBJDIR)/%=%) :: --ceed-backends $(CEED_BACKENDS) --m…
349 prove-all :
353 junit-% : $(OBJDIR)/%
354 …--junit-batch $(JUNIT_BATCH) --ceed-backends $(CEED_BACKENDS) $(if $(SMARTREDIS_DIR),--smartredis-…
356 junit : $(matched:$(OBJDIR)/%=junit-%)
392 …@git --no-pager grep -n -P 'self\.gitcommit' -- config/BuildSystem/config/packages | grep 'origin/…
393 -@${RM} -f checkbadSource.out
394 -@touch checkbadSource.out
395 …-@${PYTHON} ${PETSC_DIR}/lib/petsc/bin/maint/check_header_guard.py --action=check --kind=pragma_on…
396 -@echo "----- Double blank lines in file -----------------------------------" >> checkbadSource.out
397 -@git --no-pager grep -n -P '^$$' -- ${GITSRC} > doublelinecheck.out
398 …-@${PYTHON} ${PETSC_DIR}/lib/petsc/bin/maint/doublelinecheck.py doublelinecheck.out >> checkbadSou…
399 -@${RM} -f doublelinecheck.out
400 -@echo "----- Tabs in file -------------------------------------------------" >> checkbadSource.out
401 -@git --no-pager grep -n -P '\t' -- ${GITSRC} >> checkbadSource.out;true
402 -@echo "----- Tabs in makefiles --------------------------------------------" >> checkbadSource.out
403 …-@git --no-pager grep -n -P '[ ]*[#A-Za-z0-9][ :=_A-Za-z0-9]*\t' -- makefile >> checkbadSource.ou…
404 -@echo "----- White space at end of line -----------------------------------" >> checkbadSource.out
405 -@git --no-pager grep -n -P ' $$' -- ${GITSRC} >> checkbadSource.out;true
406 -@echo "----- Two ;; -------------------------------------------------------" >> checkbadSource.out
407 -@git --no-pager grep -n -P -e ';;' -- ${GITSRC} | grep -v ' for (' >> checkbadSource.out;true
408 -@echo "----- PetscCall for an MPI error code ------------------------------" >> checkbadSource.out
409 …-@git --no-pager grep -n -P -e 'PetscCall\(MPI[U]*_\w*\(.*\)\);' -- ${GITSRC} | grep -Ev 'MPIU_Fil…
410 -@echo "----- DOS file (with DOS newlines) ---------------------------------" >> checkbadSource.out
411 -@git --no-pager grep -n -P '\r' -- ${GITSRC} >> checkbadSource.out;true
412 -@echo "----- { before SETERRQ ---------------------------------------------" >> checkbadSource.out
413 -@git --no-pager grep -n -P '{SETERRQ' -- ${GITSRC} >> checkbadSource.out;true
414 -@echo "----- PetscCall following SETERRQ ----------------------------------" >> checkbadSource.out
415 -@git --no-pager grep -n -P 'SETERRQ' -- ${GITSRC} | grep ";PetscCall" >> checkbadSource.out;true
416 -@echo "----- SETERRQ() without defined error code -------------------------" >> checkbadSource.out
417 …-@git --no-pager grep -n -P 'SETERRQ\((?!\))' -- ${GITSRC} | grep -v PETSC_ERR | grep " if " | gr…
418 -@echo "----- SETERRQ() with trailing newline ------------------------------" >> checkbadSource.out
419 -@git --no-pager grep -n -P "SETERRQ[1-9]?.*\\\n\"" -- ${GITSRC} >> checkbadSource.out;true
420 -@echo "----- Using if (condition) SETERRQ(...) instead of PetscCheck() ----" >> checkbadSource.out
421 …-@git --no-pager grep -n -P ' if +(.*) *SETERRQ' -- ${GITSRC} | grep -v 'PetscUnlikelyDebug' | gre…
422 …-@echo "----- Using if (PetscUnlikelyDebug(condition)) SETERRQ(...) instead of PetscAssert()" >> c…
423 …-@git --no-pager grep -n -P -E ' if +\(PetscUnlikelyDebug.*\) *SETERRQ' -- ${GITSRC} | grep -v pet…
424 -@echo "----- Using PetscFunctionReturn(ierr) ------------------------------" >> checkbadSource.out
425 -@git --no-pager grep -n -P 'PetscFunctionReturn(ierr)' -- ${GITSRC} >> checkbadSource.out;true
426 -@echo "----- Defining a returning macro without PetscMacroReturns() -------" >> checkbadSource.out
427 …-@git --no-pager grep -n -P 'define .*\w+;\s+do' -- ${GITSRC} | grep -E -v '(PetscMacroReturns|Pet…
428 -@echo "----- Defining an error checking macro using CHKERR style ----------" >> checkbadSource.out
429 …-@git --no-pager grep -n -P 'define\s+CHKERR\w*\(.*\)\s*do\s+{' -- ${GITSRC} >> checkbadSource.out…
430 -@echo "----- Using Petsc[Array|Mem]cpy() for ops instead of assignment ----" >> checkbadSource.out
431 -@git --no-pager grep -n -P 'cpy\(.*(.|->)ops, .*\)' -- ${GITSRC} >> checkbadSource.out;true
432 -@echo "----- Using PetscInfo() without carriage return --------------------" >> checkbadSource.out
433 …-@git --no-pager grep -n -P 'PetscCall\(PetscInfo\(' -- ${GITSRC} | grep -v '\\n' >> checkbadSourc…
434 -@echo "----- Using Petsc(Assert|Check)() with carriage return -------------" >> checkbadSource.out
435 …-@git --no-pager grep -n -P -E 'Petsc(Assert|Check)\(.*[^\]\\\n' -- ${GITSRC} >> checkbadSource.ou…
436 …-@echo "----- Extra \"\" after format specifier ending a string --------------" >> checkbadSource.…
437 -@git --no-pager grep -n -P -E '_FMT \"\",' -- ${GITSRC} >> checkbadSource.out;true
438 -@echo "----- First blank line ---------------------------------------------" >> checkbadSource.out
439 -@git --no-pager grep -n -P \^\$$ -- ${GITSRC} | grep ':1:' >> checkbadSource.out;true
440 -@echo "----- Blank line after PetscFunctionBegin and derivatives ----------" >> checkbadSource.out
441 …-@git --no-pager grep -n -E -A 1 ' PetscFunctionBegin(User|Hot){0,1};' -- ${GITSRC} | grep -E '\-…
442 -@echo "----- Blank line before PetscFunctionReturn ------------------------" >> checkbadSource.out
443 …-@git --no-pager grep -n -E -B 1 ' PetscFunctionReturn' -- ${GITSRC} | grep -E '\-[0-9]+-$$' | gr…
444 -@echo "----- No blank line before PetscFunctionBegin and derivatives ------" >> checkbadSource.out
445 …-@git --no-pager grep -n -E -B 1 ' PetscFunctionBegin(User|Hot){0,1};' -- ${GITSRC} ':!src/sys/te…
446 -@echo "----- Unneeded parentheses [!&~*](foo[->|.]bar) --------------------" >> checkbadSource.out
447 …-@git --no-pager grep -n -P -E '([\!\&\~\*\(]|\)\)|\([^,\*\(]+\**\))\(([a-zA-Z0-9_]+((\.|->)[a-zA-…
448 …-@echo "----- Use PetscSafePointerPlusOffset(ptr, n) instead of ptr ? ptr + n : NULL" >> checkbadS…
449 …-@git --no-pager grep -n -Po ' ([^()\ ]+) \? (?1) \+ (.)* : NULL' -- ${GITSRC} >> checkbadSource.o…
450 -@echo "----- Wrong PETSc capitalization -----------------------------------" >> checkbadSource.out
451 …-@git --no-pager grep -n -P -E '[^a-zA-Z_*>{.]petsc [^+=]' -- ${GITSRC} | grep -v 'mat_solver_type…
452 -@echo "----- Unnecessary braces around one-liners -------------------------" >> checkbadSource.out
453 …-@git --no-pager grep -n -P -E '[ ]*(if|for|while|do|else) \(.*\) \{[^;]*;[^;]*\}( \\)?$$' -- ${GI…
454 …-@echo "----- MPI_(Allreduce|Irecv|Isend) instead of MPIU_(Allreduce|Irecv|Isend)" >> checkbadSour…
455 …-@git --no-pager grep -n -P -E '\(MPI_(Allreduce|Irecv|Isend)\([^\)]' -- ${GITSRC} ':!*/tests/*' '…
456 @a=`cat checkbadSource.out | wc -l`; l=`expr $$a - 36` ;\
457 if [ $$l -gt 0 ] ; then \
461 ${RM} -f checkbadSource.out;\
463 test ! $$l -gt 0
464 -@git --no-pager grep -P -n "[\x00-\x08\x0E-\x1F\x80-\xFF]" -- ${GITSRC} > badSourceChar.out;true
465 -@w=`cat badSourceChar.out | wc -l`;\
466 if [ $$w -gt 0 ] ; then \
467 echo "Source files with non-ASCII characters ----------------" ;\
470 ${RM} -f badSourceChar.out;\
472 @test ! -s badSourceChar.out
474 -include $(src.o:%.o=%.d)