-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile.etl
98 lines (66 loc) · 3.47 KB
/
makefile.etl
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
CC=clang
CFLAGS=-std=c11 -D_XOPEN_SOURCE=600 -fexpensive-optimizations -Wshadow -Winit-self -Wredundant-decls -Wcast-align -Wundef -Wfloat-equal -Winline -Wunreachable-code -Wmissing-declarations -Wmissing-include-dirs -Wswitch-enum -Wswitch-default -Wmain -pedantic-errors -pedantic -w -Wfatal-errors -Wextra -Wall -g3 -O0
ORACLE_DEP= -I/usr/include/oracle/19.6/client64/ -L/usr/lib/oracle/19.6/client64/lib/
MONGODB_DEP=-I/usr/include/libmongoc-1.0/ -I/usr/include/libbson-1.0/
LIBS=-lm -lpthread -lpq -lodbc -lmariadbclient $(ORACLE_DEP) $(MONGODB_DEP) -ldl -lclntsh -lssl -lcrypto -lmongoc-1.0 -lbson-1.0
all: dcpam-etl
db.o: src/db/db.c
$(CC) -c src/db/db.c $(CFLAGS)
postgresql.o: src/db/postgresql.c
$(CC) -c src/db/postgresql.c $(CFLAGS)
mongodb.o: src/db/mongodb.c
$(CC) -c src/db/mongodb.c $(CFLAGS) $(MONGODB_DEP)
mysql.o: src/db/mysql.c
$(CC) -c src/db/mysql.c $(CFLAGS)
mariadb.o: src/db/mariadb.c
$(CC) -c src/db/mariadb.c $(CFLAGS)
odbc.o: src/db/odbc.c
$(CC) -c src/db/odbc.c $(CFLAGS)
oracle.o: src/db/oracle.c
$(CC) -c src/db/oracle.c $(CFLAGS) $(ORACLE_DEP) $(MONGODB_DEP)
sqlite.o: src/db/sqlite.c
$(CC) -c src/db/sqlite.c $(CFLAGS)
dcpam-etl.o: src/DCPAM_ETL/dcpam-etl.c
$(CC) -c src/DCPAM_ETL/dcpam-etl.c $(CFLAGS) $(ORACLE_DEP) $(MONGODB_DEP)
log.o: src/utils/log.c
$(CC) -c src/utils/log.c $(CFLAGS)
worker.o: src/core/db/worker.c
$(CC) -c src/core/db/worker.c $(CFLAGS) $(ORACLE_DEP) $(MONGODB_DEP)
system.o: src/core/db/system.c
$(CC) -c src/core/db/system.c $(CFLAGS) $(ORACLE_DEP) $(MONGODB_DEP)
extract.o: src/core/db/etl/extract.c
$(CC) -c src/core/db/etl/extract.c $(CFLAGS) $(ORACLE_DEP) $(MONGODB_DEP)
stage.o: src/core/db/etl/stage.c
$(CC) -c src/core/db/etl/stage.c $(CFLAGS) $(ORACLE_DEP) $(MONGODB_DEP)
transform.o: src/core/db/etl/transform.c
$(CC) -c src/core/db/etl/transform.c $(CFLAGS) $(ORACLE_DEP) $(MONGODB_DEP)
load.o: src/core/db/etl/load.c
$(CC) -c src/core/db/etl/load.c $(CFLAGS) $(ORACLE_DEP) $(MONGODB_DEP)
client.o: src/core/network/client.c
$(CC) -c src/core/network/client.c $(CFLAGS)
socket_io.o: src/core/network/socket_io.c
$(CC) -c src/core/network/socket_io.c $(CFLAGS)
http.o: src/core/network/http.c
$(CC) -c src/core/network/http.c $(CFLAGS)
csv.o: src/file/csv.c
$(CC) -c src/file/csv.c $(CFLAGS)
json.o: src/file/json.c
$(CC) -c src/file/json.c $(CFLAGS)
preload.o: src/core/file/preload.c
$(CC) -c src/core/file/preload.c $(CFLAGS) $(MONGODB_DEP)
lcs_report.o: src/core/lcs_report.c
$(CC) -c src/core/lcs_report.c $(CFLAGS)
time.o: src/utils/time.c
$(CC) -c src/utils/time.c $(CFLAGS)
filesystem.o: src/utils/filesystem.c
$(CC) -c src/utils/filesystem.c $(CFLAGS)
cJSON.o: src/third-party/cJSON.c
$(CC) -c src/third-party/cJSON.c $(CFLAGS)
sqlite3.o: src/third-party/sqlite3.c
$(CC) -c src/third-party/sqlite3.c $(CFLAGS)
memory.o: src/utils/memory.c
$(CC) -c src/utils/memory.c $(CFLAGS)
strings.o: src/utils/strings.c
$(CC) -c src/utils/strings.c $(CFLAGS)
dcpam-etl: dcpam-etl.o mysql.o mariadb.o odbc.o postgresql.o mongodb.o log.o time.o filesystem.o cJSON.o sqlite3.o memory.o http.o preload.o csv.o json.o db.o worker.o system.o extract.o stage.o transform.o load.o strings.o oracle.o sqlite.o client.o lcs_report.o socket_io.o
$(CC) mysql.o mariadb.o odbc.o postgresql.o mongodb.o dcpam-etl.o log.o time.o filesystem.o cJSON.o sqlite3.o memory.o http.o preload.o csv.o json.o db.o worker.o system.o extract.o stage.o transform.o load.o strings.o oracle.o sqlite.o client.o lcs_report.o socket_io.o -o dcpam-etl $(LIBS)