1
# This file is part of the FreeType project.
3
# It builds the library and test programs for Turbo C under MSDOS, large model.
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.
12
# Use this file while in the 'test' directory with the following statement:
14
# make -farch\msdos\Makefile.TC
17
# Debug versions can be obtained (except for TC 1.5, see below) with
19
# make -DDEBUG -farch\msdos\Makefile.TC
21
# The main difference is with the compiler options, because due to size
22
# constraints, the modules of the library are always compiled separately.
25
# Copyright 1996-2001 by
26
# David Turner, Robert Wilhelm, and Werner Lemberg.
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
36
# Various notes about specific versions...
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).
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
49
# NOTE: Turbo C++ v. 3.0
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!
55
# NOTE 2: Turbo C v. 2.0
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.
63
# NOTE 3: Turbo C v. 1.5
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.
73
# The hack for <time.h> is used there too, as with v.2.0.
77
FT_MAKEFILE = $(ARCH)\Makefile.TC
82
INCDIRS = -I$(LIBDIR);$(LIBDIR)\$(ARCH);.;$(LIBDIR)\extend
83
SPURIOUS_WARNINGS = -w-pia -w-par -w-use -w-aus -w-rng
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.
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)
98
CFLAGS = $(CFLAGS_LEAN) $(SPURIOUS_WARNINGS)
101
# full-screen MSDOS driver
102
GDRIVER = $(ARCH)\.\gfs_dos.obj
104
# the line below does not work with these old versions of make...
105
# GOBJ = $(GSRC:.c=.o)
107
DISPLAY = display.obj
109
G1OBJ = gmain.obj blitter.obj $(GDRIVER)
110
GOBJ = $(DISPLAY) $(G1OBJ)
143
$(CC) $(CFLAGS) -c -o$* $<
146
EXEFILES = ftdump.exe \
160
# Skipped if DEBUG build
161
all: freetype $(EXEFILES)
165
debug: freetype_debug $(EXEFILES)
169
make -f$(FT_MAKEFILE) all
174
make -f$(FT_MAKEFILE) -DDEBUG debug
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...
183
$(CC) $(CFLAGS_LEAN) -A- -c -o$* $*.c
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
191
ftview.exe: $(GOBJ) ftview.obj common.obj $(LIBDIR)\libttf.lib
192
$(CC) $(LDFLAGS) ftview.obj $(GOBJ) common.obj $(LIBDIR)\libttf.lib
194
ftstring.exe: $(GOBJ) ftstring.obj common.obj $(LIBDIR)\libttf.lib
195
$(CC) $(LDFLAGS) ftstring.obj $(GOBJ) common.obj $(LIBDIR)\libttf.lib
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
202
# fttimer.exe... Well, there is an additional problem here...
204
!if $(__MAKE__) < 0x0300
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
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
220
# Yes, all of this is really dirty...
224
fttimer.exe: $(G1OBJ) fttimer.obj common.obj $(LIBDIR)\libttf.lib
225
$(CC) $(LDFLAGS) fttimer.obj $(G1OBJ) common.obj $(LIBDIR)\libttf.lib
230
ftlint.exe: ftlint.obj common.obj $(LIBDIR)\libttf.lib
231
$(CC) $(LDFLAGS) ftlint.obj common.obj $(LIBDIR)\libttf.lib
233
ftdump.exe: ftdump.obj common.obj $(LIBDIR)\libttf.lib
234
$(CC) $(LDFLAGS) ftdump.obj common.obj $(LIBDIR)\libttf.lib
236
ftstrpnm.exe: ftstrpnm.obj common.obj $(LIBDIR)\libttf.lib
237
$(CC) $(LDFLAGS) ftstrpnm.obj common.obj $(LIBDIR)\libttf.lib
239
ftsbit.exe: $(TDOBJ) ftsbit.obj common.obj $(LIBDIR)\libttf.lib
240
$(CC) $(LDFLAGS) ftsbit.obj textdisp.obj common.obj $(LIBDIR)\libttf.lib
242
ftmetric.exe: $(TDOBJ) ftmetric.obj common.obj $(LIBDIR)\libttf.lib
243
$(CC) $(LDFLAGS) ftmetric.obj textdisp.obj common.obj $(LIBDIR)\libttf.lib
245
fterror.exe: fterror.obj common.obj $(LIBDIR)\libttf.lib
246
$(CC) $(LDFLAGS) fterror.obj common.obj $(LIBDIR)\libttf.lib
251
make -f$(FT_MAKEFILE) clean
256
make -f$(FT_MAKEFILE) distclean
263
del time.h # clean the ugly hack for Turbo C...
265
!include "$(ARCH)\depend.dos"