Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
97 lines (75 sloc) 2.72 KB
CC=@CC@ -I. -L.
AR=@AR@
RANLIB=@RANLIB@
BINDIR=@exedir@
MANDIR=@mandir@
LIBDIR=@libdir@
INCDIR=@prefix@/include
PGMS=markdown
SAMPLE_PGMS=mkd2html makepage
@THEME@SAMPLE_PGMS+= theme
MKDLIB=libmarkdown.a
OBJS=mkdio.o markdown.o dumptree.o generate.o \
resource.o docheader.o version.o toc.o css.o \
xml.o Csio.o xmlpage.o @AMALLOC@
all: $(PGMS) $(SAMPLE_PGMS)
install: $(PGMS)
@INSTALL_PROGRAM@ $(PGMS) $(DESTDIR)/$(BINDIR)
@INSTALL_DATA@ $(MKDLIB) $(DESTDIR)/$(LIBDIR)
@INSTALL_DATA@ mkdio.h $(DESTDIR)/$(INCDIR)
install.everything: install install.samples install.man
install.samples: $(SAMPLE_PGMS) install
@INSTALL_PROGRAM@ $(SAMPLE_PGMS) $(DESTDIR)/$(BINDIR)
@INSTALL_DIR@ $(DESTDIR)/$(MANDIR)/man1
@INSTALL_DATA@ theme.1 $(DESTDIR)/$(MANDIR)/man1
install.man:
@INSTALL_DIR@ $(DESTDIR)/$(MANDIR)/man3
@INSTALL_DATA@ mkd-functions.3 markdown.3 mkd-line.3 $(DESTDIR)/$(MANDIR)/man3
for x in mkd_line mkd_generateline; do \
( echo '.\"' ; echo ".so man3/mkd-line.3" ) > $(DESTDIR)/$(MANDIR)/man3/$$x.3;\
done
for x in mkd_in mkd_string; do \
( echo '.\"' ; echo ".so man3/markdown.3" ) > $(DESTDIR)/$(MANDIR)/man3/$$x.3;\
done
for x in mkd_compile mkd_css mkd_generatecss mkd_generatehtml mkd_cleanup mkd_doc_title mkd_doc_author mkd_doc_date; do \
( echo '.\"' ; echo ".so man3/mkd-functions.3" ) > $(DESTDIR)/$(MANDIR)/man3/$$x.3; \
done
@INSTALL_DIR@ $(DESTDIR)/$(MANDIR)/man7
@INSTALL_DATA@ markdown.7 mkd-extensions.7 $(DESTDIR)/$(MANDIR)/man7
@INSTALL_DIR@ $(DESTDIR)/$(MANDIR)/man1
@INSTALL_DATA@ markdown.1 $(DESTDIR)/$(MANDIR)/man1
install.everything: install install.man
version.o: version.c VERSION
$(CC) -DVERSION=\"`cat VERSION`\" -c version.c
markdown: main.o $(MKDLIB)
$(CC) -o markdown main.o -lmarkdown @LIBS@
# example programs
@THEME@theme: theme.o $(MKDLIB) mkdio.h
@THEME@ $(CC) -o theme theme.o -lmarkdown @LIBS@
mkd2html: mkd2html.o $(MKDLIB) mkdio.h
$(CC) -o mkd2html mkd2html.o -lmarkdown @LIBS@
makepage: makepage.c $(MKDLIB) mkdio.h
$(CC) -o makepage makepage.c -lmarkdown @LIBS@
main.o: main.c mkdio.h config.h
$(CC) -I. -c main.c
$(MKDLIB): $(OBJS)
$(AR) crv $(MKDLIB) $(OBJS)
$(RANLIB) $(MKDLIB)
test: $(PGMS) echo cols
@for x in tests/*.t; do \
sh $$x || exit 1; \
done
cols: tools/cols.c
$(CC) -o cols tools/cols.c
echo: tools/echo.c
$(CC) -o echo tools/echo.c
clean:
rm -f $(PGMS) $(SAMPLE_PGMS) *.o $(MKDLIB)
distclean spotless: clean
rm -f @GENERATED_FILES@ @CONFIGURE_FILES@
markdown.o: markdown.c config.h cstring.h markdown.h
generate.o: generate.c config.h cstring.h markdown.h
dumptree.o: dumptree.c cstring.h markdown.h
mkdio.o: mkdio.c mkdio.h cstring.h config.h
xmlpage.o: xmlpage.c mkdio.h cstring.h config.h
toc.o: toc.c mkdio.h cstring.h config.h