]> Nishi Git Mirror - tewi.git/commitdiff
add install target
authorNishi <nishi@nishi.boats>
Sat, 21 Sep 2024 10:39:17 +0000 (10:39 +0000)
committerNishi <nishi@nishi.boats>
Sat, 21 Sep 2024 10:39:17 +0000 (10:39 +0000)
git-svn-id: file:///raid/svn-personal/tewi/trunk@121 8739d7e6-ffea-ec47-b151-bdff447c6205

Makefile

index 931106aabee1ddd6e08aef46a026a9112e3eced4..1379f31f9b4ff0e784b4a1b215c106f4e646a1ad 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -27,6 +27,13 @@ all: ./Server ./Module ./Manpage
 ./Manpage::
        $(MAKE) -C $@ $(FLAGS)
 
+install: all
+       mkdir -p $(PREFIX)/bin $(PREFIX)/lib/tewi $(PREFIX)/share/man/man5 $(PREFIX)/etc
+       if [ ! -e $(PREFIX)/etc/tewi.conf ]; then cp example.conf $(PREFIX)/etc/tewi.conf ; fi
+       cp ./Server/tewi $(PREFIX)/bin/
+       cp ./Module/*.so $(PREFIX)/lib/tewi/
+       cp ./Manpage/tewi.conf.5 $(PREFIX)/share/man/man5/
+
 format:
        clang-format --verbose -i `find ./Server ./Common ./Module "(" -name "*.c" -or -name "*.h" ")" -and -not -name "strptime.*"` config.h