1 # Makefile for figlet version 2.2.4 (26 Jan 2011)
2 # adapted from Makefile for figlet version 2.2.2 (05 July 2005)
3 # adapted from Makefile for figlet version 2.2 (15 Oct 1996)
4 # Copyright 1993, 1994,1995 Glenn Chappell and Ian Chai
5 # Copyright 1996, 1997, 1998, 1999, 2000, 2001 John Cowan
6 # Copyright 2002 Christiaan Keet
7 # Copyright 2011 Claudio Matsuoka
9 # Please notice that to follow modern standards and ease third-party
10 # package creation, binaries are now installed under BINDIR, and DESTDIR
11 # is reserved for the installation pathname prefix.
13 # Please make sure BINDIR, MANDIR, DEFAULTFONTDIR and
14 # DEFAULTFONTFILE are defined to reflect the situation
15 # on your computer. See README for details.
17 # Don't change this even if your shell is different. The only reason
18 # for changing this is if sh is not in the same place.
21 # The C compiler and linker to use
23 CFLAGS
= -g
-O2
-Wall
-Wno-unused-value
28 # define TLF_FONTS to use TOIlet TLF fonts
31 # Where to install files
34 # Where the executables should be put
35 BINDIR
= $(prefix)/bin
37 # Where the man page should be put
38 MANDIR
= $(prefix)/man
40 # Where figlet will search first for fonts (the ".flf" files).
41 DEFAULTFONTDIR
= $(prefix)/share
/figlet
42 # Use this definition if you can't put things in $(prefix)/share/figlet
43 #DEFAULTFONTDIR = fonts
45 # The filename of the font to be used if no other is specified,
46 # without suffix.(standard is recommended, but any other can be
47 # used). This font file should reside in the directory specified
49 DEFAULTFONTFILE
= standard
52 ## END OF CONFIGURATION SECTION
56 DIST
= figlet-
$(VERSION
)
57 OBJS
= figlet.o zipio.o crc.o inflate.o utf8.o
58 BINS
= figlet chkfont figlist showfigfonts
59 MANUAL
= figlet
.6 chkfont
.6 figlist
.6 showfigfonts
.6
60 DFILES
= Makefile Makefile.tc
$(MANUAL
) $(OBJS
:.o
=.c
) chkfont.c getopt.c \
61 figlist showfigfonts CHANGES FAQ README LICENSE figfont.txt \
62 crc.h inflate.h zipio.h utf8.h run-tests.sh figmagic
65 $(CC
) -c
$(CFLAGS
) $(XCFLAGS
) -DDEFAULTFONTDIR
=\"$(DEFAULTFONTDIR
)\" \
66 -DDEFAULTFONTFILE
=\"$(DEFAULTFONTFILE
)\" -o
$*.o
$<
71 $(LD
) $(LDFLAGS
) -o
$@
$(OBJS
)
74 $(LD
) $(LDFLAGS
) -o
$@ chkfont.o
77 rm -f
*.o
*~ core figlet chkfont
80 mkdir
-p
$(DESTDIR
)$(BINDIR
)
81 mkdir
-p
$(DESTDIR
)$(MANDIR
)/man6
82 mkdir
-p
$(DESTDIR
)$(DEFAULTFONTDIR
)
83 cp
$(BINS
) $(DESTDIR
)$(BINDIR
)
84 cp
$(MANUAL
) $(DESTDIR
)$(MANDIR
)/man6
85 cp fonts
/*.flf
$(DESTDIR
)$(DEFAULTFONTDIR
)
86 cp fonts
/*.flc
$(DESTDIR
)$(DEFAULTFONTDIR
)
89 rm -Rf
$(DIST
) $(DIST
).
tar.gz
93 cp fonts
/*.fl
[fc] $(DIST
)/fonts
95 cp tests
/*txt tests
/emboss.tlf
$(DIST
)/tests
96 tar cvf
- $(DIST
) | gzip
-9c
> $(DIST
).
tar.gz
99 (cd
$(DIST
); make
all check vercheck
)
102 @ls
-l
$(DIST
).
tar.gz
105 @echo
"Run tests in `pwd`"
106 @.
/run-tests.sh fonts
110 @printf
"Infocode: "; .
/figlet
-I1
111 @.
/figlet
-v|sed
-n
'/Version/s/.*\(Version\)/\1/p'
112 @printf
"README: "; head
-1 < README|sed
's/.*) //'
113 @printf
"FAQ: "; grep latest FAQ|sed
's/ and can.*//'
116 $(OBJS
) chkfont.o getopt.o
: Makefile
119 figlet.o
: figlet.c zipio.h
121 inflate.o
: inflate.c inflate.h
122 zipio.o
: zipio.c zipio.h inflate.h crc.h