chore: clean up makefile

This commit is contained in:
Virt 2025-01-08 20:37:27 +01:00
commit 0ad0a0e4b7
2 changed files with 11 additions and 7 deletions

View file

@ -1,18 +1,21 @@
PLUGIN_NAME=dynamic-cursors
SOURCE_FILES=$(wildcard ./src/*.cpp ./src/*/*.cpp)
OUTPUT=out/$(PLUGIN_NAME).so
all: $(PLUGIN_NAME).so
.PHONY: all clean load unload
$(PLUGIN_NAME).so: $(SOURCE_FILES)
all: $(OUTPUT)
$(OUTPUT): $(SOURCE_FILES)
mkdir -p out
$(CXX) -shared -Wall --no-gnu-unique -fPIC $(SOURCE_FILES) -g `pkg-config --cflags hyprland | awk '{print $$NF "/src";}'` `pkg-config --cflags pixman-1 libdrm hyprland` -std=c++26 -o out/$(PLUGIN_NAME).so
$(CXX) -shared -Wall --no-gnu-unique -fPIC $(SOURCE_FILES) -g `pkg-config --cflags hyprland | awk '{print $$NF "/src";}'` `pkg-config --cflags pixman-1 libdrm hyprland` -std=c++26 -o $(OUTPUT)
clean:
rm -f out/$(PLUGIN_NAME).so
rm -f compile_commands.json
rm -f $(OUTPUT)
load: all unload
hyprctl plugin load ${PWD}/out/$(PLUGIN_NAME).so
hyprctl plugin load ${PWD}/$(OUTPUT)
unload:
hyprctl plugin unload ${PWD}/out/$(PLUGIN_NAME).so
hyprctl plugin unload ${PWD}/$(OUTPUT)