next up previous contents
Next: Revision history of this Up: Installation Previous: Setup for library creation

Setup for user programs

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)/base
You 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.



Victor Eijkhout
7/27/1998