From 409ef7f74e67e91096a5d0491c92553650e6cea2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gvidas=20Juknevi=C4=8Dius?= Date: Mon, 20 May 2024 09:21:55 +0000 Subject: [PATCH] Update Makefile --- Makefile | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 51ff7e5..26e8159 100644 --- a/Makefile +++ b/Makefile @@ -13,26 +13,26 @@ include lib/make.mk cxx_sources=$(wildcard src/*.cpp) c_sources=$(wildcard src/*.c) -objects=$(patsubst src/%.cpp,bin/obj/%.cpp.o,$(cxx_sources)) $(patsubst src/%.c,bin/obj/%.c.o,$(c_sources)) $(LIBS) +objects=$(patsubst src/%.cpp,build/obj/%.cpp.o,$(cxx_sources)) $(patsubst src/%.c,build/obj/%.c.o,$(c_sources)) $(LIBS) -all: bin/$(BIN) compile_commands.json - @rm -r bin/obj +all: build/$(BIN) compile_commands.json + @rm -r build/obj -keep: bin/$(BIN) +keep: build/$(BIN) clean: - rm -r bin/obj/ + rm -r build/obj/ -bin/$(BIN): $(objects) +build/$(BIN): $(objects) $(LD) -o $@ $^ $(LD_FLAGS) -bin/obj/%.cpp.o: */%.cpp +build/obj/%.cpp.o: */%.cpp @mkdir -p $(dir $@) $(CXX) -c -o $@ $< $(CXX_FLAGS) -bin/obj/%.c.o: */%.c +build/obj/%.c.o: */%.c @mkdir -p $(dir $@) $(CC) -c -o $@ $< $(CC_FLAGS)