[petsc-users] using makefiles
Satish Balay
balay at mcs.anl.gov
Sun Jan 28 11:15:05 CST 2018
Normally you would do:
CPPFLAGS = I$(OLYMPUS_INC_DIR) -I$(FEI_DIR) -DPROM_HAVE_METIS -DPROM_USE_PETSC -DPROM_NO_FEI -DPROM_HAVE_SILO # -I$(SILO_INC)
FPPFLAGS = -fdefault-integer-8
include ${PETSC_DIR}/lib/petsc/conf/variables
include ${PETSC_DIR}/lib/petsc/conf/rules
[CFPPFLAGS/FPPFLAGS are used for compile - and CFLAGS/FFLAGS are used for both compile and link]
Satish
On Sun, 28 Jan 2018, Mark Adams wrote:
> 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
>
More information about the petsc-users
mailing list