Updated Makefile with hyprutils

hyprutils is now a submodule of the project which is required by other
Hyprland components.

Removed the targets to install system packages. This is better in a bash
script, but making a Solus container should be considered.
This commit is contained in:
Ethan Smith-Coss 2024-06-18 19:28:34 +01:00
parent 51f172cc6b
commit 3864714a58
Signed by: TheOnePath
GPG Key ID: 1D351CCC6D01F32B

View File

@ -31,9 +31,22 @@ $(__Hypercursor): $(__Hyperlang)
@echo "Installing library hyprcursor..."
sudo $(CMAKE) --install hyprcursor/build
# Build hyprutils if the .hpp file is not installed
__Hyprutils = $(INC_SYSTEM_PATH)/hyprutils.hpp
$(__Hyprutils):
@if [ ! -d hyprutils ]; then\
git submodule init
git submodule update --remote hyprutils;\
fi
$(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 \
2>/dev/null || getconf _NPROCESSORS_CONF`
sudo $(CMAKE) --install hyprutils/build
# Build hyprlang if the .hpp file is not installed
__Hyprlang = $(INC_SYSTEM_PATH)/hyprlang.hpp
$(__Hyprlang):
$(__Hyprlang): $(__Hyprutils)
if [ ! -d hyprlang ]; then
git submodule init
git submodule update --remote hyprlang
@ -84,24 +97,16 @@ $(__Wl_clipboard):
tomlplusplus:
git clone https://github.com/marzer/tomlplusplus.git
__Tomlplusplus = $(INC_SYSTEM_PATH)/toml++
$(__Tomlplusplus):
$(__Tomlplusplus): tomlplusplus
@echo "Building and installing tomlplusplus..."
$(MESON) setup -C tomlplusplus build --buildtype=release
cd tomlplusplus && $(MESON) setup build --buildtype=release
ninja -C tomlplusplus/build
sudo $(MESON) install tomlplusplus/build
.PHONY : deps
deps: $(__Tomlplusplus)
@echo "Installing system dependencies..."
sudo eopkg it -y libcairo-devel file-devel libdrm-devel libglvnd-devel \
libjpeg-turbo-devel librsvg-devel libwebp-devel libzip-devel \
mesalib-devel pam-devel pango-devel waybar wayland-devel \
wayland-protocols-devel wlroots-devel libxkbcommon-devel
sudo $(MESON) install -C tomlplusplus/build
### PHONY targets that a user would run ###
.PHONY : build
build: deps $(__Hyprcursor) $(__Hyprlang) $(__Hyprlock) $(__Hyprpaper) \
$(__Wl-clipboard) $(__Hyprland)
build: $(__Tomlplusplus) $(__Hyprutils) $(__Hyprcursor) $(__Hyprlang) \
$(__Hyprlock) $(__Hyprpaper) $(__Wl-clipboard) $(__Hyprland)
.PHONY : install
install: build