I am writing a package based on some Fortran code using the instructions at
My package builds with the following
Makevars file and I can call it successfully from R.
Now I am trying to debug it using the GNU debugger
gdb. I wrote a
f90 wrapper to replace the
hotnetc.c, but I need to create a suitable
Makefile based on this
Makevars (I will use
mingw32-make. What do I need to change/add to the below file?
I am working in
VSCODE following the instructions at
I was able to get make and debug working in Windows following his example,
# https://gcc.gnu.org/onlinedocs/gcc-4.3.6/gfortran/Preprocessing-and-conditional-compilation.html PKG_FCFLAGS += -x f95-cpp-input C_OBJS = hotnetc.o FT_OBJS = nrtype.o ioinfo.o exit_hotnet.o empdis.o model_time.o FT_OBJS += simul_info.o basinparam.o basin_flux.o soilxs_bas.o hotnetf.o all: $(SHLIB) clean $(SHLIB): $(FT_OBJS) $(C_OBJS) empdis.o: nrtype.o basin_flux.o model_time.o simul_info.o: nrtype.o basinparams.o: empdis.o soilxs_bas.o: model_time.o basinparams.o basin_flux.o simul_info.o hotnetf.o: soilxs_bas.o hotnetmodule.mod: hotnetf.o hotnetc.o: hotnetmodule.mod clean: rm -rf *.mod *.o
The Makefile here seems to work work: