1 # This file is part of the FreeType project.
3 # It builds the library for Borland C++ for 16-bit Windows, large model.
4 # Due to size constraints, it does not try to pack all modules into one.
6 # You will need Borland MAKE.
7 # Tested with Borland C++ v.4.0 and 5.0.
9 # Use this file while in the lib directory with the following statement:
11 # make -farch/win16/Makefile.BC
14 # A DLL version of the library can be built with
16 # make -DDLL -farch/win16/Makefile.BC dll
18 # Debug versions can be obtained with
20 # make -DDEBUG -farch\win16\Makefile.BC
22 # Special versions enabled to handle big fonts (with more than 16,384
23 # glyphs) can be obtained with
25 # make -DBIGFONTS -farch/win16/Makefile.BC
28 FT_MAKEFILE = $(ARCH)\Makefile.BC
35 SPURIOUS_WARNINGS = -w-nak -w-par -w-use -w-aus -w-stu -w-stv -w-cln -w-sig
37 # Credits go to Dave Hoo <dhoo@flash.net> for pointing out that modern
38 # Borland compilers (from BC++ 3.1 on) can increase the limit on
39 # the length of identifiers.
41 CFLAGS = -O2 -3 -ml -A -i40 -I$(ARCH);.;extend $(SPURIOUS_WARNINGS)
42 DLLFLAGS = -ml -WD -lC
44 CFLAGS = -v -N -ml -A -i40 -I$(ARCH);.;extend $(SPURIOUS_WARNINGS)
45 DLLFLAGS = -v -ml -WD -lC
50 FT_DEF = $(FT_DLL:.dll=.def)
52 CFLAGS = $(CFLAGS) -WD
57 CFLAGS = $(CFLAGS) -DTT_HUGE_PTR=__huge
59 TTFILE = $(ARCH)\hugefile.c
60 TTMEMORY = $(ARCH)\hugemem.c
63 TTMEMORY = .\ttmemory.c
67 PORT = $(TTFILE) $(TTMEMORY) $(TTMUTEX)
69 # Do not insert spaces before the \ at end of line,
70 # otherwise the substitution for TLIB command line will fail.
71 SRC_X = extend\ftxgasp.c extend\ftxkern.c extend\ftxpost.c\
72 extend\ftxcmap.c extend\ftxwidth.c extend\ftxerr18.c\
73 extend\ftxsbit.c extend\ftxgsub.c extend\ftxgpos.c\
74 extend\ftxopen.c extend\ftxgdef.c
75 OBJS_X = $(SRC_X:.c=.obj)
77 SRC_M = ttapi.c ttcache.c ttcalc.c ttcmap.c\
78 ttgload.c ttinterp.c ttload.c ttobjs.c\
79 ttraster.c ttextend.c ttdebug.c $(PORT)
80 OBJS_M = $(SRC_M:.c=.obj) $(OBJS_X)
82 SRC_S = $(ARCH)\freetype.c
83 OBJ_S = $(SRC_S:.c=.obj)
84 OBJS_S = $(OBJ_S) $(OBJS_X)
87 # Since Borland make does not handle $($(LIB_FILES)), and using
88 # -DLIB_FILES="$(OBJS_S)" will excess the capacity of COMMAND.COM, we cheat
89 # by constructing TLIB's response file directly in the `all' target.
91 # Another solution, useful during debugging of part of the library,
92 # would be to include each .obj in the library as soon as it is compiled.
93 # See ../msdos/Makefile.TC for an application.
101 # Skipped if DEBUG build
102 # (but it changes nothing, since we always build in multiple parts).
105 $(LIB) libttf.lib @&&|
112 $(LIB) libttf.lib @&&|
116 $(FT_DEF): $(ARCH)\ttf.def
117 -copy $(ARCH)\ttf.def $(FT_DEF)
119 dll $(FT_DLL): $(OBJS_M) $(FT_DEF)
121 $(CC) -e$(FT_DLL) @&&|
122 $(DLLFLAGS) $(OBJS_M)
124 $(IMPLIB) libttf $(FT_DEF)
126 # Re-invoke with flag set. Unfortunately, this discards the other flags.
127 make -DDLL -f$(ARCH)/Makefile.BC dll
132 copy $(FT_DLL) $(INSTALL_DIR)
134 copy $(FT_DLL) C:\WINDOWS
138 $(OBJ_S): $(SRC_S) $(SRC_M)
140 # Not used here because it excesses the capacity of COMMAND.COM...
141 libttf.lib: $(LIB_FILES)
143 echo -+$(**: =-+)> response
144 $(LIB) libttf.lib @&&|
149 $(TTMEMORY:.c=.obj): $(TTMEMORY)
154 $(TTFILE:.c=.obj): $(TTFILE)
173 -del C:\WINDOWS\$(FT_DLL)
175 -del $(INSTALL_DIR)\$(FT_DLL)
178 !include "$(ARCH)\depend.win"