From 6bab964dd5ede57b5b7205531b1c7312f8b4babb Mon Sep 17 00:00:00 2001 From: Daneck1988 Date: Wed, 16 Oct 2024 00:02:15 -0300 Subject: [PATCH] Added build directory recipe --- makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/makefile b/makefile index ee3f0a5..8512a70 100644 --- a/makefile +++ b/makefile @@ -25,7 +25,7 @@ all:set_flags $(objectdir) debug:set_debug_flags $(objectdir) -$(objectdir):$(builddir)/random.o $(builddir)/sa.o src/main.cpp +$(objectdir):$(builddir) $(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 @@ -34,6 +34,9 @@ $(builddir)/random.o:src/random.cpp $(builddir)/sa.o:src/sa.cpp $(CXX) $(CPPFLAGS) src/sa.cpp -o $(builddir)/sa.o -c +$(builddir): + mkdir -p $(builddir) + set_flags: $(eval override CPPFLAGS += $(warnings) $(optimize_flags) $(standart))