aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile35
1 files changed, 30 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index e1fab61..e3cebcf 100644
--- a/Makefile
+++ b/Makefile
@@ -13,17 +13,42 @@ all: ${BIN}
clean:
rm -f ${BIN} ${OBJ}
-install: all
- for bin in src/* ${BIN} contrib/*; do \
+install-bin: ${BIN}
+ for bin in ${BIN}; do \
install -Dm755 $${bin} ${DESTDIR}${BINDIR}/$${bin##*/}; done
+
+install-src:
+ for bin in src/*; do \
+ install -Dm755 $${bin} ${DESTDIR}${BINDIR}/$${bin##*/}; done
+
+install-contrib:
+ for bin in contrib/*; do \
+ install -Dm755 $${bin} ${DESTDIR}${BINDIR}/$${bin##*/}; done
+
+install-contrib-static:
+ mkdir -p ${DESTDIR}${BINDIR}
+ for bin in contrib/*; do \
+ sed '/\. cpt-lib/r src/cpt-lib' $${bin} | \
+ sed '/\. cpt-lib/d' > ${DESTDIR}${BINDIR}/$${bin##*/}; \
+ chmod 755 ${DESTDIR}${BINDIR}/$${bin##*/}; done
+
+install-src-static:
+ mkdir -p ${DESTDIR}${BINDIR}
+ for bin in src/*; do \
+ sed '/\. cpt-lib/r src/cpt-lib' $${bin} | \
+ sed '/\. cpt-lib/d' > ${DESTDIR}${BINDIR}/$${bin##*/}; \
+ chmod 755 ${DESTDIR}${BINDIR}/$${bin##*/}; done
+
+install-doc:
for man in man/*.1; do install -Dm644 $${man} ${DESTDIR}${MAN1}/$${man##*/}; done
- for doc in doc/*; do install -Dm644 $${doc} ${DESTDIR}${CPTDOC}/$${doc##*/}; done
+
+install: install-bin install-src install-contrib install-doc
+install-static: install-bin install-src-static install-contrib-static install-doc
uninstall:
for bin in ${BIN} src/* contrib/*; do \
rm -f ${DESTDIR}${BINDIR}/$${bin##*/}; done
for man in man/*; do rm -f ${DESTDIR}${MAN1}/$${man##*/}; done
- rm -rf ${DESTDIR}${CPTDOC}
-.PHONY: all install uninstall clean
+.PHONY: all install-bin install-src install-contrib install-doc install-src-static install-contrib-static install uninstall test clean