contrib/OWB: add correct SDL dependency, fix compilers used
[AROS-Contrib.git] / freetype1 / lib / arch / win16 / Makefile.BC
blob246c12751ddbe17279d078f4735d400b19260bd7
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
27 ARCH = arch\win16
28 FT_MAKEFILE = $(ARCH)\Makefile.BC
29 FT_DLL = ft13_16.dll
31 CC = bcc
32 LIB = tlib /c /e
33 IMPLIB = implib -c -o
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.
40 !if ! $d(DEBUG)
41 CFLAGS = -O2 -3 -ml -A -i40 -I$(ARCH);.;extend $(SPURIOUS_WARNINGS)
42 DLLFLAGS = -ml -WD -lC
43 !else
44 CFLAGS =  -v -N -ml -A -i40 -I$(ARCH);.;extend $(SPURIOUS_WARNINGS)
45 DLLFLAGS = -v -ml -WD -lC
46 !endif
48 CFLAGS = $(CFLAGS) -W
50 FT_DEF = $(FT_DLL:.dll=.def)
51 !if $d(DLL)
52 CFLAGS = $(CFLAGS) -WD
53 !endif
56 !if $d(BIGFONTS)
57 CFLAGS = $(CFLAGS) -DTT_HUGE_PTR=__huge
59 TTFILE = $(ARCH)\hugefile.c
60 TTMEMORY = $(ARCH)\hugemem.c
61 !else
62 TTFILE = .\ttfile.c
63 TTMEMORY = .\ttmemory.c
64 !endif
65 TTMUTEX = .\ttmutex.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.
94 .c.obj:
95         @$(CC) -c -o$* @&&|
96              $(CFLAGS) $<
100 !if ! $d(DEBUG)
101 # Skipped if DEBUG build
102 #  (but it changes nothing, since we always build in multiple parts).
103 all: $(OBJS_M)
104         -del libttf.lib
105         $(LIB) libttf.lib @&&|
106 + $(OBJS_M: = + )
108 !endif
110 debug: $(OBJS_M)
111         -del libttf.lib
112         $(LIB) libttf.lib @&&|
113 + $(OBJS_M: = + )
116 $(FT_DEF): $(ARCH)\ttf.def
117         -copy $(ARCH)\ttf.def $(FT_DEF)
119 dll $(FT_DLL): $(OBJS_M) $(FT_DEF)
120 !if $d(DLL)
121         $(CC) -e$(FT_DLL) @&&|
122             $(DLLFLAGS) $(OBJS_M)
124         $(IMPLIB) libttf $(FT_DEF)
125 !else
126 # Re-invoke with flag set.  Unfortunately, this discards the other flags.
127         make -DDLL -f$(ARCH)/Makefile.BC dll
128 !endif
130 install: $(FT_DLL)
131 !if $d(INSTALL_DIR)
132         copy $(FT_DLL) $(INSTALL_DIR)
133 !else
134         copy $(FT_DLL) C:\WINDOWS
135 !endif
138 $(OBJ_S): $(SRC_S) $(SRC_M)
140 # Not used here because it excesses the capacity of COMMAND.COM...
141 libttf.lib: $(LIB_FILES)
142         -del libttf.lib
143         echo -+$(**: =-+)> response
144         $(LIB) libttf.lib @&&|
145 + $(**: = + )
148 !if $d(BIGFONTS)
149 $(TTMEMORY:.c=.obj): $(TTMEMORY)
150         $(CC) -c -o$* @&&|
151             $(CFLAGS) -A- $*.c
154 $(TTFILE:.c=.obj): $(TTFILE)
155         $(CC) -c -o$* @&&|
156             $(CFLAGS) -A- $*.c
158 !endif
161 clean:
162         -del *.obj
163         -del extend\*.obj
164         -del $(ARCH)\*.obj
165         -del libttf.bak
166         -del response
167         -del *.def
169 distclean: clean
170         -del libttf.lib
171         -del *.dll
172         -del $(FT_DEF)
173         -del C:\WINDOWS\$(FT_DLL)
174 !if $d(INSTALL_DIR)
175         -del $(INSTALL_DIR)\$(FT_DLL)
176 !endif
178 !include "$(ARCH)\depend.win"
180 # end of Makefile