1
=pgf90
FFLAGS = -g -fast -Mipa=fast,inline -Mconcur
FFLAGS += -Mbounds
FFLAGS += -Bstatic_pgi
LFLAGS=  -Ktrap=fp -fast -Mipa=fast,inline -Mconcur

NETCDF= /home/mark/GEMSS/Libs/NETCDF-3.6.2
LNUMA= /opt/pgi/linux86-64/12.1/lib
LIBS=-L$(NETCDF) -lnetcdf -L$(LNUMA) -lnuma

PROGRAM = test
TODAY = date +%F

MODULES = mod.for
SOURCES = main.for

OBJECTS = $(SOURCES:.for=.o)
MODOBJS = $(MODULES:.for=.o)
MODMODS = $(MODULES:.for=.mod)

$(program): $(MODOBJS) $(OBJECTS)
      $(FC) $(FFLAGS) $(MODOBJS) $(OBJECTS) $(LIBS) -o $@

.for.o:
        $(FC) $(FFLAGS) $(INCL) -c $< -o $@

I'm trying to compile a Fortran 90 code using this makefile, but while I did make -f Makefile. It keep complainning: missing seperator at line($(FC) $(FFLAGS) $(MODOBJS) $(OBJECTS) $(LIBS) -o $@ ).

  • possible duplicate of [Missing separator in Makefile?](http://stackoverflow.com/questions/9580566/missing-separator-in-makefile) – Carl Norum Aug 28 '13 at 20:09
  • Does this answer your question? [makefile:4: \*\*\* missing separator. Stop](https://stackoverflow.com/questions/16931770/makefile4-missing-separator-stop) – Tejas Shetty Nov 10 '21 at 08:46

1 Answers1

3

Recipe lines must start with a tab character, not spaces.

Carl Norum
  • 219,201
  • 40
  • 422
  • 469