What I have done is to try to clean up my src location by moving some files into sub-folders. The files I moved don't get changed very often, and when I port to linux, it helps some to only have to deal with files that have been changed.
I took my src directory, and added some sub directories,
src/
src/src_server/
src/src_main/
I moved some cpp files from src/ to src/src_server/ and then added the compile rule,
This is what "worked fine". The src files in src/src_server/ got compiled and the objects placed in BDIR.
I tried the same thing with some fortran files, moving them to src/src_main/ and adding the compile rule,
When I run the make, I get a message that there is no rule to compile the object for the first src file and it quits. I need to reproduce the message and then I will post the output. Under cygwin, I am using make 3.81. I am also doing this in ubuntu, so I will have to boot into that to get the version that is installed there.
At first, I thought the issue may have been with COMMON.BLK, PARAM.DAT, etc, but I thought that would generate a compiler error, not a message about a missing rule. I am not sure why these files need to be included in the compile rule like they are, since they are included in the src, but I don't remember where I got the syntax for this and it's harder to find good information about Fortran make files than other languages.
LMHmedchem
---------- Post updated at 07:44 PM ---------- Previous update was at 07:23 PM ----------
I made the changes in my cygwin make file, and everything worked fine. I need to go back over to linux and see if the problem persists there or not. I'm not sure if I did anything differently this time or not.
Hi,
i am trying to install AMBER10 which is a molecular dynamcis package onto two linux red hat pcs. I can successfully install the tools that comes with which uses gcc to compile, however AMBER10 requires either g95 or gfortran to compile. This is where the issue lies, i have installed both... (0 Replies)
How I can get the current make-file name in a make-file
So, if I run make with specified file:make -f target.mak
is it possible to have the 'target' inside of the that 'target.mak' from the file name? (2 Replies)
Hi!
I have a program in fortran77. This program was compiled with pgf90, but now, I need compiled it with gfortran.
I show a bit of code.
program hello
PARAMETER(a=100)
integer a
write(*,*)'value ', a
end program hello
What's the problem?
Thanks (2 Replies)
Hi !
I have one program made of several sub programs which I am trying to compile with gfortran on Fedora 14 in my system. The program was originally written in Fortran 77 and compilation command used to be -
fort77 -O2 -f -w -o life life_com.f lifetime.f minuit.f tek_life.f utilities.f... (0 Replies)
Hi,
I am trying to run a simple f77 program on gfortran. Program is as follows.
program trial
implicit real*8 (a-h,o-z)
common/var/a(2),b,c(4),d
a=(/0,0/)
b=0
c=(/0,0,0,0/)
d=0
call add(a,b,c,d)
... (1 Reply)
I am a INTEL fortran user recently migrated to linux and installed gfortran on my system.
I run numerical models as part of my research.
my question is on optimization of the fortran code.
I used the - vectorize option to compile for reducing the run time considerably and was happy. But... (1 Reply)
Hello everyone,
I'm trying since a few days to compile a f90 program with gfortran (on Ubuntu) with a makefile. The fortran program calls 2 routines written in C.
Here is my makefile:
FC = gfortran
SFC = gfortran
FFLAGS = -ffree-form -O... (21 Replies)
I have code that works fine in ifort. But when trying to run on gfortran 4.7.1 (which does support quads and has no problem with real * 16) I can't cast an integer variable to a quad precision float (real*16) using something like:
factq(i) = factq(i-1) * qfloat(i)
Finding a list of the new... (2 Replies)
Hello
I am working on a CPP code written for SUN CC 5.5
and make
we used make to compile the code then it compilation went smooth
now i am using gmake:
I have a make file like this
WSROOT=..
include $(WSROOT)/etc/wsmkinclude.common
all:
@for subdir in */Makefile; \
do \... (1 Reply)
Hello
I am working on a CPP code written for SUN CC 5.5
and make
we used make to compile the code then it compilation went smooth
now i am using gmake:
I have a make file like this
WSROOT=..
include $(WSROOT)/etc/wsmkinclude.common
all:
@for subdir in */Makefile; \
do \... (1 Reply)