~ubuntu-branches/ubuntu/jaunty/texlive-bin/jaunty

« back to all changes in this revision

Viewing changes to build/source/libs/freetype/test/arch/msdos/Makefile.TC

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Preining
  • Date: 2008-06-26 23:14:59 UTC
  • mfrom: (2.1.30 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080626231459-y02rjsrgtafu83yr
Tags: 2007.dfsg.2-3
add missing source roadmap.fig of roadmap.eps in fontinst documentation
(Closes: #482915) (urgency medium due to RC bug)
(new patch add-missing-fontinst-source)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# This file is part of the FreeType project.
 
2
#
 
3
# It builds the library and test programs for Turbo C under MSDOS, large model.
 
4
#
 
5
# You will need Borland MAKE.
 
6
# Tested with Turbo C v.1.5, v.2.0,  Turbo C++ v.1.0, v.3.0
 
7
# Turbo C v.1.0 (May '87) is too old (lack of structure assignment)
 
8
#     to compile FreeType.  Update your compiler. ;-)
 
9
# See below for notes regarding the various versions.
 
10
#
 
11
#
 
12
# Use this file while in the 'test' directory with the following statement:
 
13
#
 
14
#   make -farch\msdos\Makefile.TC
 
15
#
 
16
#
 
17
# Debug versions can be obtained (except for TC 1.5, see below) with
 
18
#
 
19
#   make -DDEBUG -farch\msdos\Makefile.TC
 
20
#
 
21
# The main difference is with the compiler options, because due to size
 
22
# constraints, the modules of the library are always compiled separately.
 
23
#
 
24
#
 
25
# Copyright 1996-2001 by
 
26
# David Turner, Robert Wilhelm, and Werner Lemberg.
 
27
#
 
28
# This file is part of the FreeType project, and may only be used, modified,
 
29
# and distributed under the terms of the FreeType project license,
 
30
# LICENSE.TXT.  By continuing to use, modify, or distribute this file you
 
31
# indicate that you have read the license and understand and accept it
 
32
# fully.
 
33
#
 
34
#
 
35
#
 
36
# Various notes about specific versions...
 
37
#
 
38
# The lack of space in the command line prevents us to turn off the
 
39
# -w-use warning (when TCC.CFG file had enabled it).
 
40
#
 
41
# Due to lack of space in the command line, we are not able to
 
42
# switch off all the irrelevant warnings for the demo program.
 
43
# Under the default settings, only one warning should be shown.
 
44
# If more of the ``verbose'' warnings are enabled, much more can
 
45
# appear. However, rest assured that any of them have been dealt
 
46
# with, and they are just that, warnings, not indicating real
 
47
# problems.
 
48
#
 
49
# NOTE: Turbo C++ v. 3.0
 
50
#
 
51
#   The Makefile.TC for this version is common with the older versions.
 
52
#   Alternatively, you can consider using Makefile.BC instead, changing
 
53
#   the name of the compiler from BCC to TCC!
 
54
#
 
55
# NOTE 2: Turbo C v. 2.0
 
56
#
 
57
#   This version lacks an ANSI compliant <time.h> header, so it causes
 
58
#   problems when compiling the demo program fttimer.  We worked around
 
59
#   this difficulty in a very hacky way.
 
60
#   The detection is based on the version of make used, so if you use
 
61
#   a more recent version, please take a closer look at the Makefile.
 
62
#
 
63
# NOTE 3: Turbo C v. 1.5
 
64
#
 
65
#   Yes, this old compiler is able to compile the FreeType library, even
 
66
#   if it predates the ANSI standard by months!  However, this is a
 
67
#   huge piece for such a small compiler, and several things are not
 
68
#   possible. First, as always with real-mode compilers, you need a lot
 
69
#   of available memory, probably more than 512KB at the C> prompt.
 
70
#   Also, compiling for debug is ardeous: both Makefile.TC assume the
 
71
#   -v option, which was not available in this version.
 
72
 
73
#   The hack for <time.h> is used there too, as with v.2.0.
 
74
 
 
75
 
 
76
ARCH = arch\msdos
 
77
FT_MAKEFILE = $(ARCH)\Makefile.TC
 
78
 
 
79
CC = tcc
 
80
 
 
81
LIBDIR = ..\lib
 
82
INCDIRS = -I$(LIBDIR);$(LIBDIR)\$(ARCH);.;$(LIBDIR)\extend
 
83
SPURIOUS_WARNINGS = -w-pia -w-par -w-use -w-aus -w-rng
 
84
 
 
85
!if ! $d(DEBUG)
 
86
CFLAGS_LEAN = -ml -A -O -Z -G -a $(INCDIRS)
 
87
# The lack of space in the command line prevents us to turn off the
 
88
# warnings, when the TCC.CFG file had enable it with -w.
 
89
# With the normal settings, it should not complain.
 
90
LDFLAGS = -ml
 
91
!else
 
92
# For Turbo C v.1.5, replace the -v option below by -y (2 occurences).
 
93
# You should have applied the same change in the lib Makefile, too.
 
94
CFLAGS_LEAN = -v -N -ml -w-pia -A $(INCDIRS)
 
95
LDFLAGS = -v -ml
 
96
!endif
 
97
 
 
98
CFLAGS = $(CFLAGS_LEAN) $(SPURIOUS_WARNINGS)
 
99
 
 
100
 
 
101
# full-screen MSDOS driver
 
102
GDRIVER = $(ARCH)\.\gfs_dos.obj
 
103
 
 
104
# the line below does not work with these old versions of make...
 
105
# GOBJ = $(GSRC:.c=.o)
 
106
 
 
107
DISPLAY = display.obj
 
108
 
 
109
G1OBJ = gmain.obj blitter.obj $(GDRIVER)
 
110
GOBJ = $(DISPLAY) $(G1OBJ)
 
111
 
 
112
SRC = arabic.c \
 
113
      common.c \
 
114
      textdisp.c \
 
115
      ftdump.c \
 
116
      fterror.c \
 
117
      ftlint.c \
 
118
      ftmetric.c \
 
119
      ftsbit.c \
 
120
      ftstring.c \
 
121
      ftstrpnm.c \
 
122
      ftstrtto.c \
 
123
      fttimer.c \
 
124
      ftview.c \
 
125
      ftzoom.c
 
126
 
 
127
OBJ = arabic.obj \
 
128
      common.obj \
 
129
      ftdump.obj \
 
130
      fterror.obj \
 
131
      ftlint.obj \
 
132
      ftmetric.obj \
 
133
      ftsbit.obj \
 
134
      ftstring.obj \
 
135
      ftstrpnm.obj \
 
136
      ftstrtto.obj \
 
137
      fttimer.obj \
 
138
      ftview.obj \
 
139
      ftzoom.obj
 
140
 
 
141
 
 
142
.c.obj:
 
143
        $(CC) $(CFLAGS) -c -o$* $<
 
144
 
 
145
 
 
146
EXEFILES = ftdump.exe \
 
147
           fterror.exe \
 
148
           ftlint.exe \
 
149
           ftmetric.exe \
 
150
           ftsbit.exe \
 
151
           ftstring.exe \
 
152
           ftstrpnm.exe \
 
153
           ftstrtto.exe \
 
154
           fttimer.exe \
 
155
           ftview.exe \
 
156
           ftzoom.exe
 
157
 
 
158
 
 
159
!if !$d(DEBUG)
 
160
# Skipped if DEBUG build
 
161
all: freetype $(EXEFILES)
 
162
 
 
163
!endif
 
164
 
 
165
debug: freetype_debug $(EXEFILES)
 
166
 
 
167
freetype:
 
168
        cd $(LIBDIR)
 
169
        make -f$(FT_MAKEFILE) all
 
170
        cd ..\test
 
171
 
 
172
freetype_debug:
 
173
        cd $(LIBDIR)
 
174
        make -f$(FT_MAKEFILE) -DDEBUG debug
 
175
        cd ..\test
 
176
 
 
177
 
 
178
# Borland C compilers are unable to include <dos.h> in ANSI mode.
 
179
# So we have a special rule for this file, to build it outside ANSI.
 
180
# Furthermore, this line exceeds the 128-character limit of COMMAND.COM;
 
181
# as a result, we drop the warnings...
 
182
$(GDRIVER):
 
183
        $(CC) $(CFLAGS_LEAN) -A- -c -o$* $*.c
 
184
 
 
185
 
 
186
# This old gr... make is unable to have a $ variable to name all the
 
187
# dependencies. :-(  So the job have to be done by hand...
 
188
ftzoom.exe: $(G1OBJ) ftzoom.obj common.obj $(LIBDIR)\libttf.lib
 
189
        $(CC) $(LDFLAGS) ftzoom.obj $(G1OBJ) common.obj $(LIBDIR)\libttf.lib
 
190
 
 
191
ftview.exe: $(GOBJ) ftview.obj common.obj $(LIBDIR)\libttf.lib
 
192
        $(CC) $(LDFLAGS) ftview.obj $(GOBJ) common.obj $(LIBDIR)\libttf.lib
 
193
 
 
194
ftstring.exe: $(GOBJ) ftstring.obj common.obj $(LIBDIR)\libttf.lib
 
195
        $(CC) $(LDFLAGS) ftstring.obj $(GOBJ) common.obj $(LIBDIR)\libttf.lib
 
196
 
 
197
ftstrtto.exe: $(GOBJ) ftstrtto.obj common.obj arabic.obj $(LIBDIR)\libttf.lib
 
198
        $(CC) $(LDFLAGS) ftstrtto.obj $(GOBJ) common.obj \
 
199
                          arabic.obj $(LIBDIR)\libttf.lib
 
200
 
 
201
 
 
202
# fttimer.exe... Well, there is an additional problem here...
 
203
 
 
204
!if $(__MAKE__) < 0x0300
 
205
 
 
206
# Also, Turbo C v.1.5 and v.2.0 are not fully ANSI compliant with regard to
 
207
# <time.h>, particularly the clock() function.
 
208
# So we use an ugly hack here: a modified version of time.h, with the
 
209
# necessary machinery, is included in the arch\msdos directory.
 
210
time.h: $(ARCH)\time_tc.h
 
211
        copy $(ARCH)\time_tc.h time.h
 
212
 
 
213
# Below is the special rule for forcing recompilation of fttimer.obj
 
214
# using our <time.h>, without using the rule that is pulled in by
 
215
# !include "$(ARCH)\depend.dos" at the end of the Makefile...
 
216
fttimer.exe: $(G1OBJ) fttimer.c time.h common.obj $(LIBDIR)\libttf.lib
 
217
        $(CC) $(CFLAGS) -c -o$* $*.c
 
218
        $(CC) $(LDFLAGS) fttimer.obj $(G1OBJ) common.obj $(LIBDIR)\libttf.lib
 
219
 
 
220
# Yes, all of this is really dirty...
 
221
 
 
222
!else
 
223
# Normal behaviour
 
224
fttimer.exe: $(G1OBJ) fttimer.obj common.obj $(LIBDIR)\libttf.lib
 
225
        $(CC) $(LDFLAGS) fttimer.obj $(G1OBJ) common.obj $(LIBDIR)\libttf.lib
 
226
!endif
 
227
 
 
228
 
 
229
 
 
230
ftlint.exe: ftlint.obj common.obj $(LIBDIR)\libttf.lib
 
231
        $(CC) $(LDFLAGS) ftlint.obj common.obj $(LIBDIR)\libttf.lib
 
232
 
 
233
ftdump.exe: ftdump.obj common.obj $(LIBDIR)\libttf.lib
 
234
        $(CC) $(LDFLAGS) ftdump.obj common.obj $(LIBDIR)\libttf.lib
 
235
 
 
236
ftstrpnm.exe: ftstrpnm.obj common.obj $(LIBDIR)\libttf.lib
 
237
        $(CC) $(LDFLAGS) ftstrpnm.obj common.obj $(LIBDIR)\libttf.lib
 
238
 
 
239
ftsbit.exe: $(TDOBJ) ftsbit.obj common.obj $(LIBDIR)\libttf.lib
 
240
        $(CC) $(LDFLAGS) ftsbit.obj textdisp.obj common.obj $(LIBDIR)\libttf.lib
 
241
 
 
242
ftmetric.exe: $(TDOBJ) ftmetric.obj common.obj $(LIBDIR)\libttf.lib
 
243
        $(CC) $(LDFLAGS) ftmetric.obj textdisp.obj common.obj $(LIBDIR)\libttf.lib
 
244
 
 
245
fterror.exe: fterror.obj common.obj $(LIBDIR)\libttf.lib
 
246
        $(CC) $(LDFLAGS) fterror.obj common.obj $(LIBDIR)\libttf.lib
 
247
 
 
248
 
 
249
clean: do_clean
 
250
        cd $(LIBDIR)
 
251
        make -f$(FT_MAKEFILE) clean
 
252
        cd ..\test
 
253
 
 
254
distclean: do_clean
 
255
        cd $(LIBDIR)
 
256
        make -f$(FT_MAKEFILE) distclean
 
257
        cd ..\test
 
258
        -del *.exe
 
259
 
 
260
do_clean:
 
261
        -del *.obj
 
262
        -del $(ARCH)\*.obj
 
263
        del time.h              # clean the ugly hack for Turbo C...
 
264
 
 
265
!include "$(ARCH)\depend.dos"
 
266
 
 
267
# end of Makefile