1
# This file is part of the FreeType project.
3
# It builds the library for Microsoft Visual C++ 1.x for 16-bit Windows,
4
# large model. It also works for Microsoft C/C++ v.7.0 16-bit compiler,
5
# but not for previous versions (see Makefile.MS instead).
9
# Use this file while in the lib directory with the following statement:
11
# nmake /f arch\win16\Makefile.VC
14
# A DLL version of the library can be built with
16
# nmake DLL=1 /f arch\win16\Makefile.VC dll
18
# Debug versions can be obtained with
20
# nmake DEBUG=1 /f arch\win16\Makefile.VC
22
# Special versions enabled to handle big fonts (with more than 16,384
23
# glyphs) can be obtained with
25
# nmake BIGFONTS=1 /f arch\win16\Makefile.VC
28
FT_MAKEFILE = $(ARCH)\Makefile.VC
32
LIB = lib /noignorecase /nologo
33
IMPLIB = implib /noignorecase /nologo
35
# One can also consider using "set MSC_CMD_FLAGS=/Gr /Op- /Gy /YX".
36
# With Microsoft C/C++ 7.0, use /G2 instead of /G3.
38
CFLAGS = /Ox /AL /Za /W2 /G3 -I$(ARCH) -I. -Iextend
41
CFLAGS = /Zi /Ge /AL /Za /W2 /G3 -I$(ARCH) -I. -Iextend
42
DLLFLAGS = /AL /Lw /Zi
45
FT_DEF = $(FT_DLL:.dll=.def)
47
CFLAGS = $(CFLAGS) /GD /GEf
49
CFLAGS = $(CFLAGS) /GA
54
CFLAGS = $(CFLAGS) /DTT_HUGE_PTR=__huge
56
TTFILE = $(ARCH)\hugefile.c
57
TTMEMORY = $(ARCH)\hugemem.c
60
TTMEMORY = .\ttmemory.c
64
PORT = $(TTFILE) $(TTMEMORY) $(TTMUTEX)
66
# Do not insert spaces between the file names or at end of line, otherwise
67
# the substitution for LIB command line will fail. Thank you.
69
SRC_X = extend\ftxgasp.c extend\ftxkern.c extend\ftxpost.c\
70
extend\ftxcmap.c extend\ftxwidth.c extend\ftxerr18.c extend\ftxsbit.c\
71
extend\ftxopen.c extend\ftxgsub.c extend\ftxgpos.c extend\ftxgdef.c
72
OBJS_X = $(SRC_X:.c=.obj)
74
SRC_M = ttapi.c ttcache.c ttcalc.c ttcmap.c ttdebug.c\
75
ttgload.c ttinterp.c ttload.c ttobjs.c ttraster.c ttextend.c $(PORT)
76
OBJS_M = $(SRC_M:.c=.obj) $(OBJS_X)
78
SRC_S = $(ARCH)\freetype.c
79
OBJ_S = $(SRC_S:.c=.obj)
80
OBJS_S = $(OBJ_S) $(OBJS_X)
83
# Since Microsoft's NMAKE does not handle $($(LIB_FILES)), and using
84
# LIB_FILES="$(OBJS_S)" will excess the capacity of COMMAND.COM, we cheat
85
# by constructing LIB's response file directly in the `all' target.
87
# Another solution, useful during debugging of part of the library,
88
# would be to include each .obj in the library as soon as it is compiled.
89
# See ..\msdos\Makefile.TC for an application.
97
# Skipped if DEBUG build
100
$(LIB) libttf.lib @<<response
108
$(LIB) libttf.lib @<<response
112
$(FT_DEF): $(ARCH)\ttf.def
113
-copy $(ARCH)\ttf.def $(FT_DEF)
115
dll $(FT_DLL): $(OBJS_M) $(FT_DEF)
117
$(CC) /Fe$(FT_DLL) @<<
120
$(IMPLIB) libttf.lib $(FT_DEF)
122
# Re-invoke with flag set. Unfortunately, this discards the other flags.
123
$(MAKE) DLL=1 /f $(ARCH)/Makefile.VC dll
128
copy $(FT_DLL) $(INSTALL_DIR)
130
copy $(FT_DLL) C:\WINDOWS
134
$(OBJ_S): $(SRC_S) $(SRC_M)
136
# Not used here because it excesses the capacity of COMMAND.COM...
137
libttf.lib: $(LIB_FILES)
138
$(LIB) $@ +-$(?: =-+);
167
-del $(FT_DLL:.dll=.def)
168
-del C:\WINDOWS\$(FT_DLL)
170
-del $(INSTALL_DIR)\$(FT_DLL)
173
!include "$(ARCH)\depend.win"