Hello All,
I have fortran codes that call both fortran and C routines. To compile fortran and C routines I use Makefiles. Everything works fine in Linux. Want to use MinGW, but so far could not figure out how to compile the Makefile with mixed routines. My search did not reveal any useful archive link. Any suggestions?
Thanks in advance. 
M Akbar 
 
A sample Makefile is given below. The files I have are data_creator.f90, read.c, dataout.c, and swaparr.c.

******************************

SHELL=/bin/sh

OBJ=  data_creator.o read.o  dataout.o swaparr.o

TARGET=./run
LIBS  = -lm
FFLAGS = -O3 -DLINUX -fdefault-real-8 -ffree-line-length-132
CC  = gcc -DLINUX

F90 = gfortran


$(TARGET): $(OBJ)
  $(F90) $(FFLAGS) -o $(TARGET) $(OBJ) $(LIBS)
debug:
 $(MAKE) FFLAGS='$(FFLAGS) -g'

mpp:
 $(MAKE) FFLAGS='$(FFLAGS) -mp'

profile:
 $(MAKE) FFLAGS='$(FFLAGS) -p'

clean:
 rm -f core *.o *.l

.SUFFIXES:.f90
.f.o:
 $(F90) -c $(FFLAGS) $<
.f90.o:
 $(F90) -c $(FFLAGS) $<
.c.o:
 $(CC) -c $(CFLAGS) $(CPROC) $<
.f90.mod:
 $(F90) $(FFLAGS) -c $<