revert f5a8420025f9e5796e795b3b83e5a984c97cee10
revert Merge pull request 'Receba Makefile' (#10) from dnk-general into master Deu bosta, makefile só funciona no Linux por enquanto, outro dia a gente arruma pra funcionar nos 2 OS's
This commit is contained in:
parent
f5a8420025
commit
46d3a584b4
26
makefile
26
makefile
@ -12,22 +12,11 @@ warnings = -Wall -Wextra -Werror -Wformat=2 -Wno-maybe-uninitialized \
|
||||
sanitize = -fsanitize=address,undefined,pointer-compare,pointer-subtract
|
||||
debug_flags = -ggdb3 -Og -DDEBUG -Wformat-truncation=2 $(sanitize)
|
||||
|
||||
ifeq ($(OS),Windows_NT)
|
||||
CC := gcc
|
||||
CXX := g++
|
||||
else
|
||||
CC := /usr/bin/gcc
|
||||
CXX := /usr/bin/g++
|
||||
endif
|
||||
CC := /usr/bin/gcc
|
||||
CXX := /usr/bin/g++
|
||||
|
||||
builddir := build
|
||||
ifeq ($(OS),Windows_NT)
|
||||
objectname = sabp.exe
|
||||
makebuilddircmd = mkdir $(builddir)
|
||||
else
|
||||
objectname = sabp
|
||||
makebuilddircmd = mkdir -p $(builddir)
|
||||
endif
|
||||
objectname = sabp
|
||||
objectdir = $(builddir)/$(objectname)
|
||||
|
||||
.PHONY: all debug
|
||||
@ -36,7 +25,7 @@ all:set_flags $(objectdir)
|
||||
|
||||
debug:set_debug_flags $(objectdir)
|
||||
|
||||
$(objectdir):$(builddir) $(builddir)/random.o $(builddir)/sa.o src/main.cpp
|
||||
$(objectdir):$(builddir)/random.o $(builddir)/sa.o src/main.cpp
|
||||
$(CXX) $(CPPFLAGS) $(builddir)/random.o $(builddir)/sa.o src/main.cpp -o $(objectdir)
|
||||
|
||||
$(builddir)/random.o:src/random.cpp
|
||||
@ -45,9 +34,6 @@ $(builddir)/random.o:src/random.cpp
|
||||
$(builddir)/sa.o:src/sa.cpp
|
||||
$(CXX) $(CPPFLAGS) src/sa.cpp -o $(builddir)/sa.o -c
|
||||
|
||||
$(builddir):
|
||||
$(makebuilddircmd)
|
||||
|
||||
set_flags:
|
||||
$(eval override CPPFLAGS += $(warnings) $(optimize_flags) $(standart))
|
||||
|
||||
@ -55,8 +41,4 @@ set_debug_flags:
|
||||
$(eval override CPPFLAGS += $(warnings) $(sanitize) $(debug_flags))
|
||||
|
||||
clean:
|
||||
ifeq ($(OS),Windows_NT)
|
||||
RMDIR "$(builddir)" /S /Q
|
||||
else
|
||||
rm -rf $(builddir)
|
||||
endif
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user