| 037846ab | 04-Mar-2017 |
Jed Brown <jed@jedbrown.org> |
pkg-config: write more complete flags
The following is, I think, a best-practices makefile that works with GNU Make built-in rules for both prefix and non-prefix installs. Add --static if linking s
pkg-config: write more complete flags
The following is, I think, a best-practices makefile that works with GNU Make built-in rules for both prefix and non-prefix installs. Add --static if linking statically. Obviously the ldflags_rpath is a choice, versus needing the user to set LD_LIBRARY_PATH if libpetsc is not in a standard path. This makefile should need little or no recipes, just prerequisite statements. Note that I have separated CFLAGS and CPPFLAGS, LDFLAGS and LDLIBS, as recommended by the make manual and as used by the implicit rules.
PETSc.pc := $(PETSC_DIR)/$(PETSC_ARCH)/lib/pkgconfig/PETSc.pc
CC := $(shell pkg-config --variable=ccompiler $(PETSc.pc)) CFLAGS := $(shell pkg-config --variable=cflags_extra $(PETSc.pc)) $(shell pkg-config --cflags-only-other $(PETSc.pc)) CPPFLAGS := $(shell pkg-config --cflags-only-I $(PETSc.pc)) LDFLAGS := $(shell pkg-config --variable=ldflags_rpath $(PETSc.pc)) $(shell pkg-config --libs-only-L --libs-only-other $(PETSc.pc)) LDLIBS := $(shell pkg-config --libs-only-l $(PETSc.pc))
show more ...
|
| 70211a5b | 01-Mar-2017 |
Satish Balay <balay@mcs.anl.gov> |
configure: PETSC_ARCH should check for . and .. values. Also error checks should be for all input modes - env variable, command line options PETSC_ARCH or -with-petsc-arch
Reported-by: Ariane Fleury
configure: PETSC_ARCH should check for . and .. values. Also error checks should be for all input modes - env variable, command line options PETSC_ARCH or -with-petsc-arch
Reported-by: Ariane Fleury <ariane.fleury@gmail.com>
show more ...
|