By far the easiest way to specify all flags and include paths for user programs is to have the following statement in the makefile:
include $(PARPRE_DIR)/bmake/$(PARPRE_ARCH)/baseYou can then specify the flags as
CFLAGS = $(PARPRE_INCLUDE) $(PETSC_INCLUDE) $(CONF) $(COPT)This presupposes that your system's setup of `make' uses the CFLAGS macro: type
make -p and you'll probably see the following lines:
.c.o:
$(CC) -c $(CFLAGS) $(BASEOPT) $*.c
or, in the ParPre directory:
.c.o:
$(CC) -c $(CFLAGS) $(COPTFLAGS) $<
If not, adjust accordingly.
The linker statement has to include PARPRE_LIB, eg
$(CLINKER) -o test prog.o $(PARPRE_LIB)This macro is defined in the included base file mentioned above.