Skip to content

Commit

Permalink
add install/uninstall
Browse files Browse the repository at this point in the history
  • Loading branch information
vykt committed Oct 7, 2024
1 parent 3e815f6 commit 2654770
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
15 changes: 15 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ TEST_DIR="./src/test"
TGT_DIR="./src/tgt"

BUILD_DIR=$(shell pwd)/build
INSTALL_DIR=/usr/local
DOC_DIR=$(shell pwd)/doc


#[set build options]
Expand All @@ -23,6 +25,19 @@ endif
#[process targets]
all: lib test tgt

install:
> cp ${BUILD_DIR}/lib/liblain.so ${INSTALL_DIR}/lib
> mkdir -pv ${INSTALL_DIR}/share/man
> cp -R ${DOC_DIR}/roff/* ${INSTALL_DIR}/share/man

install_doc:
> mkdir -pv ${INSTALL_DIR}/share/doc/liblain
> cp ${DOC_DIR}/md/* ${INSTALL_DIR}/share/doc/liblain

uninstall:
> rm ${INSTALL_DIR}/lib/liblain.so ${INSTALL_DIR}/share/man/man3/liblain_* ${INSTALL_DIR}/share/doc/liblain/*
> rmdir ${INSTALL_DIR}/share/doc/liblain

tgt:
> $(MAKE) -C ${TGT_DIR} tgt CC='${CC}' BUILD_DIR='${BUILD_DIR}'

Expand Down
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,12 @@ Install:

Install additional markdown documentation:
```
# make install_docs
# make install_doc
```

To uninstall:
```
# make uninstall
```

---
Expand Down

0 comments on commit 2654770

Please sign in to comment.