-
Notifications
You must be signed in to change notification settings - Fork 7
/
Makefile
80 lines (69 loc) · 2.11 KB
/
Makefile
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
include mandoc/Makefile.local
CFLAGS = -g -O2 -Wall -Wno-maybe-uninitialized $(shell pkg-config --cflags zlib gl freetype2 glfw3)
LDFLAGS = -lm $(shell pkg-config --libs zlib gl freetype2 glfw3) ${LDADD} -lbz2
LIBMAN_OBJS = mandoc/man.o \
mandoc/man_macro.o \
mandoc/man_validate.o
LIBMDOC_OBJS = mandoc/att.o \
mandoc/lib.o \
mandoc/mdoc.o \
mandoc/mdoc_argv.o \
mandoc/mdoc_macro.o \
mandoc/mdoc_state.o \
mandoc/mdoc_validate.o \
mandoc/st.o
LIBROFF_OBJS = mandoc/eqn.o \
mandoc/roff.o \
mandoc/roff_validate.o \
mandoc/tbl.o \
mandoc/tbl_data.o \
mandoc/tbl_layout.o \
mandoc/tbl_opts.o
LIBMANDOC_OBJS = $(LIBMAN_OBJS) \
$(LIBMDOC_OBJS) \
$(LIBROFF_OBJS) \
mandoc/arch.o \
mandoc/chars.o \
mandoc/mandoc.o \
mandoc/mandoc_aux.o \
mandoc/mandoc_msg.o \
mandoc/mandoc_ohash.o \
mandoc/mandoc_xr.o \
mandoc/msec.o \
mandoc/preconv.o \
mandoc/read.o
COMPAT_OBJS = ${MANDOC_COBJS:%=mandoc/%}
MANGL_SOURCES = mandoc/tree.c \
mandoc/mdoc_term.c \
mandoc/man_term.c \
mandoc/tbl_term.c \
mandoc/tag.c \
mandoc/roff_term.c \
mandoc/eqn_term.c \
mandoc/term_ascii.c \
mandoc/term.c \
mandoc/term_tab.c \
mandoc/term_tag.c \
mandoc/out.c \
manpath.c \
hashmap.c \
main.c
mangl: $(COMPAT_OBJS) $(LIBMANDOC_OBJS) $(MANGL_SOURCES) icon.h
$(CC) $(CFLAGS) -o $@ $(COMPAT_OBJS) $(LIBMANDOC_OBJS) $(MANGL_SOURCES) $(LDFLAGS)
sanitizer: CFLAGS += -fsanitize=address
sanitizer: mangl
.PHONY: install
install: mangl
mkdir -p ${DESTDIR}${BINDIR}
mkdir -p ${DESTDIR}${MANDIR}/man1
mkdir -p ${DESTDIR}/usr/share/icons/hicolor/scalable/apps/
mkdir -p ${DESTDIR}/usr/share/applications/
${INSTALL_PROGRAM} mangl ${DESTDIR}${BINDIR}
${INSTALL_MAN} mangl.1 ${DESTDIR}${MANDIR}/man1/
${INSTALL_DATA} art/mangl.svg ${DESTDIR}/usr/share/icons/hicolor/scalable/apps/mangl.svg
${INSTALL_DATA} mangl.desktop ${DESTDIR}/usr/share/applications/mangl.desktop
.PHONY: clean
clean:
rm -f mangl
rm -f *.o
rm -f mandoc/*.o