ALL: a.out # PETSC_DIR and PETSC_ARCH should be set either in env or in this makeifle PETSC_DIR=/cygdrive/d/wtay/Lib/petsc-3.1-p7_gcc_debug #PETSC_ARCH=petsc-3.1-p7_gcc_debug CFLAGS = FFLAGS = -g -O0 # instead of opt2 add these flags to default petsc compile target for .F/.f CPPFLAGS = FPPFLAGS = CLEANFILES = a.out include ${PETSC_DIR}/conf/variables include ${PETSC_DIR}/conf/rules opt = -g -c -O0 opt3 = -g -c -O0 libs =/home/wtay/Lib/tecio64.a OBJS = global.o grid.o math_routine.o flux_area.o ibm.o bc.o bc_impl.o bc_semi.o set_matrix.o inter_step.o mom_disz.o hypre.o poisson.o cell_data.o fractional.o ibm2d_high_Re.o a.out : $(OBJS) $(FLINKER) -o a.out $(OBJS) $(libs) $(PETSC_LIB) #compiled these sources with default petsc targets global.o : global.F90 flux_area.o : flux_area.F90 global.o mom_disz.o : mom_disz.F90 inter_step.o set_matrix.o poisson.o : poisson.F90 mom_disz.o hypre.o : hypre.F90 mom_disz.o poisson.o cell_data.o : cell_data.F90 grid.o poisson.o ibm2d_high_Re.o : ibm2d_high_Re.F90 cell_data.o fractional.o # sources compiled separately - as they need different opt/opt3 compiler flags. math_routine.o : math_routine.f90 global.o $(FC) $(opt) math_routine.f90 ibm.o : ibm.f90 math_routine.o flux_area.o $(FC) $(opt) ibm.f90 grid.o : grid.f90 ibm.o $(FC) $(opt3) grid.f90 bc.o : bc.f90 flux_area.o $(FC) $(opt) bc.f90 bc_impl.o : bc_impl.f90 bc.o $(FC) $(opt) bc_impl.f90 bc_semi.o : bc_semi.f90 bc.o $(FC) $(opt) bc_semi.f90 set_matrix.o : set_matrix.f90 bc_semi.o bc_impl.o $(FC) $(opt) set_matrix.f90 inter_step.o : inter_step.f90 bc_impl.o $(FC) $(opt) inter_step.f90 fractional.o : fractional.f90 poisson.o $(FC) $(opt) fractional.f90