Introduction
Introduction Statistics Contact Development Disclaimer Help
tAdd preliminary man page and (un)install targets - filmtools - various tools f…
git clone git://src.adamsgaard.dk/filmtools
Log
Files
Refs
---
commit c8dd9b0bf1a070796343b7c4f0336be30609ee9f
parent 925ca743c9d9b8cad49b4dcfb36a93893f5c666c
Author: Anders Damsgaard <[email protected]>
Date: Sun, 12 Jan 2020 10:15:33 +0100
Add preliminary man page and (un)install targets
Diffstat:
M Makefile | 22 ++++++++++++++++++----
A config.mk | 16 ++++++++++++++++
A timeadj.1 | 15 +++++++++++++++
3 files changed, 49 insertions(+), 4 deletions(-)
---
diff --git a/Makefile b/Makefile
t@@ -1,20 +1,34 @@
.POSIX:
+include config.mk
+
SRC = timeadj.c
BIN = timeadj
-LDFLAGS = -lm
+MAN1 = timeadj.1
OBJ = ${SRC:.c=.o}
all: ${BIN}
.o:
- ${CC} ${LDFLAGS} -o $@
+ ${CC} ${FILMTOOLS_LDFLAGS} -o $@
.c.o:
- ${CC} -c ${CFLAGS} -o $@ -c $<
+ ${CC} -c ${FILMTOOLS_CFLAGS} -o $@ -c $<
clean:
rm -f ${BIN} ${OBJ}
-.PHONY: all clean
+install: all
+ mkdir -p ${DESTDIR}${PREFIX}/bin
+ cp -f ${BIN} ${DESTDIR}${PREFIX}/bin
+ for f in ${BIN}; do chmod 755 ${DESTDIR}${PREFIX}/bin/$$f; done
+ mkdir -p ${DESTDIR}${MANPREFIX}/man1
+ cp -f ${MAN1} ${DESTDIR}${MANPREFIX}/man1
+ for m in ${MAN1}; do chmod 644 ${DESTDIR}${MANPREFIX}/man1/$$m; done
+
+uninstall:
+ for f in ${BIN}; do rm -f ${DESTDIR}${PREFIX}/bin/$$f; done
+ for m in ${MAN1}; do rm -f ${DESTDIR}${PREFIX}/man1/$$m; done
+
+.PHONY: all clean install uninstall
diff --git a/config.mk b/config.mk
t@@ -0,0 +1,16 @@
+# customize below to fit your system
+
+# paths
+PREFIX = /usr/local
+MANPREFIX = ${PREFIX}/man
+
+# compiler and linker
+CC = cc
+
+FILMTOOLS_CFLAGS = ${CFLAGS}
+FILMTOOLS_LDFLAGS = ${LDFLAGS}
+FILMTOOLS_CPPFLAGS = -D_DEFAULT_SOURCE
+
+# debug
+#FILMTOOLS_CFLAGS = -fstack-protector-all -O0 -g -std=c99 -Wall -Wextra -pedan…
+#FILMTOOLS_LDFLAGS =
diff --git a/timeadj.1 b/timeadj.1
t@@ -0,0 +1,15 @@
+.Dd Jan 12, 2020
+.Dt TIMEADJ 1
+.Os
+.Sh NAME
+.Nm timeadj
+.Nd fractional time converter
+.Sh SYNOPSIS
+.Nm
+.Ar FACTOR
+.Ar TIME
+.Sh DESCRIPTION
+.Nm
+converts TIME by multiplying with FACTOR.
+.Sh AUTHORS
+.An Anders Damsgaard Aq Mt [email protected]
You are viewing proxied material from mx1.adamsgaard.dk. 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.