Updated Makefile
Fixed bugs with targets. Removed all if statements for targets related to git submodules. These are their own targets now.
This commit is contained in:
parent
5ebadd41ca
commit
80e505e834
54
Makefile
54
Makefile
|
|
@ -9,24 +9,22 @@ INC_SYSTEM_PATH=/usr/include
|
|||
default-target: build
|
||||
|
||||
# Build Hyprland if it's not installed on the system
|
||||
Hyprland:
|
||||
git submodule init
|
||||
git submodule update --remote Hyprland
|
||||
__Hyperland = $(BIN_SYSTEM_PATH)/hyprland
|
||||
$(__Hyperland): $(__Hyperlang) $(__Hypercursor)
|
||||
if [ ! -d Hyprland ]; then
|
||||
git submodule init
|
||||
git submodule update --remote Hyprland
|
||||
fi
|
||||
$(MAKE) -C Hyprland all
|
||||
|
||||
# Build hyprcursor if the .hpp file is not installed (required hyprlang)
|
||||
hyprcursor:
|
||||
git submodule init
|
||||
git submodule update --remote hyprcursor
|
||||
__Hypercursor = $(INC_SYSTEM_PATH)/hyprcursor.hpp
|
||||
$(__Hypercursor): $(__Hyperlang)
|
||||
if [ ! -d hyprcursor ]; then
|
||||
git submodule init
|
||||
git submodule update --remote hyprcursor
|
||||
fi
|
||||
$(CMAKE) --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release \
|
||||
-DCMAKE_INSTALL_PREFIX:PATH=/usr -S . -B ./hyprcursor/build
|
||||
$(CMAKE) --build ./build --config Release --target all \
|
||||
-DCMAKE_INSTALL_PREFIX:PATH=/usr -S ./hyprcursor -B ./hyprcursor/build
|
||||
$(CMAKE) --build ./hyprcursor/build --config Release --target all \
|
||||
-j`nproc 2>/dev/null || getconf _NPROCESSORS_CONF`
|
||||
@echo "Installing library hyprcursor..."
|
||||
sudo $(CMAKE) --install hyprcursor/build
|
||||
|
|
@ -44,12 +42,11 @@ $(__Hyprutils): hyprutils
|
|||
sudo $(CMAKE) --install hyprutils/build
|
||||
|
||||
# Build hyprlang if the .hpp file is not installed
|
||||
hyprlang:
|
||||
git submodule init
|
||||
git submodule update --remote hyprlang
|
||||
__Hyprlang = $(INC_SYSTEM_PATH)/hyprlang.hpp
|
||||
$(__Hyprlang): $(__Hyprutils)
|
||||
if [ ! -d hyprlang ]; then
|
||||
git submodule init
|
||||
git submodule update --remote hyprlang
|
||||
fi
|
||||
# built using cmake
|
||||
$(CMAKE) --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release \
|
||||
-DCMAKE_INSTALL_PREFIX:PATH=/usr -S . -B ./hyprlang/build
|
||||
|
|
@ -60,36 +57,34 @@ $(__Hyprlang): $(__Hyprutils)
|
|||
sudo $(CMAKE) --install ./hyprlang/build
|
||||
|
||||
# Build hyprlock if it's not installed on the system
|
||||
hyprlock:
|
||||
git submodule init
|
||||
git submodule update --remote hyprlock
|
||||
__Hyprlock = $(BIN_SYSTEM_PATH)/hyprlock
|
||||
$(__Hyprlock): $(__Hyprlang)
|
||||
if [ ! -d hyprlock ]; then
|
||||
git submodule init
|
||||
git submodule update --remote hyprlock
|
||||
fi
|
||||
$(CMAKE) --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release \
|
||||
-S . -B ./hyprlock/build
|
||||
$(CMAKE) --build ./hyprlock/build --config Release --target hyprlock \
|
||||
-j`nproc 2>/dev/null || getconf _NPROCESSORS_CONF`
|
||||
|
||||
# Build hyprpaper if it's not installed on the system
|
||||
hyprpaper:
|
||||
git submodule init
|
||||
git submodule update --remote hyprpaper
|
||||
__Hyprpaper = $(BIN_SYSTEM_PATH)/hyprpaper
|
||||
hyprpaper: $(__Hyprlang)
|
||||
if [ ! -d hyprpaper ]; then
|
||||
git submodule init
|
||||
git submodule update --remote hyprpaper
|
||||
fi
|
||||
$(CMAKE) --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release \
|
||||
-DCMAKE_INSTALL_PREFIX:PATH=/usr -S . -B ./hyprpaper/build
|
||||
$(CMAKE) --build ./hyprpaper/build --config Release --target hyprpaper \
|
||||
-j`nproc 2>/dev/null || getconf _NPROCESSORS_CONF`
|
||||
|
||||
# Build wl-clipboard if it's not installed on the system
|
||||
wl-clipboard:
|
||||
git submodule init
|
||||
git submodule update --remote wl-clipboard
|
||||
__Wl_clipboard = $(BIN_SYSTEM_PATH)/wl-copy $(BIN_SYSTEM_PATH)/wl-paste
|
||||
$(__Wl_clipboard):
|
||||
if [ ! -d wl-clipboard ]; then
|
||||
git submodule init
|
||||
git submodule update --remote wl-clipboard
|
||||
fi
|
||||
$(MESON) setup -C wl-clipboard build
|
||||
cd wl-clipboard && $(MESON) setup wl-clipboard build
|
||||
ninja -C wl-clipboard/build
|
||||
|
||||
# Build and install tomlplusplus if it's not on the system
|
||||
|
|
@ -98,10 +93,9 @@ tomlplusplus:
|
|||
__Tomlplusplus = $(INC_SYSTEM_PATH)/toml++
|
||||
$(__Tomlplusplus): tomlplusplus
|
||||
@echo "Building and installing tomlplusplus..."
|
||||
cd tomlplusplus && $(MESON) setup build --buildtype=release
|
||||
cd tomlplusplus && $(MESON) setup build --buildtype=release --prefix=/usr
|
||||
ninja -C tomlplusplus/build
|
||||
DESTDIR=$(INC_SYSTEM_PATH)/toml++ \
|
||||
sudo $(MESON) install -C tomlplusplus/build
|
||||
sudo $(MESON) install -C tomlplusplus/build
|
||||
|
||||
### PHONY targets that a user would run ###
|
||||
.PHONY : build
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user