Update Makefile

This commit is contained in:
ItsDrike 2023-09-29 19:15:54 +02:00
parent 879e7a839a
commit 5351a9d8af
Signed by: ItsDrike
GPG key ID: FA2745890B7048C0

View file

@ -22,6 +22,7 @@ LINK_FLAGS=-shared
.PHONY: clean uninstall clangd .PHONY: clean uninstall clangd
all: all:
$(MAKE) clear
@if ! pkg-config --exists hyprland; then \ @if ! pkg-config --exists hyprland; then \
echo 'Hyprland headers not available. Run `make pluginenv` in the root Hyprland directory.'; \ echo 'Hyprland headers not available. Run `make pluginenv` in the root Hyprland directory.'; \
exit 1; \ exit 1; \
@ -29,16 +30,17 @@ all:
g++ $(LINK_FLAGS) $(COMPILE_FLAGS) $(COMPILE_DEFINES) $(SOURCE_FILES) -o $(PLUGIN_NAME).so g++ $(LINK_FLAGS) $(COMPILE_FLAGS) $(COMPILE_DEFINES) $(SOURCE_FILES) -o $(PLUGIN_NAME).so
install: all install:
$(MAKE) clear $(MAKE) clear
$(MAKE) all
mkdir -p $(INSTALL_LOCATION) mkdir -p $(INSTALL_LOCATION)
cp $(PLUGIN_NAME).so $(INSTALL_LOCATION) cp $(PLUGIN_NAME).so $(INSTALL_LOCATION)
uninstall: uninstall:
rm -rf $(INSTALL_LOCATION) rm -rf $(INSTALL_LOCATION)/$(PLUGIN_NAME).so
clean: clear:
rm ./${PLUGIN_NAME}.so rm -f ./$(PLUGIN_NAME).so
clangd: clangd:
echo "$(COMPILE_FLAGS) $(COMPILE_DEFINES)" | \ echo "$(COMPILE_FLAGS) $(COMPILE_DEFINES)" | \