-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
50 lines (36 loc) · 1.03 KB
/
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
# vim: noexpandtab: tabstop=4:
FLIBS=flibs-0.9/flibs/src
LIBSQLITE3=$(shell find /usr -name libsqlite3.a -print -quit)
FORTRAN=gfortran
FORTRANFLAGS=-ldl -lfcgi -pthread -Wl,-rpath -Wl,/usr/lib
ifndef $(LIBSQLITE3)
FORTRANFLAGS=-ldl -lfcgi -lsqlite3 -pthread -Wl,-rpath -Wl,/usr/lib
endif
OBJECTS = \
rotm.o \
jade.o \
string_helpers.o \
fsqlite.o \
cgi_protocol.o \
fcgi_protocol.o \
csqlite.o
fortran_fcgi: fortran_fcgi.f90 $(OBJECTS)
$(FORTRAN) -o $@ $^ $(LIBSQLITE3) $(FORTRANFLAGS)
rotm.o: rotm.f90 string_helpers.o fsqlite.o
$(FORTRAN) -c $<
jade.o: jade.f90 string_helpers.o
$(FORTRAN) -c $<
string_helpers.o: string_helpers.f90
$(FORTRAN) -c $<
fsqlite.o: $(FLIBS)/sqlite/fsqlite.f90
$(FORTRAN) -c $<
cgi_protocol.o: $(FLIBS)/cgi/cgi_protocol.f90
$(FORTRAN) -c $<
fcgi_protocol.o: $(FLIBS)/cgi/fcgi_protocol.f90
$(FORTRAN) -c $<
csqlite.o: $(FLIBS)/sqlite/csqlite.c
cd $(FLIBS)/sqlite && make csqlite.o >/dev/null
cp $(FLIBS)/sqlite/csqlite.o .
clean:
rm -f -v fortran_fcgi *.o *.mod $(FLIBS)/sqlite/*.o
.PHONY: clean