1 | |
---|
2 | # This file should be configured before running `make'. |
---|
3 | # Uncomment or change the values that are relevant for your OS. |
---|
4 | |
---|
5 | # The preferred C compiler (by default use the OS-specific default value). |
---|
6 | # For BSD/OS, FreeBSD, Linux (all flavors), NetBSD, OpenBSD the default |
---|
7 | # compiler is GNU C. |
---|
8 | # (Note please the politically correct ordering by alphabet ! :-) |
---|
9 | # |
---|
10 | # Use GNU C even if it's not the default compiler |
---|
11 | # |
---|
12 | #CC=gcc |
---|
13 | # |
---|
14 | # Use the standard ANSI C compiler on HP-UX even if it's not default |
---|
15 | # |
---|
16 | #CC=c89 |
---|
17 | |
---|
18 | # |
---|
19 | # The system-dependent flags for the C compiler |
---|
20 | # |
---|
21 | # Default |
---|
22 | |
---|
23 | CFLAGS_SYS= -g |
---|
24 | |
---|
25 | # For GNU C |
---|
26 | # |
---|
27 | #CFLAGS_SYS= -O2 |
---|
28 | # |
---|
29 | # For GNU C with long options support library (Linux etc.) |
---|
30 | # |
---|
31 | #CFLAGS_SYS= -O2 -D_GNU_SOURCE |
---|
32 | # |
---|
33 | # For GNU C on HP-UX/PA-RISC 1.1 |
---|
34 | # |
---|
35 | #CFLAGS_SYS= -O2 -Wa,-w |
---|
36 | # |
---|
37 | # For the standard ANSI C on HP-UX |
---|
38 | # |
---|
39 | #CFLAGS_SYS= +O2 -D_HPUX_SOURCE |
---|
40 | |
---|
41 | # |
---|
42 | # The system-dependent libraries |
---|
43 | # |
---|
44 | # Defalut (for the BSD-style OSes) |
---|
45 | |
---|
46 | LIBS_SYS= -lm |
---|
47 | |
---|
48 | # For SystemV (such as SCO, UnixWare, Solaris, but _NOT_ Linux or HP-UX) |
---|
49 | # |
---|
50 | #LIBS_SYS= -lm -lsocket |
---|
51 | |
---|
52 | # |
---|
53 | # The flags for C compiler for the FreeType-2 library (disabled by default). |
---|
54 | # This WON'T BUILD with FT2-beta8, use the FreeType release 2.0.4 |
---|
55 | # http://download.sourceforge.net/freetype/freetype-2.0.4.tar.gz |
---|
56 | |
---|
57 | #CFLAGS_FT= |
---|
58 | |
---|
59 | # To enable use of the FreeType-2 library |
---|
60 | # (if the include and lib directory do not match your installation, |
---|
61 | # modify them), also uncomment LIBS_FT |
---|
62 | # |
---|
63 | CFLAGS_FT = -DUSE_FREETYPE -I/usr/include/freetype2 -I/usr/include |
---|
64 | |
---|
65 | # |
---|
66 | # The FreeType-2 library flags (disabled by default) |
---|
67 | |
---|
68 | #LIBS_FT= |
---|
69 | |
---|
70 | # To enable use of the FreeType-2 library |
---|
71 | # (if the include and lib directory do not match your installation, |
---|
72 | # modify them), also uncomment CFLAGS_FT |
---|
73 | # |
---|
74 | LIBS_FT= -L/usr/lib -lfreetype |
---|
75 | |
---|
76 | # |
---|
77 | # The flags for C compiler for the Autotrace library (disabled by default). |
---|
78 | # USE OF THIS FEATURE IS STRONGLY DISCOURAGED, THE BUILT-IN TRACING |
---|
79 | # (AKA VECTORIZATION) PROVIDES MUCH BETTER RESULTS. |
---|
80 | # The tested version is 0.29a (and the fonts produced with it are |
---|
81 | # absolutely not usable). |
---|
82 | # http://download.sourceforge.net/autotrace/autotrace-0.29.tar.gz |
---|
83 | |
---|
84 | CFLAGS_AT= |
---|
85 | |
---|
86 | # To enable use of the Autotrace library |
---|
87 | # (if the include and lib directory do not match your installation, |
---|
88 | # modify them), also uncomment LIBS_AT |
---|
89 | # |
---|
90 | #CFLAGS_AT = -DUSE_AUTOTRACE -I/usr/local/include |
---|
91 | |
---|
92 | # |
---|
93 | # The Autotrace library flags (disabled by default) |
---|
94 | |
---|
95 | LIBS_AT= |
---|
96 | |
---|
97 | # To enable use of the Autotrace library |
---|
98 | # (if the include and lib directory do not match your installation, |
---|
99 | # modify them), also uncomment CFLAGS_AT |
---|
100 | # |
---|
101 | #LIBS_AT= -L/usr/local/lib -lautotrace |
---|
102 | |
---|
103 | # |
---|
104 | # Preference of front-ends if multiple parsers match a file |
---|
105 | # (by default the build-in front-end takes preference over FreeType) |
---|
106 | |
---|
107 | CFLAGS_PREF= |
---|
108 | |
---|
109 | # To prefer FreeType (if enabled): |
---|
110 | # |
---|
111 | #CFLAGS_PREF= -DPREFER_FREETYPE |
---|
112 | |
---|
113 | # Uncomment the second line to not compile t1asm into ttf2pt1 |
---|
114 | CFLAGS_EXTT1ASM= |
---|
115 | #CFLAGS_EXTT1ASM= -DEXTERNAL_T1ASM |
---|
116 | |
---|
117 | CFLAGS= $(CFLAGS_SYS) $(CFLAGS_FT) $(CFLAGS_AT) $(CFLAGS_PREF) |
---|
118 | LIBS= $(LIBS_SYS) $(LIBS_FT) $(LIBS_AT) |
---|
119 | |
---|
120 | # Installation-related stuff |
---|
121 | # |
---|
122 | # The base dir for installation and subdirs in it |
---|
123 | INSTDIR = /usr/local |
---|
124 | # for binaries |
---|
125 | BINDIR = $(INSTDIR)/bin |
---|
126 | # for binaries of little general interest |
---|
127 | LIBXDIR = $(INSTDIR)/libexec/ttf2pt1 |
---|
128 | # for scripts, maps/encodings etc. |
---|
129 | SHAREDIR = $(INSTDIR)/share/ttf2pt1 |
---|
130 | MANDIR = $(INSTDIR)/man |
---|
131 | |
---|
132 | # owner and group of installed files |
---|
133 | OWNER = root |
---|
134 | GROUP = bin |
---|
135 | |
---|
136 | # After you have configured the Makefile, comment out the following |
---|
137 | # definition: |
---|
138 | warning: docs |
---|
139 | @echo >&2 |
---|
140 | @echo " You have to configure the Makefile before running make!" >&2 |
---|
141 | @echo "(or if you are lazy and hope that it will work as is run \`make all')">&2 |
---|
142 | @echo >&2 |
---|
143 | |
---|
144 | DOCS=CHANGES README FONTS FONTS.hpux encodings/README other/README \ |
---|
145 | app/X11/README app/netscape/README app/TeX/README |
---|
146 | |
---|
147 | SUBDIRS = app encodings maps scripts other |
---|
148 | TXTFILES = README* FONTS* CHANGES* COPYRIGHT |
---|
149 | |
---|
150 | MANS1=ttf2pt1.1 ttf2pt1_convert.1 ttf2pt1_x2gs.1 |
---|
151 | MANS=$(MANS1) $(MANS5) |
---|
152 | |
---|
153 | all: t1asm ttf2pt1 docs mans rpm |
---|
154 | |
---|
155 | docs: $(DOCS) |
---|
156 | |
---|
157 | mans: $(MANS) |
---|
158 | |
---|
159 | clean: |
---|
160 | rm -f t1asm ttf2pt1 *.o app/RPM/Makefile app/RPM/*.spec *.core core.* core |
---|
161 | ( cd other && make clean; ) |
---|
162 | ( cd app/netscape && make clean; ) |
---|
163 | |
---|
164 | veryclean: clean |
---|
165 | rm -f $(DOCS) $(MANS) |
---|
166 | |
---|
167 | rpm: app/RPM/Makefile app/RPM/ttf2pt1.spec |
---|
168 | |
---|
169 | ttf2pt1.1: README.html |
---|
170 | scripts/html2man . . <README.html |
---|
171 | |
---|
172 | ttf2pt1_convert.1 ttf2pt1_x2gs.1: FONTS.html |
---|
173 | scripts/html2man . . <FONTS.html |
---|
174 | |
---|
175 | app/RPM/Makefile: Makefile |
---|
176 | sed 's/^CFLAGS_SYS.*=.*$$/CFLAGS_SYS= -O2 -D_GNU_SOURCE/;/warning:/,/^$$/s/^/#/' <Makefile >app/RPM/Makefile |
---|
177 | |
---|
178 | app/RPM/ttf2pt1.spec: app/RPM/ttf2pt1.spec.src version.h |
---|
179 | sed 's/^Version:.*/Version: '`grep TTF2PT1_VERSION version.h| cut -d\" -f2`'/' <app/RPM/ttf2pt1.spec.src >$@ |
---|
180 | |
---|
181 | t1asm: t1asm.c |
---|
182 | $(CC) $(CFLAGS) -o t1asm -DSTANDALONE t1asm.c $(LIBS) |
---|
183 | |
---|
184 | ttf2pt1.o: ttf2pt1.c ttf.h pt1.h global.h version.h |
---|
185 | $(CC) $(CFLAGS) -c ttf2pt1.c |
---|
186 | |
---|
187 | pt1.o: pt1.c ttf.h pt1.h global.h |
---|
188 | $(CC) $(CFLAGS) -c pt1.c |
---|
189 | |
---|
190 | ttf.o: ttf.c ttf.h pt1.h global.h |
---|
191 | $(CC) $(CFLAGS) -c ttf.c |
---|
192 | |
---|
193 | ft.o: ft.c pt1.h global.h |
---|
194 | $(CC) $(CFLAGS) -c ft.c |
---|
195 | |
---|
196 | bdf.o: bdf.c pt1.h global.h |
---|
197 | $(CC) $(CFLAGS) -c bdf.c |
---|
198 | |
---|
199 | bitmap.o: bitmap.c pt1.h global.h |
---|
200 | $(CC) $(CFLAGS) -c bitmap.c |
---|
201 | |
---|
202 | runt1asm.o: runt1asm.c global.h |
---|
203 | $(CC) $(CFLAGS) $(CFLAGS_EXTT1ASM) -c runt1asm.c |
---|
204 | |
---|
205 | ttf2pt1: ttf2pt1.o pt1.o runt1asm.o ttf.o ft.o bdf.o bitmap.o |
---|
206 | $(CC) $(CFLAGS) -o ttf2pt1 ttf2pt1.o pt1.o runt1asm.o ttf.o ft.o bdf.o bitmap.o $(LIBS) |
---|
207 | |
---|
208 | CHANGES: CHANGES.html |
---|
209 | scripts/unhtml <CHANGES.html >CHANGES |
---|
210 | |
---|
211 | README: README.html |
---|
212 | scripts/unhtml <README.html >README |
---|
213 | |
---|
214 | encodings/README: encodings/README.html |
---|
215 | scripts/unhtml <encodings/README.html >encodings/README |
---|
216 | |
---|
217 | other/README: other/README.html |
---|
218 | scripts/unhtml <other/README.html >other/README |
---|
219 | |
---|
220 | app/X11/README: app/X11/README.html |
---|
221 | scripts/unhtml <app/X11/README.html >app/X11/README |
---|
222 | |
---|
223 | app/netscape/README: app/netscape/README.html |
---|
224 | scripts/unhtml <app/netscape/README.html >app/netscape/README |
---|
225 | |
---|
226 | app/TeX/README: app/TeX/README.html |
---|
227 | scripts/unhtml <app/TeX/README.html >app/TeX/README |
---|
228 | |
---|
229 | FONTS: FONTS.html |
---|
230 | scripts/unhtml <FONTS.html >FONTS |
---|
231 | |
---|
232 | FONTS.hpux: FONTS.hpux.html |
---|
233 | scripts/unhtml <FONTS.hpux.html >FONTS.hpux |
---|
234 | |
---|
235 | install: all |
---|
236 | scripts/inst_dir $(BINDIR) $(OWNER) $(GROUP) 0755 |
---|
237 | scripts/inst_dir $(LIBXDIR) $(OWNER) $(GROUP) 0755 |
---|
238 | scripts/inst_dir $(SHAREDIR) $(OWNER) $(GROUP) 0755 |
---|
239 | scripts/inst_dir $(MANDIR)/man1 $(OWNER) $(GROUP) 0755 |
---|
240 | scripts/inst_dir $(MANDIR)/man5 $(OWNER) $(GROUP) 0755 |
---|
241 | cp -R $(TXTFILES) $(SUBDIRS) $(SHAREDIR) |
---|
242 | chown -R $(OWNER) $(SHAREDIR) |
---|
243 | chgrp -R $(GROUP) $(SHAREDIR) |
---|
244 | chmod -R go-w $(SHAREDIR) |
---|
245 | scripts/inst_file ttf2pt1 $(BINDIR)/ttf2pt1 $(OWNER) $(GROUP) 0755 |
---|
246 | [ -f $(BINDIR)/t1asm ] || scripts/inst_file t1asm $(LIBXDIR)/t1asm $(OWNER) $(GROUP) 0755 |
---|
247 | sed -e 's|^TTF2PT1_BINDIR=$$|TTF2PT1_BINDIR=$(BINDIR)|;' \ |
---|
248 | -e 's|^TTF2PT1_LIBXDIR=$$|TTF2PT1_LIBXDIR=$(LIBXDIR)|;' \ |
---|
249 | -e 's|^TTF2PT1_SHAREDIR=$$|TTF2PT1_SHAREDIR=$(SHAREDIR)|;' <scripts/convert >cvt.tmp |
---|
250 | scripts/inst_file cvt.tmp $(BINDIR)/ttf2pt1_convert $(OWNER) $(GROUP) 0755 |
---|
251 | scripts/inst_file cvt.tmp $(SHAREDIR)/scripts/convert $(OWNER) $(GROUP) 0755 |
---|
252 | rm cvt.tmp |
---|
253 | scripts/inst_file scripts/x2gs $(BINDIR)/ttf2pt1_x2gs $(OWNER) $(GROUP) 0755 |
---|
254 | for i in $(MANS1); do { \ |
---|
255 | sed -e 's|TTF2PT1_BINDIR|$(BINDIR)|;' \ |
---|
256 | -e 's|TTF2PT1_LIBXDIR|$(LIBXDIR)|;' \ |
---|
257 | -e 's|TTF2PT1_SHAREDIR|$(SHAREDIR)|;' <$$i >$(MANDIR)/man1/$$i \ |
---|
258 | && chown $(OWNER) $(MANDIR)/man1/$$i \ |
---|
259 | && chgrp $(GROUP) $(MANDIR)/man1/$$i \ |
---|
260 | && chmod 0644 $(MANDIR)/man1/$$i \ |
---|
261 | || exit 1; \ |
---|
262 | } done |
---|
263 | |
---|
264 | uninstall: |
---|
265 | rm -f $(BINDIR)/ttf2pt1 $(BINDIR)/ttf2pt1_convert $(BINDIR)/ttf2pt1_x2gs |
---|
266 | rm -rf $(LIBXDIR) |
---|
267 | rm -rf $(SHAREDIR) |
---|
268 | for i in $(MANS1); do { \ |
---|
269 | rm -f $(MANDIR)/man1/$$i $(MANDIR)/man1/$$i.gz; \ |
---|
270 | } done |
---|
271 | |
---|
272 | |
---|
273 | # targets for automatic generation of releases and snapshots |
---|
274 | |
---|
275 | snapshot: |
---|
276 | scripts/mkrel snapshot |
---|
277 | |
---|
278 | release: |
---|
279 | scripts/mkrel release |
---|