Introduction
Introduction Statistics Contact Development Disclaimer Help
Makefile - extractjson - extract embedded JSON metadata from HTML pages
git clone git://git.codemadness.org/extractjson
Log
Files
Refs
README
LICENSE
---
Makefile (1844B)
---
1 .POSIX:
2
3 NAME = extractjson
4 VERSION = 0.1
5
6 # paths
7 PREFIX = /usr/local
8 MANPREFIX = ${PREFIX}/man
9 DOCPREFIX = ${PREFIX}/share/doc/${NAME}
10
11 # use system flags.
12 EXTRACTJSON_CFLAGS = ${CFLAGS}
13 EXTRACTJSON_LDFLAGS = ${LDFLAGS}
14 EXTRACTJSON_CPPFLAGS = -D_DEFAULT_SOURCE
15
16 # uncomment for conservative locked I/O.
17 #EXTRACTJSON_CPPFLAGS = -D_DEFAULT_SOURCE -DGETNEXT=getchar
18
19 BIN = ${NAME}
20 SRC = ${BIN:=.c}
21 MAN1 = ${BIN:=.1}
22 DOC = \
23 LICENSE\
24 README
25
26 all: ${BIN}
27
28 ${BIN}: ${@:=.o}
29
30 OBJ = ${SRC:.c=.o}
31
32 ${OBJ}: ${HDR}
33
34 .o:
35 ${CC} ${EXTRACTJSON_LDFLAGS} -o $@ $<
36
37 .c.o:
38 ${CC} ${EXTRACTJSON_CFLAGS} ${EXTRACTJSON_CPPFLAGS} -o $@ -c $<
39
40 dist:
41 rm -rf "${NAME}-${VERSION}"
42 mkdir -p "${NAME}-${VERSION}"
43 cp -f ${MAN1} ${DOC} ${HDR} \
44 ${SRC} Makefile "${NAME}-${VERSION}"
45 # make tarball
46 tar cf - "${NAME}-${VERSION}" | gzip -c > "${NAME}-${VERSION}.ta…
47 rm -rf "${NAME}-${VERSION}"
48
49 clean:
50 rm -f ${BIN} ${OBJ}
51
52 install: all
53 # installing executable files.
54 mkdir -p "${DESTDIR}${PREFIX}/bin"
55 cp -f ${BIN} "${DESTDIR}${PREFIX}/bin"
56 for f in ${BIN}; do chmod 755 "${DESTDIR}${PREFIX}/bin/$$f"; done
57 # installing example files.
58 mkdir -p "${DESTDIR}${DOCPREFIX}"
59 cp -f ${DOC} "${DESTDIR}${DOCPREFIX}"
60 for d in ${DOC}; do chmod 644 "${DESTDIR}${DOCPREFIX}/$$d"; done
61 # installing manual pages for general commands: section 1.
62 mkdir -p "${DESTDIR}${MANPREFIX}/man1"
63 cp -f ${MAN1} "${DESTDIR}${MANPREFIX}/man1"
64 for m in ${MAN1}; do chmod 644 "${DESTDIR}${MANPREFIX}/man1/$$m"…
65
66 uninstall:
67 # removing executable files.
68 for f in ${BIN}; do rm -f "${DESTDIR}${PREFIX}/bin/$$f"; done
69 # removing example files.
70 for d in ${DOC}; do rm -f "${DESTDIR}${DOCPREFIX}/$$d"; done
71 -rmdir "${DESTDIR}${DOCPREFIX}"
72 # removing manual pages.
73 for m in ${MAN1}; do rm -f "${DESTDIR}${MANPREFIX}/man1/$$m"; do…
74
75 .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.