1# This file is part of the FreeType project. 2# 3# It builds the library for Microsoft C for MS-DOS, large model. 4# It also works for Visual C++ 1.x 16-bits compiler, but you should 5# instead use the Makefile customized for it, Makefile.VC. 6# Due to size constraints, it does not try to pack all modules into one. 7# 8# You will need NMAKE. 9# 10# Use this file while in the lib directory with the following statement: 11# 12# nmake /f arch\msdos\Makefile.MS 13# 14# 15# A debug version can be obtained with 16# 17# nmake DEBUG=1 /f arch\msdos\Makefile.MS 18# 19# A special version enabled to handle big fonts (with more than 16,384 20# glyphs) can be obtained with 21# 22# nmake BIGFONTS=1 /f arch\msdos\Makefile.MS 23 24ARCH = arch\msdos 25FT_MAKEFILE = $(ARCH)\Makefile.MS 26 27CC = cl /nologo 28LIB = lib /noignorecase /nologo 29 30!ifndef DEBUG 31CFLAGS = /Ox /AL /W2 /G2 /I$(ARCH) /I. /Iextend 32!else 33CFLAGS = /Zi /AL /W2 /G2 /I$(ARCH) /I. /Iextend 34!endif 35 36 37!ifndef BIGFONTS 38CFLAGS = $(CFLAGS) /Za 39 40TTFILE = .\ttfile.c 41TTMEMORY = .\ttmemory.c 42!else 43CFLAGS = $(CFLAGS) /DTT_HUGE_PTR=__huge /Ze 44 45TTFILE = $(ARCH)\hugefile.c 46TTMEMORY = $(ARCH)\hugemem.c 47!endif 48 49TTMUTEX = .\ttmutex.c 50 51PORT = $(TTFILE) $(TTMEMORY) $(TTMUTEX) 52 53# Do not insert spaces between the file names or at end of line, otherwise 54# the substitution for LIB command line will fail. Thank you. 55# 56SRC_X = extend\ftxgasp.c extend\ftxkern.c extend\ftxpost.c\ 57extend\ftxcmap.c extend\ftxwidth.c extend\ftxerr18.c extend\ftxsbit.c\ 58extend\ftxopen.c extend\ftxgsub.c extend\ftxgpos.c extend\ftxgdef.c 59OBJS_X = $(SRC_X:.c=.obj) 60 61SRC_M = ttapi.c ttcache.c ttcalc.c ttcmap.c ttdebug.c\ 62ttgload.c ttinterp.c ttload.c ttobjs.c ttraster.c ttextend.c $(PORT) 63OBJS_M = $(SRC_M:.c=.obj) $(OBJS_X) 64 65SRC_S = $(ARCH)\freetype.c 66OBJ_S = $(SRC_S:.c=.obj) 67OBJS_S = $(OBJ_S) $(OBJS_X) 68 69 70# Since Microsoft's NMAKE does not handle $($(LIB_FILES)), and using 71# LIB_FILES="$(OBJS_S)" will excess the capacity of COMMAND.COM, we cheat 72# by constructing LIB's response file directly in the `all' target. 73# 74# Another solution, useful during debugging of part of the library, 75# would be to include each .obj in the library as soon as it is compiled. 76# It is commented out below. See Makefile.TC for an application. 77.c.obj: 78 @$(CC) /c /Fo$@ @<< 79 $(CFLAGS) $*.c 80<< 81# $(LIB) libttf +-$*.obj 82 83 84!ifndef DEBUG 85# Skipped if DEBUG build 86# (but it changes nothing, since we always build in multiple parts). 87all: $(OBJS_M) 88 -del libttf.lib 89 $(LIB) libttf.lib @<<response 90+ $(OBJS_M: = ^ ); 91<<KEEP 92!endif 93 94debug: $(OBJS_M) 95 -del libttf.lib 96 $(LIB) libttf.lib @<<response 97+ $(OBJS_M: = ^ ); 98<<KEEP 99 100$(OBJ_S): $(SRC_S) $(SRC_M) 101 102# Not used here because it excesses the capacity of COMMAND.COM... 103libttf.lib: $(LIB_FILES) 104 $(LIB) $@ +-$(?: =-+); 105 106clean: 107 -del *.obj 108 -del extend\*.obj 109 -del $(ARCH)\*.obj 110 -del response 111 112distclean: clean 113 -del libttf.lib 114 115!include "$(ARCH)\depend.dos" 116 117# end of Makefile.MS 118