I have two answers to my question about "make" (Does anybody know how to
convince "make" not to try to compile my .mod files with the Modula-to-C
converter?):
>From Tim Prince:
> Typical versions of make require the -r option as well as a
> .SUFFIXES rule and explicit rules such as the .f90.o: one to
> avoid the use of built-in rules. HPUX make nearly always
> required -r even when used with f77. There may be a posix
> standard but most of us don't know what it dictates or where to
> expect deviations.
>From Ted Stern:
> If you use GNU make instead of BSD make, you can specify that both .mod
> and .o files are produced from .f90 files with the same command:
> %.o %.mod: %.f90
> $(F90) $(F90FLAGS) -c $< -o $*.o
> If you want to turn off the %.mod rule completely, just do
> %.mod ::
> With BSD make, do something like
> .SUFFIXES: # clears all default rules
> .SUFFIXES: .o .f90 .c # new suffixes in order of most dependent to least.
> .f90.o:
> your rule
> .c.o:
> your other rule
Since I use GNU make, I tried the first of Ted's suggestions, and it solves
the problem.
f90mkmf should have an option (or interrogate an environment variable) to
decide to generate one or the other of the above.
Thanks for the prompt help from the Fortran community.
Best regards,
Van SNyder
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|