-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
26 lines (20 loc) · 829 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Variables
CFLAGS := -g -Wall -Wextra -Werror -std=c17
CC := clang
FILES := src/main.c src/window.c src/log.c src/config.c src/message.c
FORMAT_STYLE := "{BasedOnStyle: llvm, IndentWidth: 4, ColumnLimit: 200}"
OUTPUT := bow
# Get pkg-config flags
GTK4_LAYER_SHELL_CFLAGS := $(shell pkg-config --cflags gtk4-layer-shell-0)
GTK4_CFLAGS := $(shell pkg-config --cflags gtk4)
GTK4_LAYER_SHELL_LIBS := $(shell pkg-config --libs gtk4-layer-shell-0)
GTK4_LIBS := $(shell pkg-config --libs gtk4)
# Targets
.PHONY: all format clean
all: format $(OUTPUT)
format:
clang-format -i $(FILES) --style=$(FORMAT_STYLE)
$(OUTPUT): $(FILES)
$(CC) $(CFLAGS) $(GTK4_LAYER_SHELL_CFLAGS) $(GTK4_CFLAGS) -o $(OUTPUT) $(FILES) $(GTK4_LAYER_SHELL_LIBS) $(GTK4_LIBS)
clean:
rm -f $(OUTPUT)