mirror of
https://github.com/virtcode/hypr-dynamic-cursors
synced 2025-09-19 16:13:21 +02:00
chore: parallelize build
This commit is contained in:
parent
cb39e89fc3
commit
f2a35be02b
2 changed files with 16 additions and 6 deletions
19
Makefile
19
Makefile
|
@ -1,18 +1,27 @@
|
|||
PLUGIN_NAME=dynamic-cursors
|
||||
|
||||
SOURCE_FILES=$(wildcard ./src/*.cpp ./src/*/*.cpp)
|
||||
SOURCE_FILES := $(wildcard ./src/*.cpp ./src/*/*.cpp)
|
||||
OBJECT_FILES := $(patsubst ./src/%.cpp, out/%.o, $(SOURCE_FILES))
|
||||
CXX_FLAGS := -Wall --no-gnu-unique -fPIC -std=c++26 -g \
|
||||
$(shell pkg-config --cflags hyprland | awk '{print $$NF "/src";}') \
|
||||
$(shell pkg-config --cflags pixman-1 libdrm hyprland)
|
||||
|
||||
OUTPUT=out/$(PLUGIN_NAME).so
|
||||
|
||||
.PHONY: all clean load unload
|
||||
|
||||
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 $(OUTPUT)
|
||||
$(OUTPUT): $(OBJECT_FILES)
|
||||
$(CXX) -shared $^ -o $@
|
||||
|
||||
# Compile step (object file per .cpp)
|
||||
out/%.o: ./src/%.cpp
|
||||
@mkdir -p $(dir $@)
|
||||
$(CXX) $(CXX_FLAGS) -c $< -o $@
|
||||
|
||||
clean:
|
||||
rm -f $(OUTPUT)
|
||||
$(RM) $(OUTPUT) $(OBJECT_FILES)
|
||||
|
||||
load: all unload
|
||||
hyprctl plugin load ${PWD}/$(OUTPUT)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue