Set up compile_commands.json generation
This commit is contained in:
26
Makefile
Normal file
26
Makefile
Normal file
@@ -0,0 +1,26 @@
|
||||
BIN=./dim
|
||||
CC=gcc
|
||||
CCARGS=-Isrc/include -Wall -pedantic
|
||||
|
||||
MODULES= \
|
||||
modules/clock.dim \
|
||||
modules/battery.dim\
|
||||
|
||||
|
||||
all: $(BIN) $(MODULES) compile_commands.json
|
||||
|
||||
$(BIN): src/main.c src/plug.c
|
||||
$(CC) -o $@ $^ $(CCARGS) -lX11 -ldl
|
||||
|
||||
|
||||
modules/%.dim: src/modules/%.c
|
||||
$(CC) -o $@ $^ -rdynamic -shared -fPIC $(CCARGS)
|
||||
|
||||
compile_commands.json:
|
||||
compiledb -n make
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user