1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198
|
# Visual C++ 2.x, 4.x and 5.0 makefile for zlib 1.1.3 (generates 32bit-dll)
# adapted from suns example makefile (related to the TCL script language)
#
# CVS: $Id: makefile.vc,v 1.1.1.1 2002/05/10 17:20:14 andreas_kupries Exp $
#
# If you wish to reduce the memory requirements (default 256K for big
# objects plus a few K), you can add to CFLAGS below:
# -DMAX_MEM_LEVEL=7 -DMAX_WBITS=14
# See zconf.h for details about the memory requirements.
# Does not depend on the presence of any environment variables in
# order to compile zlib; all needed information is derived from
# location of the compiler directories.
#
# Project directories
#
# ROOT = top of source tree
#
# TMPDIR = location where .obj files should be stored during build
#
# TOOLS32 = location of VC++ 32-bit development tools. Note that the
# VC++ 2.0 header files are broken, so you need to use the
# ones that come with the developer network CD's, or later
# versions of VC++.
#
# INSTALLDIR = directory to install the generated DLL into.
#
VC_VERSION = 50
ROOT = .
TMPDIR = .
!IF $(VC_VERSION) < 50
TOOLS32 = c:\msdev # VC++ 2.x and 4.x
!ELSE
TOOLS32 = c:\PROGRA~1\DevStudio\VC # VC++ 5.0
!ENDIF
INSTALLDIR = c:\WINNT\SYSTEM32
# Set this to the appropriate value of /MACHINE: for your platform
MACHINE = IX86
# Comment the following line to compile with symbols
NODEBUG=1
######################################################################
# Do not modify below this line
######################################################################
ZLIB = zlib
ZLIBLIB = $(ZLIB).lib
ZLIBDLL = $(ZLIB).dll
ZLIBOBJS = \
$(TMPDIR)\adler32.obj \
$(TMPDIR)\compress.obj \
$(TMPDIR)\crc32.obj \
$(TMPDIR)\deflate.obj \
$(TMPDIR)\gzio.obj \
$(TMPDIR)\infblock.obj \
$(TMPDIR)\infcodes.obj \
$(TMPDIR)\inffast.obj \
$(TMPDIR)\inflate.obj \
$(TMPDIR)\inftrees.obj \
$(TMPDIR)\infutil.obj \
$(TMPDIR)\trees.obj \
$(TMPDIR)\uncompr.obj \
$(TMPDIR)\zutil.obj
PATH=$(TOOLS32)\bin;$(PATH)
cc32 = $(TOOLS32)\bin\cl.exe
link32 = $(TOOLS32)\bin\link.exe
include32 = -I$(TOOLS32)\include
CP = copy
RM = del
ZLIB_INCLUDES = -I$(ROOT)
ZLIB_DEFINES = -nologo -D__WIN32__ -DZLIB_DLL
ZLIB_CFLAGS = $(cdebug) $(cflags) $(cvarsdll) $(include32) \
$(ZLIB_INCLUDES) $(ZLIB_DEFINES)
CON_CFLAGS = $(cdebug) $(cflags) $(cvars) $(include32) -DCONSOLE
DOS_CFLAGS = $(cdebug) $(cflags) $(include16) -AL
######################################################################
# Link flags
######################################################################
!IFDEF NODEBUG
ldebug = /RELEASE
!ELSE
ldebug = -debug:full -debugtype:cv
!ENDIF
# declarations common to all linker options
lcommon = /NODEFAULTLIB /RELEASE /NOLOGO
# declarations for use on Intel i386, i486, and Pentium systems
!IF "$(MACHINE)" == "IX86"
DLLENTRY = @12
lflags = $(lcommon) -align:0x1000 /MACHINE:$(MACHINE)
!ELSE
lflags = $(lcommon) /MACHINE:$(MACHINE)
!ENDIF
conlflags = $(lflags) -subsystem:console -entry:mainCRTStartup
guilflags = $(lflags) -subsystem:windows -entry:WinMainCRTStartup
dlllflags = $(lflags) -entry:_DllMainCRTStartup$(DLLENTRY) -dll
!IF "$(MACHINE)" == "PPC"
libc = libc.lib
libcdll = crtdll.lib
!ELSE
libc = libc.lib oldnames.lib
libcdll = msvcrt.lib oldnames.lib
!ENDIF
baselibs = kernel32.lib $(optlibs) advapi32.lib
winlibs = $(baselibs) user32.lib gdi32.lib comdlg32.lib winspool.lib
guilibs = $(libc) $(winlibs)
conlibs = $(libc) $(baselibs)
guilibsdll = $(libcdll) $(winlibs)
conlibsdll = $(libcdll) $(baselibs)
######################################################################
# Compile flags
######################################################################
!IFDEF NODEBUG
cdebug = -Ox -Oy- -Gs -GD
!ELSE
cdebug = -Z7 -Od -WX
!ENDIF
# declarations common to all compiler options
ccommon = -c -W3 -nologo -YX -DWIN32 -D_WINDOWS -DZLIB_DLL
# NEED BYTEORDER INFORMATION HERE !!
!IF "$(MACHINE)" == "IX86"
cflags = $(ccommon) -D_X86_=1
!ELSE
!IF "$(MACHINE)" == "MIPS"
cflags = $(ccommon) -D_MIPS_=1
!ELSE
!IF "$(MACHINE)" == "PPC"
cflags = $(ccommon) -D_PPC_=1
!ELSE
!IF "$(MACHINE)" == "ALPHA"
cflags = $(ccommon) -D_ALPHA_=1
!ENDIF
!ENDIF
!ENDIF
!ENDIF
cvars = -DWIN32 -D_WIN32
cvarsmt = $(cvars) -D_MT
cvarsdll = $(cvarsmt) -D_DLL
######################################################################
# Project specific targets
######################################################################
release: $(ZLIBLIB)
all: $(ZLIBLIB)
install: $(ZLIBLIB)
-@md $(INSTALLDIR)
-@$(CP) $(ZLIBDLL) $(INSTALLDIR)
$(ZLIBDLL): $(ZLIBOBJS)
$(link32) $(ldebug) $(dlllflags) -def:nt\zlib.dnt \
$(guilibsdll) -out:$(ZLIBDLL) $(ZLIBOBJS)
$(ZLIBLIB): $(ZLIBDLL)
#
# Implicit rules
#
{$(ROOT)}.c{$(TMPDIR)}.obj:
$(cc32) $(ZLIB_CFLAGS) -Fo$(TMPDIR)\ $<
clean:
-@del *.exp
-@del *.lib
-@del *.dll
-@del $(TMPDIR)\*.obj
-@del *.pch
-@del *.pdb
|