Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
62 lines (52 loc) · 2.45 KB
/
Copy pathMakefile
File metadata and controls
62 lines (52 loc) · 2.45 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
export CXX := g++
CXXFLAGS := -mavx -mavx2 -g --static-pie -std=c++14 -fmax-errors=100 \
-Wall -Wextra -Weffc++ -Waggressive-loop-optimizations -Wc++0x-compat \
-Wc++11-compat -Wc++14-compat -Wcast-align -Wcast-qual -Wchar-subscripts \
-Wconditionally-supported -Wconversion -Wctor-dtor-privacy -Wempty-body \
-Wfloat-equal -Wformat-nonliteral -Wformat-security -Wformat-signedness \
-Wformat=2 -Winline -Wlarger-than=8192 -Wlogical-op -Wmissing-declarations \
-Wnon-virtual-dtor -Wopenmp-simd -Woverloaded-virtual -Wpacked -Wpointer-arith \
-Wredundant-decls -Wshadow -Wsign-conversion -Wsign-promo \
-Wstack-usage=8192 -Wstrict-null-sentinel -Wstrict-overflow=2 \
-Wsuggest-attribute=noreturn -Wsuggest-final-methods -Wsuggest-final-types \
-Wsuggest-override -Wswitch-default -Wswitch-enum -Wsync-nand -Wundef \
-Wunreachable-code -Wunused -Wuseless-cast -Wvariadic-macros \
-Wno-literal-suffix -Wno-missing-field-initializers -Wno-narrowing \
-Wno-old-style-cast -Wno-varargs -fcheck-new -fsized-deallocation \
-fstack-protector -fstrict-overflow -flto-odr-type-merging \
-fno-omit-frame-pointer -fPIE -fsanitize=address -fsanitize=alignment \
-fsanitize=bool -fsanitize=bounds -fsanitize=enum \
-fsanitize=float-cast-overflow -fsanitize=float-divide-by-zero \
-fsanitize=integer-divide-by-zero -fsanitize=leak \
-fsanitize=nonnull-attribute -fsanitize=null -fsanitize=object-size \
-fsanitize=return -fsanitize=returns-nonnull-attribute -fsanitize=shift \
-fsanitize=signed-integer-overflow -fsanitize=undefined \
-fsanitize=unreachable -fsanitize=vla-bound -fsanitize=vptr -lm -no-pie -fPIC
export DESTDIR := $(CURDIR)/bin
export OBJDIR := $(CURDIR)/obj
TABLES := $(CURDIR)/tables
OUT := $(DESTDIR)/main
.PHONY: all hash list text main
all: hash list text main
hash: | $(DESTDIR) $(OBJDIR) $(TABLES)
@ echo ------ COMPILE hash ------
@ cd $(CURDIR)/src/hash && $(MAKE)
list: | $(DESTDIR) $(OBJDIR) $(TABLES)
@ echo ------ COMPILE list ------
@ cd $(CURDIR)/src/list && $(MAKE)
text: | $(DESTDIR) $(OBJDIR) $(TABLES)
@ echo ------ COMPILE text ------
@ cd $(CURDIR)/src/text && $(MAKE)
main: | $(DESTDIR) $(OBJDIR) $(TABLES)
@ echo ------ COMPILE main ------
@ $(CXX) -c $(CURDIR)/src/main.cpp -o $(OBJDIR)/main.o $(CXXFLAGS)
@ $(CXX) $(OBJDIR)/main.o $(OBJDIR)/hashtable.o $(OBJDIR)/listPtr.o $(OBJDIR)/textProcessing.o -o $(OUT) $(CXXFLAGS)
.PHONY: clean
clean:
rm -r $(DESTDIR) $(OBJDIR)
$(DESTDIR):
@ mkdir $(DESTDIR)
$(OBJDIR):
@ mkdir $(OBJDIR)
$(TABLES):
@ mkdir $(TABLES)