[petsc-users] using makefiles

Mark Adams mfadams at lbl.gov
Sun Jan 28 09:27:25 CST 2018


I want to add stuff to compile lines and I tried:


include ${PETSC_DIR}/lib/petsc/conf/variables
include ${PETSC_DIR}/lib/petsc/conf/rules

CC_FLAGS := ${CC_FLAGS} -I$(OLYMPUS_INC_DIR) -I$(FEI_DIR) -DPROM_HAVE_METIS
-DPROM_USE_PETSC -DPROM_NO_FEI -DPROM_HAVE_SILO # -I$(SILO_INC)
FC_FLAGS := ${FC_FLAGS} -fdefault-integer-8

This a C++ code:

10:21 2 master *= ~/Codes/olympus-keaveny/Olympus$ make getcflags

-Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas
-fstack-protector -Qunused-arguments -fvisibility=hidden -g -mavx2
-I./include -I./fei_prom -DPROM_HAVE_METIS -DPROM_USE_PETSC -DPROM_NO_FEI
-DPROM_HAVE_SILO

10:21 master *= ~/Codes/olympus-keaveny/Olympus$ make

/Users/markadams/Codes/petsc/arch-macosx-gnu-g/bin/mpicxx -o pfeap/pfeap.o
-c -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas
-fstack-protector -fvisibility=hidden -g -mavx2
-I/Users/markadams/Codes/petsc/include
-I/Users/markadams/Codes/petsc/arch-macosx-gnu-g/include
-I/Users/markadams/Codes/petsc/arch-macosx-gnu-g/include/pragmatic
-I/Users/markadams/Codes/petsc/arch-macosx-gnu-g/include/eigen3
`pwd`/pfeap/pfeap.C

/Users/markadams/Codes/olympus-keaveny/Olympus/pfeap/pfeap.C:7:10: fatal
error: 'pfeap.hh' file not found

#include "pfeap.hh"

         ^~~~~~~~~~

1 error generated.

It looks like CC_FLAGS are not getting used by CXX (-I./include is not
making it to the compile line). How should I do this? I don't see a
CXX_FLAGS.

Thanks,
Mark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20180128/1cec471a/attachment-0001.html>


More information about the petsc-users mailing list