2 # unifoundry.com utilities for the GNU Unifont
4 # Typing "make && make install" will make and
5 # install the binary programs and man pages.
6 # To build only the font from scratch, use
13 VERSION = $(MAJORVERSION).$(DATE)
15 # The settings below will install software, man pages, and documentation
16 # in /usr/local. To install in a different location, modify USRDIR to
21 PREFIX = $(DESTDIR)/$(USRDIR)
22 PKGDEST = $(PREFIX)/share/unifont
25 # Whether to install man pages uncompressed (COMPRESS = 0) or
26 # compressed (COMPRESS != 0).
32 all: bindir fontdir libdir
36 set -e ; $(MAKE) -C src
39 set -e ; $(MAKE) -C man
42 set -e ; $(MAKE) -C font
45 set -e ; $(MAKE) precompiled -C font
48 # Create lib/wchardata.c. If you want to also build the object file
49 # wchardata.o, uncomment the last line
53 sort hangul-syllables.hex pua.hex spaces.hex \
54 unassigned.hex unifont-base.hex wqy.hex \
55 > ../../unifonttemp.hex)
56 bin/unigenwidth unifonttemp.hex font/ttfsrc/combining.txt \
58 \rm -f unifonttemp.hex
59 # (cd lib ; $(CC) -c wchardata.c ; chmod 644 wchardata.o )
61 install: bindir libdir
62 $(MAKE) -C src install PREFIX=$(PREFIX)
63 $(MAKE) -C man install PREFIX=$(PREFIX) COMPRESS=$(COMPRESS)
64 $(MAKE) -C font install PREFIX=$(PREFIX) DESTDIR=$(DESTDIR)
65 install -m0755 -d $(PKGDEST)
66 install -m0644 -p README TUTORIAL LICENSE $(PKGDEST)
67 gzip -f -9 $(PKGDEST)/README
68 gzip -f -9 $(PKGDEST)/TUTORIAL
69 gzip -f -9 $(PKGDEST)/LICENSE
70 install -m0644 -p lib/wchardata.c $(PKGDEST)
71 install -m0644 -p font/ttfsrc/combining.txt $(PKGDEST)
72 # If "make" wasn't run before, font/compiled won't exist.
73 if [ ! -d font/compiled ] ; then \
74 install -m0644 -p font/precompiled/unifont-$(VERSION).hex $(PKGDEST)/unifont.hex ; \
75 install -m0644 -p font/precompiled/unifont-$(VERSION).bmp $(PKGDEST) ; \
77 install -m0644 -p font/compiled/unifont-$(VERSION).hex $(PKGDEST)/unifont.hex ; \
78 install -m0644 -p font/compiled/unifont-$(VERSION).bmp $(PKGDEST) ; \
87 # The .DS files are created under Mac OS X
88 # The build-stamp file is created under Debian
91 $(MAKE) -C src distclean
92 $(MAKE) -C man distclean
93 $(MAKE) -C font distclean
95 \rm -f unifonttemp.hex
99 .PHONY: all bindir mandir fontdir precompiled install clean distclean