Updated Makefile

Fixed bug with hyprutils and made the git commands their own target. Changed how tomlplusplus is installed.
This commit is contained in:
Ethan Smith-Coss 2024-06-18 19:48:19 +01:00
parent 4e83c6f8e1
commit 5ebadd41ca
Signed by: TheOnePath
GPG Key ID: 1D351CCC6D01F32B

View File

@ -32,12 +32,11 @@ $(__Hypercursor): $(__Hyperlang)
sudo $(CMAKE) --install hyprcursor/build
# Build hyprutils if the .hpp file is not installed
hyprutils:
git submodule init
git submodule update --remote hyprutils
__Hyprutils = $(INC_SYSTEM_PATH)/hyprutils.hpp
$(__Hyprutils):
@if [ ! -d hyprutils ]; then\
git submodule init
git submodule update --remote hyprutils;\
fi
$(__Hyprutils): hyprutils
$(CMAKE) --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release \
-DCMAKE_INSTALL_PREFIX:PATH=/usr -S hyprutils -B ./hyprutils/build
$(CMAKE) --build ./hyprutils/build --config Release --target all -j`nproc \
@ -101,7 +100,8 @@ $(__Tomlplusplus): tomlplusplus
@echo "Building and installing tomlplusplus..."
cd tomlplusplus && $(MESON) setup build --buildtype=release
ninja -C tomlplusplus/build
sudo $(MESON) install -C tomlplusplus/build
DESTDIR=$(INC_SYSTEM_PATH)/toml++ \
sudo $(MESON) install -C tomlplusplus/build
### PHONY targets that a user would run ###
.PHONY : build