1# This file is part of the FreeType project. 2# 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. 6# 7# You will need NMAKE. 8# 9# 10# Use this file while in the 'test' directory with the following statement: 11# 12# nmake /f arch\win16\Makefile.VC 13# 14# A DLL version of the library can be built and then used with 15# 16# nmake DLL=1 /f arch\win16\Makefile.VC dll 17# 18# (do not forget to define DLL, otherwise the link phase will fail). 19# 20# 21# Debug versions can be obtained with 22# 23# nmake DEBUG=1 /f arch\win16\Makefile.VC 24# 25# Special versions enabled to handle big fonts (with more than 16,384 26# glyphs) can be obtained with 27# 28# nmake BIGFONTS=1 /f arch\win16\Makefile.VC 29 30ARCH = arch\win16 31FT_MAKEFILE = $(ARCH)\Makefile.VC 32FT_MAKE = $(MAKE) /nologo 33FT_DLL = ft13_16.dll 34 35CC = cl /nologo 36 37LIBDIR = ..\lib 38INCDIRS = -I$(LIBDIR) -I$(LIBDIR)\$(ARCH) -I. -I$(LIBDIR)\extend 39 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 43CFLAGS = /Ox /AL /Za /W2 /G3 $(INCDIRS) 44LDFLAGS = /AL 45!else 46CFLAGS = /Zi /Ge /AL /Za /W2 /G3 $(INCDIRS) 47LDFLAGS = /Zi /AL 48!endif 49 50CFLAGS = $(CFLAGS) /Mq 51LDFLAGS = $(LDFLAGS) /Mq 52 53!ifdef DLL 54CFLAGS = $(CFLAGS) /DFREETYPE_DLL 55!endif 56 57 58# Windows graphic driver 59GDRIVER = $(ARCH)\gw_win16.c 60 61GSRC = display.c gmain.c blitter.c $(GDRIVER) 62 63GOBJ = $(GSRC:.c=.obj) 64 65 66SRC = 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 79 80OBJ = $(SRC:.c=.obj) 81 82 83.c.obj: 84 @$(CC) /c /Fo$* @<< 85 $(CFLAGS) $< 86<< 87 88EXEFILES = 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 99 100!ifndef DEBUG 101# Skiped if DEBUG build 102all: freetype $(EXEFILES) 103 104dll: the_dll $(EXEFILES) 105 106!else 107# Skipped if non-DEBUG build 108default_target: debug 109dll: the_debug_dll $(EXEFILES) 110 111!endif 112 113debug: freetype_debug $(EXEFILES) 114 115!ifdef BIGFONTS 116MAKEBIG = BIGFONTS=1 117!endif 118 119freetype: 120 cd $(LIBDIR) 121 $(FT_MAKE) /f $(FT_MAKEFILE) $(MAKEBIG) all 122 cd ..\test 123 124freetype_debug: 125 cd $(LIBDIR) 126 $(FT_MAKE) /f $(FT_MAKEFILE) DEBUG=1 $(MAKEBIG) debug 127 cd ..\test 128 129the_dll: 130 cd $(LIBDIR) 131 $(FT_MAKE) /f $(FT_MAKEFILE) DLL=1 $(MAKEBIG) dll 132 cd ..\test 133 -copy $(LIBDIR)\$(FT_DLL) 134 135the_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) 140 141 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) 147<< 148 149.obj.exe: 150 $(CC) /Fe$* @<< 151 $(LDFLAGS) $** 152<< 153 154ftzoom.exe: $(GOBJ) ftzoom.obj common.obj $(LIBDIR)\libttf.lib 155ftview.exe: $(GOBJ) ftview.obj common.obj $(LIBDIR)\libttf.lib 156ftstring.exe: $(GOBJ) ftstring.obj common.obj $(LIBDIR)\libttf.lib 157ftstrtto.exe: $(GOBJ) ftstrtto.obj common.obj arabic.obj $(LIBDIR)\libttf.lib 158fttimer.exe: $(GOBJ) fttimer.obj common.obj $(LIBDIR)\libttf.lib 159ftlint.exe: ftlint.obj common.obj $(LIBDIR)\libttf.lib 160ftdump.exe: ftdump.obj common.obj $(LIBDIR)\libttf.lib 161ftstrpnm.exe: ftstrpnm.obj common.obj $(LIBDIR)\libttf.lib 162ftsbit.exe: ftsbit.obj common.obj $(LIBDIR)\libttf.lib 163ftmetric.exe: ftmetric.obj common.obj $(LIBDIR)\libttf.lib 164fterror.exe: fterror.obj common.obj $(LIBDIR)\libttf.lib 165 166 167clean: do_clean 168 cd $(LIBDIR) 169 $(FT_MAKE) /f $(FT_MAKEFILE) clean 170 cd ..\test 171 172distclean: do_clean 173 cd $(LIBDIR) 174 $(FT_MAKE) /f $(FT_MAKEFILE) distclean 175 cd ..\test 176 -del *.exe 177 -del *.dll 178 -del *.pdb 179 180do_clean: 181 -del *.obj 182 -del $(ARCH)\*.obj 183 184 185!include "$(ARCH)\depend.win" 186 187# end of Makefile.VC 188