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:
parent
51f172cc6b
commit
3864714a58
35
Makefile
35
Makefile
|
|
@ -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
|
||||
|
|
@ -82,26 +95,18 @@ $(__Wl_clipboard):
|
|||
|
||||
# Build and install tomlplusplus if it's not on the system
|
||||
tomlplusplus:
|
||||
git clone https://github.com/marzer/tomlplusplus.git
|
||||
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
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user