-
Notifications
You must be signed in to change notification settings - Fork 20
/
Makefile
50 lines (41 loc) · 937 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Makefile for SLALIB
# for Pentium/Linux
# by Scott M. Ransom
# OS type
OS = Linux
#OS = OSX
# Linux is the first choice
ifeq ($(OS),Linux)
LIBSUFFIX = .so
LIBCMD = -shared
SYSDIR = /usr
LOCDIR = /usr/local
# else assume Darwin (i.e. OSX)
else
LIBSUFFIX = .dylib
LIBCMD = -dynamiclib
SYSDIR = /sw
LOCDIR = /sw
endif
CC = gcc
FC = gfortran
#FC = g77
CFLAGS = -O2 -Wall -W -fPIC
CLINKFLAGS = $(CFLAGS)
FFLAGS = -O2 -fPIC
FLINKFLAGS = $(FFLAGS)
all: slalib
slalib: libsla$(LIBSUFFIX)
$(FC) -o test/sla_test test/sla_test.f -fno-second-underscore -L. -lsla
test/sla_test
libsla$(LIBSUFFIX):
$(FC) $(FFLAGS) -fno-second-underscore -c -I. *.f *.F
$(FC) $(LIBCMD) -o libsla$(LIBSUFFIX) -fno-second-underscore *.o
# Note: a better way to make pyslalib is to use the setup.py file
pyslalib:
f2py -c slalib.pyf -I. *.f *.F
clean:
rm -f *.o *~ *#
rm -rf build
cleaner: clean
rm -f test/sla_test libsla.so slalib.so