Blame view

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