Install rules IDK

I HATE GIT
This commit is contained in:
LDA 2024-08-06 15:01:27 +02:00
commit a92e3daafa
8 changed files with 79 additions and 35 deletions

View file

@ -10,10 +10,11 @@ VERSION=0.0.0
REPOSITORY=$(shell git remote get-url origin)
# =========================== Compilation Flags ============================
CYTO_INC=/usr/local/include/ # Where Cytoplasm's include path is
CYTO_INC ?=/usr/local/include/ # Where Cytoplasm's include path is
# located.
CYTO_LIB=/usr/local/lib # Where's Cytoplasm's library is
CYTO_LIB ?=/usr/local/lib # Where's Cytoplasm's library is
# located.
PREFIX ?=/usr/local
SOURCE=src
OBJECT=build
@ -53,4 +54,20 @@ $(AYAS)/%.html: $(INCLUDES)/%.h
@mkdir -p $(shell dirname "$@")
tools/out/aya $(AFLAGS) -i $< -o $@
# TODO: a install rule that reads prefix for software packagers?
# Installs everything. Except Ayadocs. Get pranked.
install: binary utils ayadoc install_setup install_parsee install_tools
@echo $(PREFIX)
install_setup:
install -dm755 "$(PREFIX)/bin"
install -dm755 "$(PREFIX)/doc"
install_parsee:
install -Dm755 "$(BINARY)" "$(PREFIX)/bin/$(BINARY)"
TOOLS:=$(shell find 'tools/out' -name '*')
ITOOL:=${subst tools/out/,$(PREFIX)/bin/,$(TOOLS)}
install_tools: $(ITOOL)
$(PREFIX)/bin/%: tools/out/%
install -Dm755 "$<" "$@"