2024-05-19 12:58:35 +00:00
|
|
|
BIN=./dim
|
|
|
|
CC=gcc
|
|
|
|
CCARGS=-Isrc/include -Wall -pedantic
|
|
|
|
|
|
|
|
MODULES= \
|
2024-05-30 23:11:05 +00:00
|
|
|
modules/clock.dim \
|
2024-05-31 18:06:32 +00:00
|
|
|
modules/battery.dim \
|
2024-06-16 17:09:24 +00:00
|
|
|
modules/timesince.dim \
|
|
|
|
modules/volume.dim
|
2024-05-19 12:58:35 +00:00
|
|
|
|
|
|
|
|
|
|
|
all: $(BIN) $(MODULES) compile_commands.json
|
|
|
|
|
2024-05-30 23:11:05 +00:00
|
|
|
$(BIN): src/main.c src/plug.c src/socket.c src/util.c
|
2024-05-19 12:58:35 +00:00
|
|
|
$(CC) -o $@ $^ $(CCARGS) -lX11 -ldl
|
|
|
|
|
|
|
|
|
|
|
|
modules/%.dim: src/modules/%.c
|
2024-05-30 19:54:43 +00:00
|
|
|
mkdir -p $(dir $@)
|
2024-06-16 17:09:24 +00:00
|
|
|
$(CC) -o $@ $^ -rdynamic -shared -fPIC $(CCARGS) -lasound
|
2024-05-19 12:58:35 +00:00
|
|
|
|
|
|
|
compile_commands.json:
|
|
|
|
compiledb -n make
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|