1# This file is part of the FreeType project. 2# 3# It builds the library and test programs for Microsoft C compilers 4# for 16-bit Windows, large model, using QuickWin to display console 5# outputs. It also works for Visual C++ 1.x 16-bits compiler, but 6# you should instead use the Makefile customized for it, Makefile.VC. 7# 8# You will need NMAKE. 9# 10# 11# Use this file while in the 'test' directory with the following statement: 12# 13# nmake /f arch\win16\Makefile.MS 14# 15# 16# A debug version can be obtained with 17# 18# nmake DEBUG=1 /f arch\win16\Makefile.MS 19 20ARCH = arch\win16 21FT_MAKEFILE = $(ARCH)\Makefile.MS 22FT_MAKE = $(MAKE) /nologo 23 24CC = cl /nologo 25 26LIBDIR = ..\lib 27INCDIRS = -I$(LIBDIR) -I$(LIBDIR)\$(ARCH) -I. -I$(LIBDIR)\extend 28 29!ifndef DEBUG 30CFLAGS = /Ox /AL /Za /W2 /G2 $(INCDIRS) 31LDFLAGS = /AL 32!else 33CFLAGS = /Zi /AL /Za /W2 /G2 $(INCDIRS) 34LDFLAGS = /Zi /AL 35!endif 36 37CFLAGS = $(CFLAGS) /GA /Mq 38LDFLAGS = $(LDFLAGS) /GA /Mq 39 40 41# Windows graphic driver 42GDRIVER = $(ARCH)\gw_win16.c 43 44GSRC = display.c gmain.c blitter.c $(GDRIVER) 45 46GOBJ = $(GSRC:.c=.obj) 47 48 49SRC = arabic.c \ 50 common.c \ 51 ftdump.c \ 52 fterror.c \ 53 ftlint.c \ 54 ftmetric.c \ 55 ftsbit.c \ 56 ftstring.c \ 57 ftstrpnm.c \ 58 ftstrtto.c \ 59 fttimer.c \ 60 ftview.c \ 61 ftzoom.c 62 63OBJ = $(SRC:.c=.obj) 64 65 66.c.obj: 67 @$(CC) /c /Fo$* @<< 68 $(CFLAGS) $< 69<< 70 71EXEFILES = ftdump.exe \ 72 fterror.exe \ 73 ftlint.exe \ 74 ftmetric.exe \ 75 ftsbit.exe \ 76 ftstring.exe \ 77 ftstrpnm.exe \ 78 ftstrtto.exe \ 79 fttimer.exe \ 80 ftview.exe \ 81 ftzoom.exe 82 83!ifndef DEBUG 84# Skiped if DEBUG build 85all: freetype $(EXEFILES) 86 87!endif 88 89debug: freetype_debug $(EXEFILES) 90 91freetype: 92 cd $(LIBDIR) 93 $(FT_MAKE) /f $(FT_MAKEFILE) all 94 cd ..\test 95 96freetype_debug: 97 cd $(LIBDIR) 98 $(FT_MAKE) /f $(FT_MAKEFILE) DEBUG=1 debug 99 cd ..\test 100 101 102# C compilers are unable to include 16-bit <windows.h> in ANSI mode. 103# So we have a special rule for this file, to build it outside ANSI. 104$(GDRIVER:.c=.obj): 105 @$(CC) /c /Fo$* @<< 106 $(CFLAGS) /Ze $(GDRIVER) 107<< 108 109.obj.exe: 110 $(CC) /Fe$* @<< 111 $(LDFLAGS) $** 112<< 113 114ftzoom.exe: $(GOBJ) ftzoom.obj common.obj $(LIBDIR)\libttf.lib 115ftview.exe: $(GOBJ) ftview.obj common.obj $(LIBDIR)\libttf.lib 116ftstring.exe: $(GOBJ) ftstring.obj common.obj $(LIBDIR)\libttf.lib 117ftstrtto.exe: $(GOBJ) ftstrtto.obj common.obj arabic.obj $(LIBDIR)\libttf.lib 118fttimer.exe: $(GOBJ) fttimer.obj common.obj $(LIBDIR)\libttf.lib 119ftlint.exe: ftlint.obj common.obj $(LIBDIR)\libttf.lib 120ftdump.exe: ftdump.obj common.obj $(LIBDIR)\libttf.lib 121ftstrpnm.exe: ftstrpnm.obj common.obj $(LIBDIR)\libttf.lib 122ftsbit.exe: ftsbit.obj common.obj $(LIBDIR)\libttf.lib 123ftmetric.exe: ftmetric.obj common.obj $(LIBDIR)\libttf.lib 124fterror.exe: fterror.obj common.obj $(LIBDIR)\libttf.lib 125 126 127clean: do_clean 128 cd $(LIBDIR) 129 $(FT_MAKE) /f $(FT_MAKEFILE) clean 130 cd ..\test 131 132distclean: do_clean 133 cd $(LIBDIR) 134 $(FT_MAKE) /f $(FT_MAKEFILE) distclean 135 cd ..\test 136 -del *.exe 137 138do_clean: 139 -del *.obj 140 -del $(ARCH)\*.obj 141 142 143!include "$(ARCH)\depend.win" 144 145# end of Makefile.MS 146