source: pmb4.2/trunk/fuentes/pmb/classes/font/ttf2ufm/ttf2ufm-src/Makefile @ 815

Last change on this file since 815 was 815, checked in by jrpelegrina, 4 years ago

Initial release of pmb 4.2

  • Property svn:executable set to *
File size: 7.6 KB
Line 
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
23CFLAGS_SYS= -O
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
46LIBS_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
57CFLAGS_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/local/include/freetype2 -I/usr/local/include
64
65#
66# The FreeType-2 library flags (disabled by default)
67
68LIBS_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/local/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
84CFLAGS_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
95LIBS_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
107CFLAGS_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
114CFLAGS_EXTT1ASM=
115#CFLAGS_EXTT1ASM= -DEXTERNAL_T1ASM
116
117CFLAGS= $(CFLAGS_SYS) $(CFLAGS_FT) $(CFLAGS_AT) $(CFLAGS_PREF)
118LIBS= $(LIBS_SYS) $(LIBS_FT) $(LIBS_AT)
119
120# Installation-related stuff
121#
122# The base dir for installation and subdirs in it
123INSTDIR = /usr/local
124# for binaries
125BINDIR = $(INSTDIR)/bin
126# for binaries of little general interest
127LIBXDIR = $(INSTDIR)/libexec/ttf2pt1
128# for scripts, maps/encodings etc.
129SHAREDIR = $(INSTDIR)/share/ttf2pt1
130MANDIR = $(INSTDIR)/man
131
132# owner and group of installed files
133OWNER = root
134GROUP = bin
135
136# After you have configured the Makefile, comment out the following
137# definition:
138warning: 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
144DOCS=CHANGES README FONTS FONTS.hpux encodings/README other/README \
145        app/X11/README app/netscape/README app/TeX/README
146
147SUBDIRS = app encodings maps scripts other
148TXTFILES = README* FONTS* CHANGES* COPYRIGHT
149
150MANS1=ttf2pt1.1 ttf2pt1_convert.1 ttf2pt1_x2gs.1
151MANS=$(MANS1) $(MANS5)
152
153all:    t1asm ttf2pt1 docs mans rpm
154
155docs: $(DOCS)
156
157mans: $(MANS) 
158
159clean:
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
164veryclean: clean
165        rm -f $(DOCS) $(MANS)
166
167rpm: app/RPM/Makefile app/RPM/ttf2pt1.spec
168
169ttf2pt1.1: README.html
170        scripts/html2man . . <README.html
171
172ttf2pt1_convert.1 ttf2pt1_x2gs.1: FONTS.html
173        scripts/html2man . . <FONTS.html
174
175app/RPM/Makefile: Makefile
176        sed 's/^CFLAGS_SYS.*=.*$$/CFLAGS_SYS= -O2 -D_GNU_SOURCE/;/warning:/,/^$$/s/^/#/' <Makefile >app/RPM/Makefile
177
178app/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
181t1asm: t1asm.c
182        $(CC) $(CFLAGS) -o t1asm -DSTANDALONE t1asm.c $(LIBS)
183
184ttf2pt1.o: ttf2pt1.c ttf.h pt1.h global.h version.h
185        $(CC) $(CFLAGS) -c ttf2pt1.c
186
187pt1.o: pt1.c ttf.h pt1.h global.h
188        $(CC) $(CFLAGS) -c pt1.c
189
190ttf.o: ttf.c ttf.h pt1.h global.h
191        $(CC) $(CFLAGS) -c ttf.c
192
193ft.o: ft.c pt1.h global.h
194        $(CC) $(CFLAGS) -c ft.c
195
196bdf.o: bdf.c pt1.h global.h
197        $(CC) $(CFLAGS) -c bdf.c
198
199bitmap.o: bitmap.c pt1.h global.h
200        $(CC) $(CFLAGS) -c bitmap.c
201
202runt1asm.o: runt1asm.c global.h
203        $(CC) $(CFLAGS) $(CFLAGS_EXTT1ASM) -c runt1asm.c
204
205ttf2pt1:        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
208CHANGES: CHANGES.html
209        scripts/unhtml <CHANGES.html >CHANGES
210
211README: README.html
212        scripts/unhtml <README.html >README
213
214encodings/README: encodings/README.html
215        scripts/unhtml <encodings/README.html >encodings/README
216
217other/README: other/README.html
218        scripts/unhtml <other/README.html >other/README
219
220app/X11/README: app/X11/README.html
221        scripts/unhtml <app/X11/README.html >app/X11/README
222
223app/netscape/README: app/netscape/README.html
224        scripts/unhtml <app/netscape/README.html >app/netscape/README
225
226app/TeX/README: app/TeX/README.html
227        scripts/unhtml <app/TeX/README.html >app/TeX/README
228
229FONTS: FONTS.html
230        scripts/unhtml <FONTS.html >FONTS
231
232FONTS.hpux: FONTS.hpux.html
233        scripts/unhtml <FONTS.hpux.html >FONTS.hpux
234
235install: 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 's|^TTF2PT1_BINDIR=$$|TTF2PT1_BINDIR=$(BINDIR)|;\
248                s|^TTF2PT1_LIBXDIR=$$|TTF2PT1_LIBXDIR=$(LIBXDIR)|;\
249                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 's|TTF2PT1_BINDIR|$(BINDIR)|;\
256                        s|TTF2PT1_LIBXDIR|$(LIBXDIR)|;\
257                        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
264uninstall:
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
275snapshot:
276        scripts/mkrel snapshot
277
278release:
279        scripts/mkrel release
Note: See TracBrowser for help on using the repository browser.