-
Notifications
You must be signed in to change notification settings - Fork 44
/
makefile
67 lines (51 loc) · 2.05 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
CC ?= gcc
#CC ?= clang
CFLAGS ?= -std=c99 -pedantic -Wall -Wextra -O3 -s -pipe
LDFLAGS ?=
XCFLAGS ?= -std=c99 -pedantic -Wall -Wextra -I/usr/include/X11/ -O3 -s -pipe
XLDFLAGS ?= -lX11
HDR = glyph.h yaft.h conf.h color.h parse.h terminal.h util.h \
ctrlseq/esc.h ctrlseq/csi.h ctrlseq/osc.h ctrlseq/dcs.h \
fb/common.h fb/linux.h fb/freebsd.h fb/netbsd.h fb/openbsd.h \
x/x.h
DESTDIR =
PREFIX = $(DESTDIR)/usr
MANPREFIX = $(DESTDIR)/usr/share/man
all: yaft
yaft: mkfont_bdf
yaftx: mkfont_bdf
mkfont_bdf: tools/mkfont_bdf.c tools/mkfont_bdf.h tools/bdf.h tools/util.h
$(CC) -o $@ $< $(CFLAGS) $(LDFLAGS)
glyph.h: mkfont_bdf
# If you want to use your favorite fonts, please change following line
# usage: mkfont_bdf ALIAS BDF1 BDF2 BDF3... > glyph.h
# ALIAS: glyph substitution rule file (see table/alias for more detail)
# BDF1 BDF2 BDF3...: monospace bdf files (must be the same size)
# If there is more than one glyph of the same codepoint, the glyph included in the first bdf file is choosed
./mkfont_bdf table/alias fonts/milkjf/milkjf_k16.bdf fonts/milkjf/milkjf_8x16r.bdf fonts/milkjf/milkjf_8x16.bdf fonts/terminus/ter-u16n.bdf > glyph.h
yaft: yaft.c $(HDR)
# If you want to change configuration, please modify conf.h before make (see conf.h for more detail)
$(CC) -o $@ $< $(CFLAGS) $(LDFLAGS)
yaftx: x/yaftx.c $(HDR)
# If you want to change configuration, please modify conf.h before make (see conf.h for more detail)
$(CC) -o $@ $< $(XCFLAGS) $(XLDFLAGS)
install:
mkdir -p $(PREFIX)/share/terminfo
tic -o $(PREFIX)/share/terminfo info/yaft.src
mkdir -p $(PREFIX)/bin/
install -m755 ./yaft $(PREFIX)/bin/yaft
install -m755 ./yaft_wall $(PREFIX)/bin/yaft_wall
mkdir -p $(MANPREFIX)/man1/
install -m644 ./man/yaft.1 $(MANPREFIX)/man1/yaft.1
installx:
mkdir -p $(PREFIX)/share/terminfo
tic -o $(PREFIX)/share/terminfo info/yaft.src
mkdir -p $(PREFIX)/bin/
install -m755 ./yaftx $(PREFIX)/bin/yaftx
uninstall:
rm -f $(PREFIX)/bin/yaft
rm -f $(PREFIX)/bin/yaft_wall
uninstallx:
rm -f $(PREFIX)/bin/yaftx
clean:
rm -f yaft yaftx mkfont_bdf glyph.h