contrib/OWB: add correct SDL dependency, fix compilers used
[AROS-Contrib.git] / freetype1 / test / arch / win16 / Makefile.VC
blob2a9205f607667f4f745d2cbc4c69e4a923f9e590
1 # This file is part of the FreeType project.
3 # It builds the library and test programs for Microsoft Visual C++ 1.x
4 # and Microsoft C/C++ v.7.0 compilers for 16-bit Windows, large model,
5 # using QuickWin to display console outputs.
7 # You will need NMAKE.
10 # Use this file while in the 'test' directory with the following statement:
12 #   nmake /f arch\win16\Makefile.VC
14 # A DLL version of the library can be built and then used with
16 #   nmake DLL=1 /f arch\win16\Makefile.VC dll
18 # (do not forget to define DLL, otherwise the link phase will fail).
21 # Debug versions can be obtained with
23 #   nmake DEBUG=1 /f arch\win16\Makefile.VC
25 # Special versions enabled to handle big fonts (with more than 16,384
26 # glyphs) can be obtained with
28 #   nmake BIGFONTS=1 /f arch\win16\Makefile.VC
30 ARCH = arch\win16
31 FT_MAKEFILE = $(ARCH)\Makefile.VC
32 FT_MAKE = $(MAKE) /nologo
33 FT_DLL = ft13_16.dll
35 CC = cl /nologo
37 LIBDIR = ..\lib
38 INCDIRS = -I$(LIBDIR) -I$(LIBDIR)\$(ARCH) -I. -I$(LIBDIR)\extend
40 # One can also consider using "set MSC_CMD_FLAGS=/Gr /Op- /Gy /YX".
41 # With Microsoft C/C++ 7.0, use /G2 instead of /G3.
42 !ifndef DEBUG
43 CFLAGS =     /Ox /AL /Za /W2 /G3 $(INCDIRS)
44 LDFLAGS = /AL
45 !else
46 CFLAGS = /Zi /Ge /AL /Za /W2 /G3 $(INCDIRS)
47 LDFLAGS = /Zi /AL
48 !endif
50 CFLAGS = $(CFLAGS) /Mq
51 LDFLAGS = $(LDFLAGS) /Mq
53 !ifdef DLL
54 CFLAGS = $(CFLAGS) /DFREETYPE_DLL
55 !endif
58 # Windows graphic driver
59 GDRIVER = $(ARCH)\gw_win16.c
61 GSRC = display.c gmain.c blitter.c $(GDRIVER)
63 GOBJ = $(GSRC:.c=.obj)
66 SRC = arabic.c \
67       common.c \
68       ftdump.c \
69       fterror.c \
70       ftlint.c \
71       ftmetric.c \
72       ftsbit.c \
73       ftstring.c \
74       ftstrpnm.c \
75       ftstrtto.c \
76       fttimer.c \
77       ftview.c \
78       ftzoom.c
80 OBJ = $(SRC:.c=.obj)
83 .c.obj:
84         @$(CC) /c /Fo$* @<<
85             $(CFLAGS) $<
88 EXEFILES = ftdump.exe \
89            fterror.exe \
90            ftlint.exe \
91            ftmetric.exe \
92            ftsbit.exe \
93            ftstring.exe \
94            ftstrpnm.exe \
95            ftstrtto.exe \
96            fttimer.exe \
97            ftview.exe \
98            ftzoom.exe
100 !ifndef DEBUG
101 # Skiped if DEBUG build
102 all: freetype $(EXEFILES)
104 dll: the_dll $(EXEFILES)
106 !else
107 # Skipped if non-DEBUG build
108 default_target: debug
109 dll: the_debug_dll $(EXEFILES)
111 !endif
113 debug: freetype_debug $(EXEFILES)
115 !ifdef BIGFONTS
116 MAKEBIG = BIGFONTS=1
117 !endif
119 freetype:
120         cd $(LIBDIR)
121         $(FT_MAKE) /f $(FT_MAKEFILE) $(MAKEBIG) all
122         cd ..\test
124 freetype_debug:
125         cd $(LIBDIR)
126         $(FT_MAKE) /f $(FT_MAKEFILE) DEBUG=1 $(MAKEBIG) debug
127         cd ..\test
129 the_dll:
130         cd $(LIBDIR)
131         $(FT_MAKE) /f $(FT_MAKEFILE) DLL=1 $(MAKEBIG) dll
132         cd ..\test
133         -copy $(LIBDIR)\$(FT_DLL)
135 the_debug_dll:
136         cd $(LIBDIR)
137         $(FT_MAKE) /f $(FT_MAKEFILE) DEBUG=1 DLL=1 $(MAKEBIG) dll
138         cd ..\test
139         -copy $(LIBDIR)\$(FT_DLL)
142 # C compilers are unable to include 16-bit <windows.h> in ANSI mode.
143 # So we have a special rule for this file, to build it outside ANSI.
144 $(GDRIVER:.c=.obj):
145         @$(CC) /c /Fo$* @<<
146             $(CFLAGS) /Ze $(GDRIVER)
149 .obj.exe:
150         $(CC) /Fe$* @<<
151             $(LDFLAGS) $**
154 ftzoom.exe: $(GOBJ) ftzoom.obj common.obj $(LIBDIR)\libttf.lib
155 ftview.exe: $(GOBJ) ftview.obj common.obj $(LIBDIR)\libttf.lib
156 ftstring.exe: $(GOBJ) ftstring.obj common.obj $(LIBDIR)\libttf.lib
157 ftstrtto.exe: $(GOBJ) ftstrtto.obj common.obj arabic.obj $(LIBDIR)\libttf.lib
158 fttimer.exe: $(GOBJ) fttimer.obj common.obj $(LIBDIR)\libttf.lib
159 ftlint.exe: ftlint.obj common.obj $(LIBDIR)\libttf.lib
160 ftdump.exe: ftdump.obj common.obj $(LIBDIR)\libttf.lib
161 ftstrpnm.exe: ftstrpnm.obj common.obj $(LIBDIR)\libttf.lib
162 ftsbit.exe: ftsbit.obj common.obj $(LIBDIR)\libttf.lib
163 ftmetric.exe: ftmetric.obj common.obj $(LIBDIR)\libttf.lib
164 fterror.exe: fterror.obj common.obj $(LIBDIR)\libttf.lib
167 clean: do_clean
168         cd $(LIBDIR)
169         $(FT_MAKE) /f $(FT_MAKEFILE) clean
170         cd ..\test
172 distclean: do_clean
173         cd $(LIBDIR)
174         $(FT_MAKE) /f $(FT_MAKEFILE) distclean
175         cd ..\test
176         -del *.exe
177         -del *.dll
178         -del *.pdb
180 do_clean:
181         -del *.obj
182         -del $(ARCH)\*.obj
185 !include "$(ARCH)\depend.win"
187 # end of Makefile.VC