0

Currently I am compiling my python libraries using manually the f2py3 command such as fp2py3 -c -m xxx_yyy_lib xxx_yyy_lib_fortran.f.

Do you have any idea if I can compile automatically all my files using a Makefile?

I have tried to used the following one but it is not working

SRCS = $(wildcard *.f)

all:
    f2py3 -c -m $< $(SRCS)
Guuk
  • 505
  • 3
  • 17
  • Can you elaborate on "not working", do you get an error or does it do nothing? I would guess you at least need to indicate that all depends on `SRCS` (although I don't know if the makefile defaults will do this for you) and you probably want to just run f2py3 on a single file at a time rather than all of them (that I think you're doing now). – d_1999 Nov 22 '16 at 18:14
  • @d_1999 I obtain the error `Makefile:4: *** Missing separator. Stop` – Guuk Nov 22 '16 at 18:17
  • @d_1999 I want to run `f2py3` to many `.f` files (around 50 but it changes, and I want to build a Makefile for compiling all this `.f`). If I well understand $(wildcard *.f) should give me the list of all this `.f`files – Guuk Nov 22 '16 at 18:19
  • 1
    Are you sure the fourth line starts with [a tab](http://stackoverflow.com/q/16931770), not spaces? – francescalus Nov 22 '16 at 19:58
  • @francescalus Yes this is my mistake. Thank you. I corrected it but It continues to not work. My command seems to load all files in $SRCS in the same time. In my case I am trying to load it one by one. – Guuk Nov 23 '16 at 14:13

0 Answers0