From 34d254463a4b0977f5700ee43b94931885802bcf Mon Sep 17 00:00:00 2001 From: "me@ow.nekobit.net" Date: Mon, 4 Apr 2022 14:54:16 +0000 Subject: [PATCH] Install FossilOrigin-Name: 7929b289d332d34e8f55db0b721b70a72791a8b85458e9f05535bcf9f6bd8630 --- .gitignore | 3 ++- Makefile | 11 +++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 4be4109..3983865 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,5 @@ filec **/*.o **/*.chtml mastodont-c -config.h \ No newline at end of file +config.h +treebird \ No newline at end of file diff --git a/Makefile b/Makefile index 205487a..a2e6a2f 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,8 @@ PAGES_DIR = static PAGES = $(wildcard $(PAGES_DIR)/*.html) PAGES_CMP = $(patsubst %.html,%.chtml,$(PAGES)) DIST = dist/ -TARGET = treebird.cgi +PREFIX ?= /usr/local +TARGET = treebird MASTODONT_URL = https://git.nekobit.net/repos/mastodont-c.git @@ -19,7 +20,7 @@ all: $(MASTODONT_DIR) dep_build $(TARGET) apache: all apache_start $(TARGET): filec $(PAGES_CMP) $(OBJ) $(HEADERS) - $(CC) -o $(DIST)$(TARGET) $(OBJ) $(LDFLAGS) + $(CC) -o $(TARGET) $(OBJ) $(LDFLAGS) filec: src/file-to-c/main.o $(CC) -o filec $< @@ -87,8 +88,10 @@ $(MASTODONT_DIR): git clone $(MASTODONT_URL) || true @echo -e "\033[38;5;13mRun 'make update' to update mastodont-c\033[0m" -install: - @echo "lol" +install: $(TARGET) + install -m 655 treebird $(PREFIX)/bin/ + install -d $(PREFIX)/share/treebird/ + cp -r dist/ $(PREFIX)/share/treebird/ apache_start: ./scripts/fcgistarter.sh