-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
147 lines (112 loc) · 5.12 KB
/
Makefile
File metadata and controls
147 lines (112 loc) · 5.12 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
FORTRAN = egfortran
FCFLAGS = -ggdb -c -J${MODDIR}
BINDIR = ./bin
CGIDIR = ./cgi
DBDIR = ${WEBDIR}/cgi-data
LIBDIR = ./libs
LOGDIR = /var/log
OBJDIR = ./objs
MODDIR = ./mods
WEBDIR = /var/www
OBJFILES = ${OBJDIR}/student_m.o \
${OBJDIR}/api_errors.o ${OBJDIR}/http_response_m.o \
${OBJDIR}/http_response_codes.o \
${OBJDIR}/student_collection_m.o \
${OBJDIR}/persistent_collection_m.o \
${OBJDIR}/http_content_types.o \
${OBJDIR}/xml_payload_m.o ${OBJDIR}/json_payload_m.o \
${OBJDIR}/student_json_m.o ${OBJDIR}/student_xml_m.o \
${OBJDIR}/http_request_m.o ${OBJDIR}/url_helper.o \
${OBJDIR}/string_utils.o ${OBJDIR}/json_parser_m.o \
${OBJDIR}/object_parser_m.o ${OBJDIR}/xml_parser_m.o \
${OBJDIR}/attribute_value_pair_m.o ${OBJDIR}/session_m.o \
${OBJDIR}/persistent_object_m.o ${OBJDIR}/log_file_m.o \
${OBJDIR}/api_m.o
${CGIDIR}/api.cgi: ${LIBDIR}/libfsqlite.a ${OBJFILES} main.f90
${FORTRAN} -J${MODDIR} -o ${CGIDIR}/api.cgi main.f90 ${OBJFILES} \
-L/usr/lib -lsqlite3 -L${LIBDIR} -lfsqlite
${OBJDIR}/api_m.o: api_m.f90
${FORTRAN} ${FCFLAGS} -o ${OBJDIR}/api_m.o api_m.f90
${OBJDIR}/api_errors.o: api_errors.f90 ${OBJDIR}/http_response_m.o
${FORTRAN} ${FCFLAGS} -o ${OBJDIR}/api_errors.o api_errors.f90
${OBJDIR}/log_file_m.o: log_file_m.f90
${FORTRAN} ${FCFLAGS} -o ${OBJDIR}/log_file_m.o log_file_m.f90
${OBJDIR}/session_m.o: ${OBJDIR}/http_request_m.o ${OBJDIR}/http_response_m.o \
session_m.f90
${FORTRAN} ${FCFLAGS} -o ${OBJDIR}/session_m.o session_m.f90
${OBJDIR}/string_utils.o: string_utils.f90
${FORTRAN} ${FCFLAGS} -o ${OBJDIR}/string_utils.o string_utils.f90
${OBJDIR}/attribute_value_pair_m.o: attribute_value_pair_m.f90
${FORTRAN} ${FCFLAGS} -o ${OBJDIR}/attribute_value_pair_m.o \
attribute_value_pair_m.f90
${OBJDIR}/url_helper.o: ${OBJDIR}/attribute_value_pair_m.o url_helper.f90
${FORTRAN} ${FCFLAGS} -o ${OBJDIR}/url_helper.o url_helper.f90
${OBJDIR}/student_collection_m.o: ${OBJDIR}/student_m.o \
${OBJDIR}/persistent_collection_m.o \
student_collection_m.f90
$(FORTRAN) $(FCFLAGS) -o ${OBJDIR}/student_collection_m.o \
student_collection_m.f90
${OBJDIR}/persistent_collection_m.o: persistent_collection_m.f90
$(FORTRAN) $(FCFLAGS) -o ${OBJDIR}/persistent_collection_m.o \
persistent_collection_m.f90
${OBJDIR}/persistent_object_m.o: ${OBJDIR}/attribute_value_pair_m.o \
persistent_object_m.f90
${FORTRAN} ${FCFLAGS} -o ${OBJDIR}/persistent_object_m.o \
persistent_object_m.f90
${OBJDIR}/student_m.o: ${OBJDIR}/log_file_m.o ${OBJDIR}/persistent_object_m.o \
student_m.f90
${FORTRAN} ${FCFLAGS} -o ${OBJDIR}/student_m.o student_m.f90
${OBJDIR}/http_request_m.o: ${OBJDIR}/url_helper.o \
${OBJDIR}/string_utils.o http_request_m.f90
${FORTRAN} ${FCFLAGS} -o ${OBJDIR}/http_request_m.o http_request_m.f90
${OBJDIR}/http_response_m.o: http_response_m.f90 \
${OBJDIR}/http_response_codes.o \
${OBJDIR}/persistent_collection_m.o \
${OBJDIR}/http_content_types.o
${FORTRAN} ${FCFLAGS} -o ${OBJDIR}/http_response_m.o http_response_m.f90
${OBJDIR}/xml_payload_m.o: ${OBJDIR}/http_response_m.o xml_payload_m.f90
${FORTRAN} ${FCFLAGS} -o ${OBJDIR}/xml_payload_m.o xml_payload_m.f90
${OBJDIR}/json_payload_m.o: ${OBJDIR}/http_response_m.o json_payload_m.f90
${FORTRAN} ${FCFLAGS} -o ${OBJDIR}/json_payload_m.o json_payload_m.f90
${OBJDIR}/student_json_m.o: ${OBJDIR}/json_payload_m.o \
${OBJDIR}/student_collection_m.o student_json_m.f90
${FORTRAN} ${FCFLAGS} -o ${OBJDIR}/student_json_m.o student_json_m.f90
${OBJDIR}/student_xml_m.o: ${OBJDIR}/xml_payload_m.o \
${OBJDIR}/student_collection_m.o student_xml_m.f90
${FORTRAN} ${FCFLAGS} -o ${OBJDIR}/student_xml_m.o student_xml_m.f90
${OBJDIR}/http_response_codes.o: http_response_codes.f90
${FORTRAN} ${FCFLAGS} -o ${OBJDIR}/http_response_codes.o \
http_response_codes.f90
${OBJDIR}/http_content_types.o: http_content_types.f90
${FORTRAN} ${FCFLAGS} -o ${OBJDIR}/http_content_types.o \
http_content_types.f90
${OBJDIR}/object_parser_m.o: object_parser_m.f90
${FORTRAN} ${FCFLAGS} -o ${OBJDIR}/object_parser_m.o \
object_parser_m.f90
${OBJDIR}/json_parser_m.o: ${OBJDIR}/object_parser_m.o json_parser_m.f90
${FORTRAN} ${FCFLAGS} -o ${OBJDIR}/json_parser_m.o json_parser_m.f90
${OBJDIR}/xml_parser_m.o: ${OBJDIR}/object_parser_m.o xml_parser_m.f90
${FORTRAN} ${FCFLAGS} -o ${OBJDIR}/xml_parser_m.o xml_parser_m.f90
${LIBDIR}/libfsqlite.a: ${OBJDIR}/csqlite.o ${OBJDIR}/fsqlite.o
ar r ${LIBDIR}/libfsqlite.a ${OBJDIR}/fsqlite.o ${OBJDIR}/csqlite.o
${OBJDIR}/csqlite.o: csqlite.c
gcc -c -DLOWERCASE -I/usr/local/include -o ${OBJDIR}/csqlite.o csqlite.c
${OBJDIR}/fsqlite.o: fsqlite.f90
${FORTRAN} ${FCFLAGS} -o ${OBJDIR}/fsqlite.o fsqlite.f90
${LOGDIR}/fabs.log:
doas touch ${LOGDIR}/fabs.log
doas chown www ${LOGDIR}/fabs.log
doas chmod 644 ${LOGDIR}/fabs.log
${DBDIR}:
doas mkdir ${DBDIR}
doas chown www ${DBDIR}
doas chmod 755 ${DBDIR}
.PHONY: clean deploy schema
clean:
rm ${OBJDIR}/*.o ${MODDIR}/*.mod ${LIBDIR}/libfsqlite.a cgi/api.cgi
schema:
/bin/sh ${BINDIR}/schema.sh
deploy: ${DBDIR} ${LOGDIR}/fabs.log ${CGIDIR}/api.cgi
doas /bin/sh ${BINDIR}/deploy.sh
debug: ${CGIDIR}/api.cgi
doas /bin/sh ${BINDIR}/deploy_debug.sh