blob: 6d225941c9503144222f97dd80d2e87ee488812a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
|
# sfeed - simple RSS and Atom parser (and programs to add reader functionality).
include config.mk
NAME = sfeed
SRC = sfeed.c sfeed_plain.c sfeed_html.c sfeed_opml_import.c sfeed_frames.c \
sfeed_xmlenc.c sfeed_web.c xml.c
OBJ = ${SRC:.c=.o}
all: options sfeed sfeed_plain sfeed_html sfeed_opml_import sfeed_frames \
sfeed_xmlenc sfeed_web
options:
@echo ${NAME} build options:
@echo "CFLAGS = ${CFLAGS}"
@echo "LDFLAGS = ${LDFLAGS}"
@echo "CC = ${CC}"
.c.o:
@echo CC $<
@${CC} -c ${CFLAGS} $<
${OBJ}: config.mk
sfeed: sfeed.o xml.o util.o
@echo CC -o $@
@${CC} -o $@ sfeed.o xml.o util.o ${LDFLAGS}
sfeed_opml_import: sfeed_opml_import.o xml.o
@echo CC -o $@
@${CC} -o $@ sfeed_opml_import.o xml.o ${LDFLAGS}
sfeed_plain: sfeed_plain.o util.o
@echo CC -o $@
@${CC} -o $@ sfeed_plain.o util.o ${LDFLAGS}
sfeed_html: sfeed_html.o util.o
@echo CC -o $@
@${CC} -o $@ sfeed_html.o util.o ${LDFLAGS}
sfeed_frames: sfeed_frames.o util.o
@echo CC -o $@
@${CC} -o $@ sfeed_frames.o util.o ${LDFLAGS}
sfeed_xmlenc: sfeed_xmlenc.o xml.o
@echo CC -o $@
@${CC} -o $@ sfeed_xmlenc.o xml.o ${LDFLAGS}
sfeed_web: sfeed_web.o xml.o util.o
@echo CC -o $@
@${CC} -o $@ sfeed_web.o xml.o util.o ${LDFLAGS}
clean:
@echo cleaning
@rm -f sfeed sfeed_plain sfeed_html sfeed_frames sfeed_opml_import \
${OBJ} ${NAME}-${VERSION}.tar.gz
dist: clean
@echo creating dist tarball
@mkdir -p ${NAME}-${VERSION}
@cp -R CHANGELOG LICENSE Makefile README config.mk \
TODO CREDITS sfeedrc.example style.css ${SRC} sfeed_update \
sfeed.1 sfeed_update.1 sfeed_plain.1 sfeed_html.1 sfeed_opml_import.1 \
sfeed_frames.1 sfeed_opml_export sfeed_opml_export.1 ${NAME}-${VERSION}
@tar -cf ${NAME}-${VERSION}.tar ${NAME}-${VERSION}
@gzip ${NAME}-${VERSION}.tar
@rm -rf ${NAME}-${VERSION}
install: all
@echo installing executable file to ${DESTDIR}${PREFIX}/bin
@mkdir -p ${DESTDIR}${PREFIX}/bin
@cp -f sfeed sfeed_update sfeed_plain sfeed_html sfeed_frames sfeed_xmlenc \
sfeed_opml_import sfeed_opml_export ${DESTDIR}${PREFIX}/bin
@chmod 755 ${DESTDIR}${PREFIX}/bin/sfeed \
${DESTDIR}${PREFIX}/bin/sfeed_update \
${DESTDIR}${PREFIX}/bin/sfeed_plain \
${DESTDIR}${PREFIX}/bin/sfeed_html \
${DESTDIR}${PREFIX}/bin/sfeed_frames \
${DESTDIR}${PREFIX}/bin/sfeed_xmlenc \
${DESTDIR}${PREFIX}/bin/sfeed_opml_import \
${DESTDIR}${PREFIX}/bin/sfeed_opml_export
@mkdir -p ${DESTDIR}${PREFIX}/share/sfeed
@cp -f sfeedrc.example ${DESTDIR}${PREFIX}/share/${NAME}
@cp -f style.css ${DESTDIR}${PREFIX}/share/${NAME}
@echo installing manual pages to ${DESTDIR}${MANPREFIX}/man1
@mkdir -p ${DESTDIR}${MANPREFIX}/man1
@sed "s/VERSION/${VERSION}/g" < sfeed.1 > ${DESTDIR}${MANPREFIX}/man1/sfeed.1
@sed "s/VERSION/${VERSION}/g" < sfeed_update.1 > \
${DESTDIR}${MANPREFIX}/man1/sfeed_update.1
@sed "s/VERSION/${VERSION}/g" < sfeed_plain.1 > \
${DESTDIR}${MANPREFIX}/man1/sfeed_plain.1
@sed "s/VERSION/${VERSION}/g" < sfeed_html.1 > \
${DESTDIR}${MANPREFIX}/man1/sfeed_html.1
@sed "s/VERSION/${VERSION}/g" < sfeed_frames.1 > \
${DESTDIR}${MANPREFIX}/man1/sfeed_frames.1
@sed "s/VERSION/${VERSION}/g" < sfeed_opml_import.1 > \
${DESTDIR}${MANPREFIX}/man1/sfeed_opml_import.1
@sed "s/VERSION/${VERSION}/g" < sfeed_opml_export.1 > \
${DESTDIR}${MANPREFIX}/man1/sfeed_opml_export.1
@chmod 644 ${DESTDIR}${MANPREFIX}/man1/sfeed.1 \
${DESTDIR}${MANPREFIX}/man1/sfeed_update.1 \
${DESTDIR}${MANPREFIX}/man1/sfeed_plain.1 \
${DESTDIR}${MANPREFIX}/man1/sfeed_html.1 \
${DESTDIR}${MANPREFIX}/man1/sfeed_frames.1 \
${DESTDIR}${MANPREFIX}/man1/sfeed_opml_import.1 \
${DESTDIR}${MANPREFIX}/man1/sfeed_opml_export.1
uninstall:
@echo removing executable file from ${DESTDIR}${PREFIX}/bin
@rm -f ${DESTDIR}${PREFIX}/bin/sfeed \
${DESTDIR}${PREFIX}/bin/sfeed_update \
${DESTDIR}${PREFIX}/bin/sfeed_plain \
${DESTDIR}${PREFIX}/bin/sfeed_html \
${DESTDIR}${PREFIX}/bin/sfeed_frames \
${DESTDIR}${PREFIX}/bin/sfeed_xmlenc \
${DESTDIR}${PREFIX}/bin/sfeed_opml_import \
${DESTDIR}${PREFIX}/bin/sfeed_opml_export \
${DESTDIR}${PREFIX}/share/${NAME}/sfeedrc.example \
${DESTDIR}${PREFIX}/share/${NAME}/style.css
@-rmdir ${DESTDIR}${PREFIX}/share/${NAME}
@echo removing manual pages from ${DESTDIR}${MANPREFIX}/man1
@rm -f ${DESTDIR}${MANPREFIX}/man1/sfeed.1 \
${DESTDIR}${MANPREFIX}/man1/sfeed_update.1 \
${DESTDIR}${MANPREFIX}/man1/sfeed_plain.1 \
${DESTDIR}${MANPREFIX}/man1/sfeed_html.1 \
${DESTDIR}${MANPREFIX}/man1/sfeed_frames.1 \
${DESTDIR}${MANPREFIX}/man1/sfeed_opml_import.1 \
${DESTDIR}${MANPREFIX}/man1/sfeed_opml_export.1
.PHONY: all options clean dist install uninstall
|