Introduction
Introduction Statistics Contact Development Disclaimer Help
Makefile improvements, remove LIBOBJ which wasnt used - smu - smu - simple mark…
git clone git://git.codemadness.org/smu
Log
Files
Refs
README
LICENSE
---
commit 5573f301eb9eb97b251ff499ddca138417dcf43c
parent 79ae7cc136a53cc6fa0dfcce6adfd9351e028f0c
Author: Hiltjo Posthuma <[email protected]>
Date: Thu, 13 May 2021 14:21:01 +0200
Makefile improvements, remove LIBOBJ which wasnt used
Diffstat:
M Makefile | 41 +++++++++++++++++------------…
1 file changed, 23 insertions(+), 18 deletions(-)
---
diff --git a/Makefile b/Makefile
@@ -1,3 +1,6 @@
+.POSIX:
+
+NAME = smu
VERSION = 1.5
# paths
@@ -8,39 +11,41 @@ MANPREFIX = ${PREFIX}/share/man
SMU_CFLAGS = -DVERSION=\"${VERSION}\" ${CFLAGS}
SMU_LDFLAGS = ${LDFLAGS}
-SRC = smu.c
-OBJ = ${SRC:.c=.o}
+SRC = ${NAME}.c
+OBJ = ${SRC:.c=.o}
+BIN = ${NAME}
+MAN1 = ${NAME}.1
-all: smu
+all: ${BIN}
.c.o:
${CC} -c ${SMU_CFLAGS} $<
${OBJ}:
-smu: ${OBJ}
+${BIN}: ${OBJ}
${CC} -o $@ ${OBJ} ${SMU_LDFLAGS}
clean:
- rm -f smu ${OBJ} ${LIBOBJ} smu-${VERSION}.tar.gz
+ rm -f ${BIN} ${OBJ} "${NAME}-${VERSION}.tar.gz"
dist: clean
- mkdir -p smu-${VERSION}
- cp -R LICENSE README testdoc Makefile smu.1 ${SRC} smu-${VERSION}
- tar -cf smu-${VERSION}.tar smu-${VERSION}
- gzip smu-${VERSION}.tar
- rm -rf smu-${VERSION}
+ mkdir -p "${NAME}-${VERSION}"
+ cp -R LICENSE README testdoc Makefile ${MAN1} ${SRC} "${NAME}-${VERSIO…
+ tar -cf - "${NAME}-${VERSION}" | \
+ gzip -c > "${NAME}-${VERSION}.tar.gz"
+ rm -rf "${NAME}-${VERSION}"
install: all
- mkdir -p ${DESTDIR}${PREFIX}/bin
- cp -f smu ${DESTDIR}${PREFIX}/bin
- chmod 755 ${DESTDIR}${PREFIX}/bin/smu
- mkdir -p ${DESTDIR}${MANPREFIX}/man1
- sed "s/VERSION/${VERSION}/g" < smu.1 > ${DESTDIR}${MANPREFIX}/man1/smu…
- chmod 644 ${DESTDIR}${MANPREFIX}/man1/smu.1
+ mkdir -p "${DESTDIR}${PREFIX}/bin"
+ cp -f ${BIN} "${DESTDIR}${PREFIX}/bin"
+ chmod 755 "${DESTDIR}${PREFIX}/bin/${BIN}"
+ mkdir -p "${DESTDIR}${MANPREFIX}/man1"
+ cp -f ${MAN1} "${DESTDIR}${MANPREFIX}/man1"
+ chmod 644 "${DESTDIR}${MANPREFIX}/man1/${MAN1}"
uninstall:
- rm -f ${DESTDIR}${PREFIX}/bin/smu \
- ${DESTDIR}${MANPREFIX}/man1/smu.1
+ rm -f "${DESTDIR}${PREFIX}/bin/${BIN}" \
+ "${DESTDIR}${MANPREFIX}/man1/${MAN1}"
.PHONY: all clean dist install uninstall
You are viewing proxied material from codemadness.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.