-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
26 lines (18 loc) · 808 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
CC = g++
CFLAGS = -std=c++17 -O2 -ftrapv -fsanitize=undefined -Wall -Werror -Wformat-security -Wignored-qualifiers -Winit-self -Wswitch-default -Wfloat-equal -Wshadow -Wpointer-arith -Wtype-limits -Wempty-body -Wmissing-field-initializers -Wcast-qual -Wwrite-strings -Wuninitialized
LINK_COMPILER_FLAGS = -fsanitize=undefined -g -o
all: server client spm
server: server.o dbms.o
$(CC) $(CFLAGS) $(LINK_COMPILER_FLAGS) $@ $^
client: client.o dbms.o
$(CC) $(CFLAGS) $(LINK_COMPILER_FLAGS) $@ $^
spm: tmp.o dbms.o
$(CC) $(LINK_COMPILER_FLAGS) $@ $^
tmp.o: tmp.cpp dbms.hpp
$(CC) $(CFLAGS) -g -c tmp.cpp dbms.hpp
interpret.o: dbms.hpp
$(CC) $(CFLAGS) -g -c interpret.hpp dbms.hpp
dbms.o: dbms.cpp dbms.hpp
$(CC) $(CFLAGS) -g -c dbms.cpp -o $@
clear:
rm *.o *.gch client server spm