From 0ad0a0e4b7a06f878a2b27cbdded54675e3b3c53 Mon Sep 17 00:00:00 2001 From: Virt <41426325+VirtCode@users.noreply.github.com> Date: Wed, 8 Jan 2025 20:37:27 +0100 Subject: [PATCH] chore: clean up makefile --- .gitignore | 1 + Makefile | 17 ++++++++++------- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index f56a593..923ebc2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ compile_commands.json +compile_commands.events.json out .cache result diff --git a/Makefile b/Makefile index 9e31db4..b20bbae 100644 --- a/Makefile +++ b/Makefile @@ -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)