~ubuntu-branches/ubuntu/gutsy/vnc4/gutsy

« back to all changes in this revision

Viewing changes to unix/xc/extras/FreeType/lib/arch/win16/Makefile.VC

  • Committer: Bazaar Package Importer
  • Author(s): Ola Lundqvist
  • Date: 2006-05-15 20:35:17 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20060515203517-l4lre1ku942mn26k
Tags: 4.1.1+X4.3.0-10
* Correction of critical security issue. Thanks to Martin Kogler
  <e9925248@student.tuwien.ac.at> that informed me about the issue,
  and provided the patch.
  This flaw was originally found by Steve Wiseman of intelliadmin.com.
* Applied patch from Javier Kohen <jkohen@users.sourceforge.net> that
  inform the user that only 8 first characters of the password will
  actually be used when typing more than 8 characters, closes:
  #355619.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# This file is part of the FreeType project.
 
2
#
 
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).
 
6
#
 
7
# You will need NMAKE.
 
8
#
 
9
# Use this file while in the lib directory with the following statement:
 
10
#
 
11
#   nmake /f arch\win16\Makefile.VC
 
12
#
 
13
#
 
14
# A DLL version of the library can be built with
 
15
#
 
16
#   nmake DLL=1 /f arch\win16\Makefile.VC dll
 
17
#
 
18
# Debug versions can be obtained with
 
19
#
 
20
#   nmake DEBUG=1 /f arch\win16\Makefile.VC
 
21
#
 
22
# Special versions enabled to handle big fonts (with more than 16,384
 
23
# glyphs) can be obtained with
 
24
#
 
25
#   nmake BIGFONTS=1 /f arch\win16\Makefile.VC
 
26
 
 
27
ARCH = arch\win16
 
28
FT_MAKEFILE = $(ARCH)\Makefile.VC
 
29
FT_DLL = ft13_16.dll
 
30
 
 
31
CC = cl /nologo
 
32
LIB = lib /noignorecase /nologo
 
33
IMPLIB = implib /noignorecase /nologo
 
34
 
 
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.
 
37
!ifndef DEBUG
 
38
CFLAGS =     /Ox /AL /Za /W2 /G3 -I$(ARCH) -I. -Iextend
 
39
DLLFLAGS =  /AL /Ld
 
40
!else
 
41
CFLAGS = /Zi /Ge /AL /Za /W2 /G3 -I$(ARCH) -I. -Iextend
 
42
DLLFLAGS =  /AL /Lw /Zi
 
43
!endif
 
44
 
 
45
FT_DEF = $(FT_DLL:.dll=.def)
 
46
!ifdef DLL
 
47
CFLAGS = $(CFLAGS) /GD /GEf
 
48
!else
 
49
CFLAGS = $(CFLAGS) /GA
 
50
!endif
 
51
 
 
52
 
 
53
!ifdef BIGFONTS
 
54
CFLAGS = $(CFLAGS) /DTT_HUGE_PTR=__huge
 
55
 
 
56
TTFILE = $(ARCH)\hugefile.c
 
57
TTMEMORY = $(ARCH)\hugemem.c
 
58
!else
 
59
TTFILE = .\ttfile.c
 
60
TTMEMORY = .\ttmemory.c
 
61
!endif
 
62
TTMUTEX = .\ttmutex.c
 
63
 
 
64
PORT = $(TTFILE) $(TTMEMORY) $(TTMUTEX)
 
65
 
 
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.
 
68
#
 
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)
 
73
 
 
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)
 
77
 
 
78
SRC_S = $(ARCH)\freetype.c
 
79
OBJ_S = $(SRC_S:.c=.obj)
 
80
OBJS_S = $(OBJ_S) $(OBJS_X)
 
81
 
 
82
 
 
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.
 
86
#
 
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.
 
90
.c.obj:
 
91
        @$(CC) /c /Fo$@ @<<
 
92
            $(CFLAGS) $*.c
 
93
<<
 
94
 
 
95
 
 
96
!ifndef DEBUG
 
97
# Skipped if DEBUG build
 
98
all: $(OBJS_S)
 
99
        -del libttf.lib
 
100
        $(LIB) libttf.lib @<<response
 
101
+ $(OBJS_S: = + );
 
102
<<KEEP
 
103
!endif
 
104
 
 
105
 
 
106
debug: $(OBJS_M)
 
107
        -del libttf.lib
 
108
        $(LIB) libttf.lib @<<response
 
109
+ $(OBJS_M: = + );
 
110
<<KEEP
 
111
 
 
112
$(FT_DEF): $(ARCH)\ttf.def
 
113
        -copy $(ARCH)\ttf.def $(FT_DEF)
 
114
 
 
115
dll $(FT_DLL): $(OBJS_M) $(FT_DEF)
 
116
!ifdef DLL
 
117
        $(CC) /Fe$(FT_DLL) @<<
 
118
              $(DLLFLAGS) $**
 
119
<<
 
120
        $(IMPLIB) libttf.lib $(FT_DEF)
 
121
!else
 
122
# Re-invoke with flag set.  Unfortunately, this discards the other flags.
 
123
        $(MAKE) DLL=1 /f $(ARCH)/Makefile.VC dll
 
124
!endif
 
125
 
 
126
install: $(FT_DLL)
 
127
!ifdef INSTALL_DIR
 
128
        copy $(FT_DLL) $(INSTALL_DIR)
 
129
!else
 
130
        copy $(FT_DLL) C:\WINDOWS
 
131
!endif
 
132
 
 
133
 
 
134
$(OBJ_S): $(SRC_S) $(SRC_M)
 
135
 
 
136
# Not used here because it excesses the capacity of COMMAND.COM...
 
137
libttf.lib: $(LIB_FILES)
 
138
        $(LIB) $@ +-$(?: =-+);
 
139
 
 
140
!ifdef BIGFONTS
 
141
$(TTFILE:.c=.obj):
 
142
        $(CC) /c /Fo$@ @<<
 
143
                 $(CFLAGS) /Ze $*.c
 
144
 
 
145
$(TTMEMORY:.c=.obj):
 
146
        $(CC) /c /Fo$@ @<<
 
147
                 $(CFLAGS) /Ze $*.c
 
148
<<
 
149
 
 
150
$(OBJ_S):
 
151
        $(CC) /c /Fo$@ @<<
 
152
                 $(CFLAGS) /Ze $*.c
 
153
<<
 
154
!endif
 
155
 
 
156
 
 
157
clean:
 
158
        -del *.obj
 
159
        -del extend\*.obj
 
160
        -del $(ARCH)\*.obj
 
161
        -del libttf.bak
 
162
        -del response
 
163
 
 
164
distclean: clean
 
165
        -del libttf.lib
 
166
        -del *.dll
 
167
        -del $(FT_DLL:.dll=.def)
 
168
        -del C:\WINDOWS\$(FT_DLL)
 
169
!ifdef INSTALL_DIR
 
170
        -del $(INSTALL_DIR)\$(FT_DLL)
 
171
!endif
 
172
 
 
173
!include "$(ARCH)\depend.win"
 
174
 
 
175
# end of Makefile.VC