contrib/OWB: add correct SDL dependency, fix compilers used
[AROS-Contrib.git] / freetype1 / test / arch / win16 / Makefile.BC
blobcf246c3955810ca99d4a2d91b988e9c2a68b4e0d
1 # This file is part of the FreeType project.
3 # It builds the library and test programs for BC++ for 16-bit Windows,
4 # using large model, and using Easy-Win to display console outputs.
6 # Tested with Borland C++ v.4.02, 5.0
7 # You will need Borland MAKE (v.3.6 and above should be OK, for oldest
8 # versions refer to the instructions below).
11 # Use this file while in the 'test' directory with the following statement:
13 #   make -farch\win16\Makefile.BC
16 # A DLL version of the library can be built and then used with
18 #   make -DDLL -farch/win16/Makefile.BC dll
20 # (do not forget to define DLL, otherwise the link phase will fail).
23 # Debug versions can be obtained with
25 #   make -DDEBUG -farch\win16\Makefile.BC
27 # Special versions enabled to handle big fonts (with more than 16,384
28 # glyphs) can be obtained with
30 #   make -DBIGFONTS -farch\msdos\Makefile.BC
32 ARCH = arch\win16
33 FT_MAKEFILE = $(ARCH)\Makefile.BC
34 FT_DLL = ft13_16.dll
36 CC = bcc
38 LIBDIR = ..\lib
39 INCDIRS = -I$(LIBDIR);$(LIBDIR)\$(ARCH);.;$(LIBDIR)\extend
40 SPURIOUS_WARNINGS = -w-nak -w-par -w-use -w-aus -w-stu -w-stv -w-cln -w-sig -w-pia
42 # Credits go to Dave Hoo <dhoo@flash.net> for pointing out that modern
43 # Borland compilers (from BC++ 3.1 on) can increase the limit of
44 # the length of identifiers.
45 CFLAGS = -WSE -ml -A -i40 $(INCDIRS) $(SPURIOUS_WARNINGS)
47 !if ! $d(DEBUG)
48 CFLAGS = $(CFLAGS) -O2 -3
49 LDFLAGS = -ml -W -lC
50 !else
51 CFLAGS = $(CFLAGS) -v -N
52 LDFLAGS = -v -ml -W -lC
53 !endif
55 !if $d(DLL)
56 CFLAGS = $(CFLAGS) -DFREETYPE_DLL
57 !endif
60 # Windows graphic driver
61 GDRIVER = $(ARCH)\gw_win16.c
63 DISPLAY = display.c
65 G1SRC = gmain.c blitter.c $(GDRIVER)
66 GSRC = $(DISPLAY) $(G1SRC)
68 GOBJ = $(GSRC:.c=.obj)
69 G1OBJ = $(G1SRC:.c=.obj)
72 SRC = arabic.c \
73       common.c \
74       ftdump.c \
75       fterror.c \
76       ftlint.c \
77       ftmetric.c \
78       ftsbit.c \
79       ftstring.c \
80       ftstrpnm.c \
81       ftstrtto.c \
82       fttimer.c \
83       ftview.c \
84       ftzoom.c
86 OBJ = $(SRC:.c=.obj)
89 .c.obj:
90         $(CC) -c -o$* @&&|
91             $(CFLAGS) $<
94 EXEFILES = ftdump.exe \
95            fterror.exe \
96            ftlint.exe \
97            ftmetric.exe \
98            ftsbit.exe \
99            ftstring.exe \
100            ftstrpnm.exe \
101            ftstrtto.exe \
102            fttimer.exe \
103            ftview.exe \
104            ftzoom.exe
106 !if !$d(DEBUG)
107 # Skipped if DEBUG build
108 all: freetype $(EXEFILES)
110 dll: the_dll $(EXEFILES)
112 !else
113 # Skipped if non-DEBUG build
114 default_target: debug
115 dll: the_debug_dll $(EXEFILES)
117 !endif
119 debug: freetype_debug $(EXEFILES)
122 !if $d(BIGFONTS)
123 MAKEBIG = -DBIGFONTS
124 !endif
126 freetype:
127         cd $(LIBDIR)
128         make -f$(FT_MAKEFILE) $(MAKEBIG) all
129         cd ..\test
131 freetype_debug:
132         cd $(LIBDIR)
133         make -f$(FT_MAKEFILE) -DDEBUG $(MAKEBIG) debug
134         cd ..\test
136 the_dll:
137         cd $(LIBDIR)
138         make -f$(FT_MAKEFILE) -DDLL $(MAKEBIG) dll
139         cd ..\test
140         -copy $(LIBDIR)\$(FT_DLL)
142 the_debug_dll:
143         cd $(LIBDIR)
144         make -f$(FT_MAKEFILE) -DDEBUG -DDLL $(MAKEBIG) dll
145         cd ..\test
146         -copy $(LIBDIR)\$(FT_DLL)
149 # C compilers are unable to include 16-bit <windows.h> in ANSI mode.
150 # So we have a special rule for this file, to build it outside ANSI.
151 $(GDRIVER:.c=.obj):
152         $(CC) -c -o$* @&&|
153             $(CFLAGS) -A- $*.c
157 # Borland versions of make are unable to use the $** variable inside
158 # implicit rules (like .obj.exe:). The job have to be done by hand. :-(
159 ftzoom.exe: $(G1OBJ) ftzoom.obj common.obj $(LIBDIR)\libttf.lib
160         $(CC) $(LDFLAGS) ftzoom.obj $(G1OBJ) common.obj $(LIBDIR)\libttf.lib
162 ftview.exe: $(GOBJ) ftview.obj common.obj $(LIBDIR)\libttf.lib
163         $(CC) $(LDFLAGS) ftview.obj $(GOBJ) common.obj $(LIBDIR)\libttf.lib
165 ftstring.exe: $(GOBJ) ftstring.obj common.obj $(LIBDIR)\libttf.lib
166         $(CC) $(LDFLAGS) ftstring.obj $(GOBJ) common.obj $(LIBDIR)\libttf.lib
168 ftstrtto.exe: $(GOBJ) ftstrtto.obj common.obj arabic.obj $(LIBDIR)\libttf.lib
169         $(CC) $(LDFLAGS) ftstrtto.obj $(GOBJ) common.obj arabic.obj \
170                           $(LIBDIR)\libttf.lib
172 fttimer.exe: $(G1OBJ) fttimer.obj common.obj $(LIBDIR)\libttf.lib
173         $(CC) $(LDFLAGS) fttimer.obj $(G1OBJ) common.obj $(LIBDIR)\libttf.lib
175 ftlint.exe: ftlint.obj common.obj $(LIBDIR)\libttf.lib
176         $(CC) $(LDFLAGS) ftlint.obj common.obj $(LIBDIR)\libttf.lib
178 ftdump.exe: ftdump.obj common.obj $(LIBDIR)\libttf.lib
179         $(CC) $(LDFLAGS) ftdump.obj common.obj $(LIBDIR)\libttf.lib
181 ftstrpnm.exe: ftstrpnm.obj common.obj $(LIBDIR)\libttf.lib
182         $(CC) $(LDFLAGS) ftstrpnm.obj common.obj $(LIBDIR)\libttf.lib
184 ftsbit.exe: ftsbit.obj common.obj $(LIBDIR)\libttf.lib
185         $(CC) $(LDFLAGS) ftsbit.obj common.obj $(LIBDIR)\libttf.lib
187 ftmetric.exe: ftmetric.obj common.obj $(LIBDIR)\libttf.lib
188         $(CC) $(LDFLAGS) ftmetric.obj common.obj $(LIBDIR)\libttf.lib
190 fterror.exe: fterror.obj common.obj $(LIBDIR)\libttf.lib
191         $(CC) $(LDFLAGS) fterror.obj common.obj $(LIBDIR)\libttf.lib
194 clean: do_clean
195         cd $(LIBDIR)
196         make -f$(FT_MAKEFILE) clean
197         cd ..\test
199 distclean: do_clean
200         cd $(LIBDIR)
201         make -f$(FT_MAKEFILE) distclean
202         cd ..\test
203         -del *.exe
204         -del *.dll
206 do_clean:
207         -del *.obj
208         -del $(ARCH)\*.obj
210 !include "$(ARCH)\depend.win"
212 # end of Makefile