diff options
| author | Mitja Felicijan <mitja.felicijan@gmail.com> | 2026-01-24 17:17:21 +0100 |
|---|---|---|
| committer | Mitja Felicijan <mitja.felicijan@gmail.com> | 2026-01-24 17:17:21 +0100 |
| commit | 288f12d36843b6e404adb35857fcd87943e63944 (patch) | |
| tree | 50f58dc9c6c1e8240707d9349876d465d3fb75d8 /Makefile | |
| download | glitch-288f12d36843b6e404adb35857fcd87943e63944.tar.gz | |
Engage!
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..6bd69ad --- /dev/null +++ b/Makefile @@ -0,0 +1,31 @@ +CC ?= clang +CFLAGS := -std=c99 -pedantic -Wall -Wextra -Wunused -Wswitch-enum +INCLUDES := $(shell pkg-config --cflags xft) +LDFLAGS := $(shell pkg-config --libs x11 xft) -lpthread +DESTDIR ?= /usr/local +DISPLAY_NUM := 69 + +ifdef DEBUG + CFLAGS += -ggdb -DDEBUG +endif + +ifdef OPTIMIZE + CFLAGS += -O$(OPTIMIZE) +endif + +all: glitch + +glitch: main.c logging.c manager.c widgets.c switcher.c + $(CC) $(CFLAGS) $(INCLUDES) -o $@ $^ $(LDFLAGS) + +config.h: + [ -f config.h ] || cp config.def.h config.h + +install: all + install -Dm755 glitch $(DESTDIR)/usr/local/bin/glitch + +clean: + rm -f glitch + +virt: + Xephyr -br -ac -noreset -no-host-grab -sw-cursor -screen 1000x1000 :$(DISPLAY_NUM) |
