Introduction
Introduction Statistics Contact Development Disclaimer Help
Makefile: add DOCPREFIX for installing docs in ports, use system {C,LD}FLAGS - …
git clone git://git.codemadness.org/tscrape
Log
Files
Refs
README
LICENSE
---
commit 0743e76986d211f2a2695410c7678275355341d0
parent 1e8d328abcab552a8a58fee93eadada8b42148f7
Author: Hiltjo Posthuma <[email protected]>
Date: Fri, 22 Feb 2019 13:09:12 +0100
Makefile: add DOCPREFIX for installing docs in ports, use system {C,LD}FLAGS
change installed doc from /usr/local/share/tscrape to /usr/local/share/doc/tscr…
Diffstat:
M Makefile | 17 +++++++++--------
M config.mk | 20 ++++++++++++--------
2 files changed, 21 insertions(+), 16 deletions(-)
---
diff --git a/Makefile b/Makefile
@@ -2,6 +2,7 @@ include config.mk
NAME = tscrape
VERSION = 0.1
+
BIN = \
tscrape\
tscrape_html\
@@ -44,10 +45,10 @@ OBJ = ${SRC:.c=.o} ${LIBXMLOBJ} ${LIBUTILOBJ}
${OBJ}: config.mk ${HDR}
.o:
- ${CC} ${LDFLAGS} -o $@ $< ${LIB}
+ ${CC} ${TSCRAPE_LDFLAGS} -o $@ $< ${LIB}
.c.o:
- ${CC} ${CFLAGS} ${CPPFLAGS} -o $@ -c $<
+ ${CC} ${TSCRAPE_CFLAGS} ${TSCRAPE_CPPFLAGS} -o $@ -c $<
${LIBUTIL}: ${LIBUTILOBJ}
${AR} rc $@ $?
@@ -79,11 +80,11 @@ install: all
cp -f ${BIN} ${SCRIPTS} "${DESTDIR}${PREFIX}/bin"
for f in $(BIN) $(SCRIPTS); do chmod 755 "${DESTDIR}${PREFIX}/bin/$$f"…
# installing example files.
- mkdir -p "${DESTDIR}${PREFIX}/share/${NAME}"
+ mkdir -p "${DESTDIR}${DOCPREFIX}"
cp -f tscraperc.example\
style.css\
README\
- "${DESTDIR}${PREFIX}/share/${NAME}"
+ "${DESTDIR}${DOCPREFIX}"
# installing manual pages for tools.
mkdir -p "${DESTDIR}${MANPREFIX}/man1"
cp -f ${MAN1} "${DESTDIR}${MANPREFIX}/man1"
@@ -94,10 +95,10 @@ uninstall:
for f in $(BIN) $(SCRIPTS); do rm -f "${DESTDIR}${PREFIX}/bin/$$f"; do…
# removing example files.
rm -f \
- "${DESTDIR}${PREFIX}/share/${NAME}/tscraperc.example"\
- "${DESTDIR}${PREFIX}/share/${NAME}/style.css"\
- "${DESTDIR}${PREFIX}/share/${NAME}/README"
- -rmdir "${DESTDIR}${PREFIX}/share/${NAME}"
+ "${DESTDIR}${DOCPREFIX}/tscraperc.example"\
+ "${DESTDIR}${DOCPREFIX}/style.css"\
+ "${DESTDIR}${DOCPREFIX}/README"
+ -rmdir "${DESTDIR}${DOCPREFIX}"
# removing manual pages.
for m in $(MAN1); do rm -f "${DESTDIR}${MANPREFIX}/man1/$$m"; done
diff --git a/config.mk b/config.mk
@@ -3,22 +3,26 @@
# paths
PREFIX = /usr/local
MANPREFIX = ${PREFIX}/man
+DOCPREFIX = ${PREFIX}/share/doc/tscrape
# compiler and linker
CC = cc
AR = ar
RANLIB = ranlib
+# use system flags.
+TSCRAPE_CFLAGS = ${CFLAGS}
+TSCRAPE_LDFLAGS = ${LDFLAGS}
+TSCRAPE_CPPFLAGS = -D_DEFAULT_SOURCE
+
# debug
-#CFLAGS = -fstack-protector-all -O0 -g -std=c99 -Wall -Wextra -pedantic
-#LDFLAGS =
+#TSCRAPE_CFLAGS = -fstack-protector-all -O0 -g -std=c99 -Wall -Wextra -pedantic
+#TSCRAPE_LDFLAGS =
# optimized
-CFLAGS = -O2 -std=c99
-LDFLAGS = -s
+#TSCRAPE_CFLAGS = -O2 -std=c99
+#TSCRAPE_LDFLAGS = -s
# optimized static
-#CFLAGS = -static -O2 -std=c99
-#LDFLAGS = -static -s
-
-CPPFLAGS = -D_DEFAULT_SOURCE
+#TSCRAPE_CFLAGS = -static -O2 -std=c99
+#TSCRAPE_LDFLAGS = -static -s
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.