Update pretty much everything so that it compiles
Also update the script so that it uses the correct executable
This commit is contained in:
16
makefile
16
makefile
@@ -1,12 +1,12 @@
|
||||
# Flag para alterar o padrão do compilador
|
||||
standart = -std=c++11
|
||||
standart = -std=c++17
|
||||
|
||||
# Flags para otimizar o arquivo executável
|
||||
optimize_flags = -O3 -pipe -flto
|
||||
|
||||
# Flags para ativar todos os avisos do compilador
|
||||
warnings = -Wall -Wextra -Werror -Wshadow -Wformat=2 \
|
||||
-Wformat-overflow=2 -Wundef -Wconversion -fanalyzer -Wwrite-strings
|
||||
warnings = -Wall -Wextra -Werror -Wformat=2 -Wno-maybe-uninitialized \
|
||||
-Wformat-overflow=2 -Wundef -Wconversion -Wwrite-strings
|
||||
|
||||
# Flags para depurar o código
|
||||
sanitize = -fsanitize=address,undefined,pointer-compare,pointer-subtract
|
||||
@@ -21,17 +21,17 @@ objectdir = $(builddir)/$(objectname)
|
||||
|
||||
.PHONY: all debug
|
||||
|
||||
all:set_flags compile
|
||||
all:set_flags $(objectdir)
|
||||
|
||||
debug:set_debug_flags compile
|
||||
debug:set_debug_flags $(objectdir)
|
||||
|
||||
compile:random.o sa.o
|
||||
$(objectdir):$(builddir)/random.o $(builddir)/sa.o src/main.cpp
|
||||
$(CXX) $(CPPFLAGS) $(builddir)/random.o $(builddir)/sa.o src/main.cpp -o $(objectdir)
|
||||
|
||||
random.o:
|
||||
$(builddir)/random.o:src/random.cpp
|
||||
$(CXX) $(CPPFLAGS) src/random.cpp -o $(builddir)/random.o -c
|
||||
|
||||
sa.o:
|
||||
$(builddir)/sa.o:src/sa.cpp
|
||||
$(CXX) $(CPPFLAGS) src/sa.cpp -o $(builddir)/sa.o -c
|
||||
|
||||
set_flags:
|
||||
|
||||
Reference in New Issue
Block a user