Blob


1 SUBDIRS = test
3 bin_PROGRAMS = telescope telescope-identity
5 EXTRA_telescope_SOURCES = compat/ohash.h compat/queue.h compat/imsg.h contrib \
6 keys
8 telescope_SOURCES = bufio.c bufio.h certs.c certs.h cmd.c cmd.gen.c cmd.h \
9 compat.h compl.c compl.h control.c control.h \
10 defaults.c defaults.h downloads.c emoji-matcher.c \
11 ev.c ev.h exec.c exec.h fs.c fs.h \
12 gencmd.awk genemoji.sh help.c hist.c imsgev.c imsgev.h \
13 iri.c iri.h keymap.c keymap.h mailcap.c mailcap.h \
14 mcache.c mcache.h mime.c minibuffer.c minibuffer.h \
15 net.c pages.c pages.h parse.y parser.c parser.h \
16 parser_gemtext.c parser_gophermap.c parser_textpatch.c \
17 parser_textplain.c sandbox.c session.c session.h \
18 telescope.c telescope.h tofu.c tofu.h ui.c ui.h \
19 utf8.c utf8.h utils.c utils.h wrap.c \
20 xwrapper.c xwrapper.h
22 telescope_identity_SOURCES = certs.c certs.h fs.c fs.h hist.c hist.h \
23 identity.c parser.c parser.h xwrapper.c xwrapper.h
25 noinst_PROGRAMS = pagebundler
26 pagebundler_SOURCES = pagebundler.c
28 EXCLUDE_FROM_COCCI = bufio.c certs.c cmd-gen.c emoji-matcher.c ev.c hist.c \
29 pages.c parse.c xwrapper.c
30 EXTS = .c .y
32 SPATCH_FILES = $(foreach ext,$(EXTS),$(filter %$(ext), \
33 $(filter-out $(EXCLUDE_FROM_COCCI), \
34 $(telescope_SOURCES), $(telescope_identity_SOURCES), \
35 $(wildcard test/*.c))))
36 .PHONY: cocci
37 cocci:
38 spatch --sp-file ./contrib/coccinelle/wrap.cocci \
39 --in-place $(SPATCH_FILES)
41 # Override implicit rule since we have to use HOSTCC and not CC.
42 pagebundler$(EXEEXT): pagebundler.c
43 $(HOSTCC) $(HOSTCFLAGS) -o $@ $(srcdir)/pagebundler.c
45 # ugly; builds bundled libgrapheme if needed
46 .NOTPARALLEL:
47 .NOPARALLEL:
48 $(LIBGRAPHEME):
49 ${MAKE} -C $(srcdir)/libgrapheme libgrapheme.a
51 clean-local:
52 test -n "$(LIBGRAPHEME)" && ${MAKE} -C libgrapheme clean || true
54 BUILT_SOURCES = cmd.gen.c emoji-matcher.c pages.c
56 CLEANFILES = cmd.gen.c emoji-matcher.c pages.c parse.c
58 LDADD = $(LIBOBJS) $(LIBGRAPHEME)
59 EXTRA_telescope_DEPENDENCIES = $(LIBGRAPHEME)
61 EXTRA_DIST = ChangeLog LICENSE README.md data/emoji.txt \
62 libgrapheme pages/*.gmi
64 dist_man1_MANS = telescope.1 telescope-identity.1
66 cmd.gen.c: $(srcdir)/cmd.h $(srcdir)/gencmd.awk
67 ${AWK} -f $(srcdir)/gencmd.awk < $(srcdir)/cmd.h > $@
69 emoji-matcher.c: $(srcdir)/data/emoji.txt $(srcdir)/genemoji.sh
70 $(srcdir)/genemoji.sh $(srcdir)/data/emoji.txt > $@
72 PAGES = $(builddir)/pages/about_about.gmi \
73 $(builddir)/pages/about_blank.gmi \
74 $(builddir)/pages/about_crash.gmi \
75 $(builddir)/pages/about_help.gmi \
76 $(builddir)/pages/about_license.gmi \
77 $(builddir)/pages/about_new.gmi
78 pages.c: pagebundler $(srcdir)/pages.h ${PAGES}
79 echo "#include \"pages.h\"" > $@
80 ./pagebundler $(builddir)/pages/about_about.gmi >> $@
81 ./pagebundler $(builddir)/pages/about_blank.gmi >> $@
82 ./pagebundler $(builddir)/pages/about_crash.gmi >> $@
83 ./pagebundler $(builddir)/pages/about_help.gmi >> $@
84 ./pagebundler $(builddir)/pages/about_license.gmi >> $@
85 ./pagebundler $(builddir)/pages/about_new.gmi >> $@
86 ./pagebundler $(builddir)/pages/bookmarks.gmi >> $@
88 # --- maintainer targets ---
90 PUBKEY = missing
91 PRIVKEY = missing
93 # Ensure that, before we release, that the files in libgrapheme don't include
94 # any compiled files, etc. We don't want these as part of a release tarball.
95 dist-hook:
96 ${MAKE} -C $(distdir)/libgrapheme clean
98 release: dist
99 sha256 ${distdir}.tar.gz > ${distdir}.tar.gz.sha256
100 signify -S -e -m ${distdir}.tar.gz.sha256 -s ${PRIVKEY}
101 signify -C -p ${PUBKEY} -x ${distdir}.tar.gz.sha256.sig