# This file is part of the FreeType project. # # It builds the library for Microsoft Visual C++ for 32-bit Windows. # # You will need NMAKE. # # Use this file while in the lib directory with the following statement: # # nmake /f arch\win32\Makefile.CL # # # A DLL version of the library can be built with # # nmake DLL=1 /f arch\win32\Makefile.CL dll # # Debug versions can be obtained with # # nmake DEBUG=1 /f arch\win32\Makefile.CL ARCH = arch\win32 FT_MAKEFILE = $(ARCH)\Makefile.CL FT_DLL = ft13_32.dll CC = cl /nologo LIB = lib /nologo LINK = link /nologo CFLAGS = /Za /W2 -I$(ARCH) -I. -Iextend !ifndef DEBUG CFLAGS = $(CFLAGS) /Ox DLLFLAGS = /RELEASE !else CFLAGS = $(CFLAGS) /Zi /Ge DLLFLAGS = /DEBUG !endif !ifdef DLL CFLAGS = $(CFLAGS) /GD \ /DEXPORT_DEF=__declspec(dllexport) /DEXPORT_FUNC=__declspec(dllexport) !else CFLAGS = $(CFLAGS) /GA !endif TTFILE = .\ttfile.c TTMEMORY = .\ttmemory.c TTMUTEX = .\ttmutex.c PORT = $(TTFILE) $(TTMEMORY) $(TTMUTEX) # Do not insert spaces between the file names or at end of line, otherwise # the substitution for LIB command line will fail. Thank you. # SRC_X = extend\ftxgasp.c extend\ftxkern.c extend\ftxpost.c\ extend\ftxcmap.c extend\ftxwidth.c extend\ftxerr18.c extend\ftxsbit.c\ extend\ftxopen.c extend\ftxgsub.c extend\ftxgpos.c extend\ftxgdef.c OBJS_X = $(SRC_X:.c=.obj) SRC_M = ttapi.c ttcache.c ttcalc.c ttcmap.c ttdebug.c\ ttgload.c ttinterp.c ttload.c ttobjs.c ttraster.c ttextend.c $(PORT) OBJS_M = $(SRC_M:.c=.obj) $(OBJS_X) SRC_S = $(ARCH)\freetype.c OBJ_S = $(SRC_S:.c=.obj) OBJS_S = $(OBJ_S) $(OBJS_X) # Since Microsoft's NMAKE does not handle $($(LIB_FILES)), and using # LIB_FILES="$(OBJS_S)" will excess the capacity of COMMAND.COM, we cheat # by constructing LIB's response file directly in the `all' target. # # Another solution, useful during debugging of part of the library, # would be to include each .obj in the library as soon as it is compiled. # See ..\msdos\Makefile.TC for an application. .c.obj: @$(CC) /c /Fo$@ @<< $(CFLAGS) $*.c << !ifndef DEBUG # Skipped if DEBUG build all: $(OBJS_S) -del libttf.lib $(LIB) /OUT:libttf.lib @<