fortran Makefile
Paul Gilbert
pgilbert@bank-banque-canada.ca
Tue, 3 Feb 1998 15:37:38 -0500
My library uses compiled code which I converted from fortran to C with f2c. I
put copies of the same Makefile in the both dse/src and dse/src-c. (I'm not sure
why, but I niavely assumed the same Makefile might work.) Now, I haven't tried
the fortran version with R. But of course the first person (as far as I know) to
actually try and use the package defaulted to compiling the fortran directly
(using R INSTALL). I assume this is something that gets set by configure, but
I'm not sure. What should be in the Makefile for the fortran, or should I not
have any Makefile in the src directory? The src-c/Makefile is
LIBNAME=dse
LD=ld
OBJS= dsefor.o
all: $(LIBNAME).so message
$(LIBNAME).so: $(OBJS)
$(LD) $(SHLIBLDFLAGS) -o $@ $(OBJS)
clean:
@rm -f *.o *.so
Below is a copy of an email with the errors from the attempted fortran compile,
and a manual way to compile, but I'm not sure how much of that should be done in
the Makefile and how much is done by configure.
Paul Gilbert
___________
Thanks a lot for providing dse for R. I installed it under Linux. The 'usual'
installation fails as your Rdse/dse/src/Makefile uses implicit rules quite a
bit. It calls g77 first as the compiler. However, each of g77 5.0.19, 5.0.20
and 5.0.21 failed on dsefor.f, mostly with errors of the following type:
dsefor.f:283:
SUBROUTINE KFP(EY, HPERR, PREDERR, ERRWT,
1
dsefor.f:1695: (continued):
CALL KFP(F2, HPERR,PREDERR, ERRWT,
2
Argument #18 (named `r') of `kfp' is one type at (2) but is some other type at
(1) [info -f
g77 M GLOBALS]
However, it works fine with a manual
fort77 -c -O2 -fPIC dsefor.f
gcc -shared -o dse.so dsefor.o
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._