Update Makefile

This commit is contained in:
Gvidas Juknevičius 2024-05-20 12:15:47 +03:00 committed by GitHub
parent c7f448b091
commit 06dae8eb4e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -16,7 +16,7 @@ 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,bin/obj/%.cpp.o,$(cxx_sources)) $(patsubst src/%.c,bin/obj/%.c.o,$(c_sources)) $(LIBS)
all: bin/$(BIN) all: bin/$(BIN) compile_commands.json
@rm -r bin/obj @rm -r bin/obj
keep: bin/$(BIN) keep: bin/$(BIN)
@ -35,3 +35,6 @@ bin/obj/%.cpp.o: */%.cpp
bin/obj/%.c.o: */%.c bin/obj/%.c.o: */%.c
@mkdir -p $(dir $@) @mkdir -p $(dir $@)
$(CC) -c -o $@ $< $(CC_FLAGS) $(CC) -c -o $@ $< $(CC_FLAGS)
compile_commands.json:
compiledb -n make