-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
44 lines (35 loc) · 2.37 KB
/
makefile
File metadata and controls
44 lines (35 loc) · 2.37 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
CXXFLAGS = -g -std=c++17 -Wall -Wextra -Weffc++ -Wc++0x-compat -Wc++11-compat -Wc++14-compat -Waggressive-loop-optimizations \
-Walloc-zero -Walloca -Walloca-larger-than=8192 -Warray-bounds -Wcast-align -Wcast-qual -Wchar-subscripts \
-Wconditionally-supported -Wconversion -Wctor-dtor-privacy -Wdangling-else -Wduplicated-branches -Wempty-body -Wfloat-equal \
-Wformat-nonliteral -Wformat-security -Wformat-signedness -Wformat=2 -Wformat-overflow=2 -Wformat-truncation=2 -Winline \
-Wlarger-than=8192 -Wvla-larger-than=8192 -Wlogical-op -Wmissing-declarations -Wnon-virtual-dtor -Wopenmp-simd \
-Woverloaded-virtual -Wpacked -Wpointer-arith -Wredundant-decls -Wrestrict -Wshadow -Wsign-promo -Wstack-usage=8192 \
-Wstrict-null-sentinel -Wstrict-overflow=2 -Wstringop-overflow=4 -Wsuggest-attribute=noreturn -Wsuggest-final-types \
-Wsuggest-override -Wswitch-default -Wswitch-enum -Wsync-nand -Wundef -Wunreachable-code -Wunused -Wvariadic-macros \
-Wno-literal-suffix -Wno-missing-field-initializers -Wnarrowing -Wno-old-style-cast -Wvarargs -Waligned-new \
-Walloc-size-larger-than=1073741824 -Walloc-zero -Walloca -Walloca-larger-than=8192 -Wdangling-else \
-Wduplicated-branches -Wformat-overflow=2 -Wformat-truncation=2 -Wmissing-attributes -Wmultistatement-macros -Wrestrict \
-Wshadow=global -Wsuggest-attribute=malloc -fcheck-new -fsized-deallocation -fstack-check -fstrict-overflow \
-flto-odr-type-merging -fno-omit-frame-pointer -Wno-unknown-pragmas
SrcDir = src
IncDir = include
LibDir = libs
BuildDir = build
ExmplsDir = examples
ColorsDir = $(LibDir)/colors
DebugDir = $(LibDir)/debug
HashBuildDir = $(LibDir)/hash/build
HashSrcDir = $(LibDir)/hash/src
HashIncDir = $(LibDir)/hash/include
OBJECTS = $(BuildDir)/main.o $(BuildDir)/stack.o $(HashBuildDir)/hash.o
all: $(OBJECTS)
g++ -I$(IncDir)/.. -I$(LibDir)/.. $(OBJECTS) -o stack.exe
$(BuildDir)/main.o: $(ExmplsDir)/main.cpp $(IncDir)/stack.h $(DebugDir)/debug.h $(IncDir)/settings.h $(ColorsDir)/colors.h
g++ -I$(IncDir)/.. -I$(LibDir)/.. -c $(ExmplsDir)/main.cpp $(CXXFLAGS) -o $(BuildDir)/main.o
$(BuildDir)/stack.o: $(SrcDir)/stack.cpp $(IncDir)/stack.h $(DebugDir)/debug.h $(IncDir)/settings.h $(LibDir)/hash/include/hash.h
g++ -I$(IncDir)/.. -I$(LibDir)/.. -c $(SrcDir)/stack.cpp $(CXXFLAGS) -o $(BuildDir)/stack.o
$(HashBuildDir)/hash.o:
"$(MAKE)" -C "./$(LibDir)/hash/" makefile init all
.PHONY: init
init:
mkdir -p $(BuildDir)