Update Makefile
This commit is contained in:
parent
c7f448b091
commit
06dae8eb4e
5
Makefile
5
Makefile
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user