arrghb2012/fortran90 — pull request #1 by certik (2012-12-28 01:02:08+00:00)
Title: Makefiles

This PR adds a Makefile and a test script. It also fixes the compilation problem.

Modify the path to python and numpy on the line 21 of the `Makefile`. Compile:
```
Qsnake: ondrej@hawk:~/repos/fortran90_question/fcython_mesh(makefiles)$ make
gfortran -Wall -std=f2008 -Wextra -Wimplicit-interface -fPIC -g -fcheck=all -c types.f90
gfortran -Wall -std=f2008 -Wextra -Wimplicit-interface -fPIC -g -fcheck=all -c utils.f90
gfortran -Wall -std=f2008 -Wextra -Wimplicit-interface -fPIC -g -fcheck=all -c fmesh.f90
gfortran -Wall -std=f2008 -Wextra -Wimplicit-interface -fPIC -g -fcheck=all -c fmesh_wrapper.f90
cython fcython.pyx
gcc -Wall -fPIC -I/home/ondrej/repos/qsnake/local/include/python2.6 -I/home/ondrej/repos/qsnake/local/lib/python2.6/site-packages/numpy/core/include -c fcython.c
/home/ondrej/repos/qsnake/local/lib/python2.6/site-packages/numpy/core/include/numpy/__multiarray_api.h:1527:1: warning: ‘_import_array’ defined but not used [-Wunused-function]
/home/ondrej/repos/qsnake/local/lib/python2.6/site-packages/numpy/core/include/numpy/__ufunc_api.h:226:1: warning: ‘_import_umath’ defined but not used [-Wunused-function]
gfortran -shared -o fcython.so fmesh_wrapper.o fcython.o fmesh.o utils.o types.o -lpython2.6
```

and test:
```
Qsnake: ondrej@hawk:~/repos/fortran90_question/fcython_mesh(makefiles)$ python test_fcython.py
[ 0. 0.06859414 0.28550784 0.97144922 3.14058629 10. ]
```