GNU make and F90
From: Feed_me_spam (flurboglarf_at_mailinator.com)
Date: 05/24/04
- Next message: Feed_me_spam: "GNU make and F90"
- Previous message: James Giles: "Re: [f77] Choosing a complete path"
- Next in thread: Helge Avlesen: "Re: GNU make and F90"
- Reply: Helge Avlesen: "Re: GNU make and F90"
- Reply: Carlie J. Coats: "Re: GNU make and F90"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 24 May 2004 13:09:47 -0700
Hi,
I am trying to use GNU make to compile a Fortran 90 program on my
Linux box. It seems that it doesn't recognize the suffix .f90. The
strange problem I encounter is the following: I have an identically
structured code collection in F77 which I compile with almost the same
makefile, and the compilation works. With the F90 version, the only
difference is
< MSOURCES=$(OBJECTS:.o=.f90)
--- > MSOURCES=$(OBJECTS:.o=.f) 14c24 < %.o: %.f90 %.h --- > %.o: %.f %.h The relevant parts in the F90 makefile are SOURCES=$(MSOURCES) $(AUXLIB:.o=.f) %.o: %.f90 %.h $(FC) $(FFLAGS) $< -o $@ a.out: $(HEADERS) $(SOURCES) $(OBJECTS) libaux.a $(FC) $(OBJECTS) $(LIBFLAG) $(LDFLAGS) -o $@ libaux.a: $(AUXLIB:.o=.f) $(FC) $(FFLAGS_SPEC) $^ ar -vru $@ $(AUXLIB) rm $(AUXLIB) The F77 stuff for libaux is compiled well, but then make doesn't try to build the objects of the main stuff from MSOURCES, but already tries to link and of course stops with the error /usr/bin/ld: cannot open alphaslct.o: No such file or directory make: *** [/home/tr/tmp/a.out] Error 1 The F90 code itself compiles if I just compile everything with ifort -c *.f90; ifort *.o, so the problem is not with the code. Any ideas? I have already tried to insert a .SUFFIXES instruction, but that shows no effect. Tom
- Next message: Feed_me_spam: "GNU make and F90"
- Previous message: James Giles: "Re: [f77] Choosing a complete path"
- Next in thread: Helge Avlesen: "Re: GNU make and F90"
- Reply: Helge Avlesen: "Re: GNU make and F90"
- Reply: Carlie J. Coats: "Re: GNU make and F90"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|