Introduction
Introduction Statistics Contact Development Disclaimer Help
Makefile - tscrape - twitter scraper (not working anymore)
git clone git://git.codemadness.org/tscrape
Log
Files
Refs
README
LICENSE
---
Makefile (2796B)
---
1 .POSIX:
2
3 NAME = tscrape
4 VERSION = 0.6
5
6 # paths
7 PREFIX = /usr/local
8 MANPREFIX = ${PREFIX}/man
9 DOCPREFIX = ${PREFIX}/share/doc/tscrape
10
11 RANLIB = ranlib
12
13 # use system flags.
14 TSCRAPE_CFLAGS = ${CFLAGS}
15 TSCRAPE_LDFLAGS = ${LDFLAGS}
16 TSCRAPE_CPPFLAGS = -D_DEFAULT_SOURCE
17
18 BIN = \
19 tscrape\
20 tscrape_html\
21 tscrape_plain
22 SCRIPTS = \
23 tscrape_update
24
25 SRC = ${BIN:=.c}
26 HDR = \
27 util.h\
28 json.h
29
30 LIBUTIL = libutil.a
31 LIBUTILSRC = \
32 util.c
33 LIBUTILOBJ = ${LIBUTILSRC:.c=.o}
34
35 LIBJSON = libjson.a
36 LIBJSONSRC = \
37 json.c
38 LIBJSONOBJ = ${LIBJSONSRC:.c=.o}
39
40 COMPATSRC = \
41 strlcat.c\
42 strlcpy.c
43 COMPATOBJ =\
44 strlcat.o\
45 strlcpy.o
46
47 LIB = ${LIBUTIL} ${LIBJSON} ${COMPATOBJ}
48
49 MAN1 = ${BIN:=.1}\
50 ${SCRIPTS:=.1}
51 MAN5 = \
52 tscrape.5\
53 tscraperc.5
54 DOC = \
55 LICENSE\
56 README
57
58 all: $(BIN)
59
60 ${BIN}: ${LIB} ${@:=.o}
61
62 OBJ = ${SRC:.c=.o} ${LIBJSONOBJ} ${LIBUTILOBJ} ${COMPATOBJ}
63
64 ${OBJ}: ${HDR}
65
66 .o:
67 ${CC} ${TSCRAPE_LDFLAGS} -o $@ $< ${LIB}
68
69 .c.o:
70 ${CC} ${TSCRAPE_CFLAGS} ${TSCRAPE_CPPFLAGS} -o $@ -c $<
71
72 ${LIBUTIL}: ${LIBUTILOBJ}
73 ${AR} rc $@ $?
74 ${RANLIB} $@
75
76 ${LIBJSON}: ${LIBJSONOBJ}
77 ${AR} rc $@ $?
78 ${RANLIB} $@
79
80 dist:
81 rm -rf "${NAME}-${VERSION}"
82 mkdir -p "${NAME}-${VERSION}"
83 cp -f ${MAN1} ${MAN5} ${DOC} ${HDR} \
84 ${SRC} ${LIBJSONSRC} ${LIBUTILSRC} ${COMPATSRC} ${SCRIPT…
85 Makefile \
86 tscraperc.example style.css \
87 "${NAME}-${VERSION}"
88 # make tarball
89 tar -cf - "${NAME}-${VERSION}" | \
90 gzip -c > "${NAME}-${VERSION}.tar.gz"
91 rm -rf "${NAME}-${VERSION}"
92
93 clean:
94 rm -f ${BIN} ${OBJ} ${LIB}
95
96 install: all
97 # installing executable files and scripts.
98 mkdir -p "${DESTDIR}${PREFIX}/bin"
99 cp -f ${BIN} ${SCRIPTS} "${DESTDIR}${PREFIX}/bin"
100 for f in $(BIN) $(SCRIPTS); do chmod 755 "${DESTDIR}${PREFIX}/bi…
101 # installing example files.
102 mkdir -p "${DESTDIR}${DOCPREFIX}"
103 cp -f tscraperc.example\
104 style.css\
105 README\
106 "${DESTDIR}${DOCPREFIX}"
107 # installing manual pages for general commands: section 1.
108 mkdir -p "${DESTDIR}${MANPREFIX}/man1"
109 cp -f ${MAN1} "${DESTDIR}${MANPREFIX}/man1"
110 for m in $(MAN1); do chmod 644 "${DESTDIR}${MANPREFIX}/man1/$$m"…
111 # installing manual pages for file formats: section 5.
112 mkdir -p "${DESTDIR}${MANPREFIX}/man5"
113 cp -f ${MAN5} "${DESTDIR}${MANPREFIX}/man5"
114 for m in ${MAN5}; do chmod 644 "${DESTDIR}${MANPREFIX}/man5/$$m"…
115
116 uninstall:
117 # removing executable files and scripts.
118 for f in $(BIN) $(SCRIPTS); do rm -f "${DESTDIR}${PREFIX}/bin/$$…
119 # removing example files.
120 rm -f \
121 "${DESTDIR}${DOCPREFIX}/tscraperc.example"\
122 "${DESTDIR}${DOCPREFIX}/style.css"\
123 "${DESTDIR}${DOCPREFIX}/README"
124 -rmdir "${DESTDIR}${DOCPREFIX}"
125 # removing manual pages.
126 for m in $(MAN1); do rm -f "${DESTDIR}${MANPREFIX}/man1/$$m"; do…
127 for m in ${MAN5}; do rm -f "${DESTDIR}${MANPREFIX}/man5/$$m"; do…
128
129 .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.