| 1 |
# Visual C++ 2.x, 4.x and 5.0 makefile for jpeg |
| 2 |
# adapted from suns example makefile (related to the TCL script language) |
| 3 |
# |
| 4 |
# CVS: $Id: makefile.vc,v 1.3 1997/02/17 17:07:52 aku Exp $ |
| 5 |
|
| 6 |
|
| 7 |
# Does not depend on the presence of any environment variables in |
| 8 |
# order to compile jpeg; all needed information is derived from |
| 9 |
# location of the compiler directories. |
| 10 |
|
| 11 |
# |
| 12 |
# Project directories |
| 13 |
# |
| 14 |
# ROOT = top of source tree |
| 15 |
# |
| 16 |
# TMPDIR = location where .obj files should be stored during build |
| 17 |
# |
| 18 |
# TOOLS32 = location of VC++ 32-bit development tools. Note that the |
| 19 |
# VC++ 2.0 header files are broken, so you need to use the |
| 20 |
# ones that come with the developer network CD's, or later |
| 21 |
# versions of VC++. |
| 22 |
# |
| 23 |
|
| 24 |
VC_VERSION = 50 |
| 25 |
|
| 26 |
ROOT = . |
| 27 |
TMPDIR = . |
| 28 |
!IF $(VC_VERSION) < 50 |
| 29 |
TOOLS32 = c:\msdev # VC++ 2.x and 4.x |
| 30 |
!ELSE |
| 31 |
TOOLS32 = c:\PROGRA~1\DevStudio\VC # VC++ 5.0 |
| 32 |
!ENDIF |
| 33 |
INSTALLDIR = c:\WINNT\SYSTEM32 |
| 34 |
|
| 35 |
# Set this to the appropriate value of /MACHINE: for your platform |
| 36 |
MACHINE = IX86 |
| 37 |
|
| 38 |
# Comment the following line to compile with symbols |
| 39 |
NODEBUG=1 |
| 40 |
|
| 41 |
|
| 42 |
###################################################################### |
| 43 |
# Do not modify below this line |
| 44 |
###################################################################### |
| 45 |
|
| 46 |
JPEG = jpeg62 |
| 47 |
JPEGLIB = $(JPEG).lib |
| 48 |
JPEGDLL = $(JPEG).dll |
| 49 |
|
| 50 |
JPEGOBJS = \ |
| 51 |
$(TMPDIR)\jcapimin.obj \ |
| 52 |
$(TMPDIR)\jcapistd.obj \ |
| 53 |
$(TMPDIR)\jccoefct.obj \ |
| 54 |
$(TMPDIR)\jccolor.obj \ |
| 55 |
$(TMPDIR)\jcdctmgr.obj \ |
| 56 |
$(TMPDIR)\jchuff.obj \ |
| 57 |
$(TMPDIR)\jcinit.obj \ |
| 58 |
$(TMPDIR)\jcmainct.obj \ |
| 59 |
$(TMPDIR)\jcmarker.obj \ |
| 60 |
$(TMPDIR)\jcmaster.obj \ |
| 61 |
$(TMPDIR)\jcomapi.obj \ |
| 62 |
$(TMPDIR)\jcparam.obj \ |
| 63 |
$(TMPDIR)\jcphuff.obj \ |
| 64 |
$(TMPDIR)\jcprepct.obj \ |
| 65 |
$(TMPDIR)\jcsample.obj \ |
| 66 |
$(TMPDIR)\jctrans.obj \ |
| 67 |
$(TMPDIR)\jdapimin.obj \ |
| 68 |
$(TMPDIR)\jdapistd.obj \ |
| 69 |
$(TMPDIR)\jdatadst.obj \ |
| 70 |
$(TMPDIR)\jdatasrc.obj \ |
| 71 |
$(TMPDIR)\jdcoefct.obj \ |
| 72 |
$(TMPDIR)\jdcolor.obj \ |
| 73 |
$(TMPDIR)\jddctmgr.obj \ |
| 74 |
$(TMPDIR)\jdhuff.obj \ |
| 75 |
$(TMPDIR)\jdinput.obj \ |
| 76 |
$(TMPDIR)\jdmainct.obj \ |
| 77 |
$(TMPDIR)\jdmarker.obj \ |
| 78 |
$(TMPDIR)\jdmaster.obj \ |
| 79 |
$(TMPDIR)\jdmerge.obj \ |
| 80 |
$(TMPDIR)\jdphuff.obj \ |
| 81 |
$(TMPDIR)\jdpostct.obj \ |
| 82 |
$(TMPDIR)\jdsample.obj \ |
| 83 |
$(TMPDIR)\jdtrans.obj \ |
| 84 |
$(TMPDIR)\jerror.obj \ |
| 85 |
$(TMPDIR)\jfdctflt.obj \ |
| 86 |
$(TMPDIR)\jfdctfst.obj \ |
| 87 |
$(TMPDIR)\jfdctint.obj \ |
| 88 |
$(TMPDIR)\jidctflt.obj \ |
| 89 |
$(TMPDIR)\jidctfst.obj \ |
| 90 |
$(TMPDIR)\jidctint.obj \ |
| 91 |
$(TMPDIR)\jidctred.obj \ |
| 92 |
$(TMPDIR)\jmemmgr.obj \ |
| 93 |
$(TMPDIR)\jmemnobs.obj \ |
| 94 |
$(TMPDIR)\jquant1.obj \ |
| 95 |
$(TMPDIR)\jquant2.obj \ |
| 96 |
$(TMPDIR)\jutils.obj |
| 97 |
|
| 98 |
|
| 99 |
PATH=$(TOOLS32)\bin;$(PATH) |
| 100 |
|
| 101 |
cc32 = $(TOOLS32)\bin\cl.exe |
| 102 |
link32 = $(TOOLS32)\bin\link.exe |
| 103 |
rc32 = $(TOOLS32)\bin\rc.exe |
| 104 |
include32 = -I$(TOOLS32)\include |
| 105 |
CP = copy |
| 106 |
RM = del |
| 107 |
|
| 108 |
JPEG_INCLUDES = -I$(ROOT) |
| 109 |
JPEG_DEFINES = -nologo -D__WIN32__ -DJPEG_DLL |
| 110 |
|
| 111 |
JPEG_CFLAGS = $(cdebug) $(cflags) $(cvarsdll) $(include32) \ |
| 112 |
$(JPEG_INCLUDES) $(JPEG_DEFINES) |
| 113 |
CON_CFLAGS = $(cdebug) $(cflags) $(cvars) $(include32) -DCONSOLE |
| 114 |
DOS_CFLAGS = $(cdebug) $(cflags) $(include16) -AL |
| 115 |
|
| 116 |
###################################################################### |
| 117 |
# Link flags |
| 118 |
###################################################################### |
| 119 |
|
| 120 |
!IFDEF NODEBUG |
| 121 |
ldebug = /RELEASE |
| 122 |
!ELSE |
| 123 |
ldebug = -debug:full -debugtype:cv |
| 124 |
!ENDIF |
| 125 |
|
| 126 |
# declarations common to all linker options |
| 127 |
lcommon = /NODEFAULTLIB /RELEASE /NOLOGO |
| 128 |
|
| 129 |
# declarations for use on Intel i386, i486, and Pentium systems |
| 130 |
!IF "$(MACHINE)" == "IX86" |
| 131 |
DLLENTRY = @12 |
| 132 |
lflags = $(lcommon) -align:0x1000 /MACHINE:$(MACHINE) |
| 133 |
!ELSE |
| 134 |
lflags = $(lcommon) /MACHINE:$(MACHINE) |
| 135 |
!ENDIF |
| 136 |
|
| 137 |
conlflags = $(lflags) -subsystem:console -entry:mainCRTStartup |
| 138 |
guilflags = $(lflags) -subsystem:windows -entry:WinMainCRTStartup |
| 139 |
dlllflags = $(lflags) -entry:_DllMainCRTStartup$(DLLENTRY) -dll |
| 140 |
|
| 141 |
!IF "$(MACHINE)" == "PPC" |
| 142 |
libc = libc.lib |
| 143 |
libcdll = crtdll.lib |
| 144 |
!ELSE |
| 145 |
libc = libc.lib oldnames.lib |
| 146 |
libcdll = msvcrt.lib oldnames.lib |
| 147 |
!ENDIF |
| 148 |
|
| 149 |
baselibs = kernel32.lib $(optlibs) advapi32.lib |
| 150 |
winlibs = $(baselibs) user32.lib gdi32.lib comdlg32.lib winspool.lib |
| 151 |
|
| 152 |
guilibs = $(libc) $(winlibs) |
| 153 |
conlibs = $(libc) $(baselibs) |
| 154 |
guilibsdll = $(libcdll) $(winlibs) |
| 155 |
conlibsdll = $(libcdll) $(baselibs) |
| 156 |
|
| 157 |
###################################################################### |
| 158 |
# Compile flags |
| 159 |
###################################################################### |
| 160 |
|
| 161 |
!IFDEF NODEBUG |
| 162 |
cdebug = -Ox -Oy- -Gs -GD |
| 163 |
!ELSE |
| 164 |
cdebug = -Z7 -Od -WX |
| 165 |
!ENDIF |
| 166 |
|
| 167 |
# declarations common to all compiler options |
| 168 |
ccommon = -c -W3 -nologo -YX -Dtry=__try -Dexcept=__except |
| 169 |
|
| 170 |
# NEED BYTEORDER INFORMATION HERE !! |
| 171 |
!IF "$(MACHINE)" == "IX86" |
| 172 |
cflags = $(ccommon) -D_X86_=1 |
| 173 |
!ELSE |
| 174 |
!IF "$(MACHINE)" == "MIPS" |
| 175 |
cflags = $(ccommon) -D_MIPS_=1 |
| 176 |
!ELSE |
| 177 |
!IF "$(MACHINE)" == "PPC" |
| 178 |
cflags = $(ccommon) -D_PPC_=1 |
| 179 |
!ELSE |
| 180 |
!IF "$(MACHINE)" == "ALPHA" |
| 181 |
cflags = $(ccommon) -D_ALPHA_=1 |
| 182 |
!ENDIF |
| 183 |
!ENDIF |
| 184 |
!ENDIF |
| 185 |
!ENDIF |
| 186 |
|
| 187 |
cvars = -DWIN32 -D_WIN32 |
| 188 |
cvarsmt = $(cvars) -D_MT |
| 189 |
cvarsdll = $(cvarsmt) -D_DLL |
| 190 |
|
| 191 |
###################################################################### |
| 192 |
# Project specific targets |
| 193 |
###################################################################### |
| 194 |
|
| 195 |
release: $(JPEGDLL) |
| 196 |
all: $(JPEGDLL) |
| 197 |
|
| 198 |
install: $(JPEGDLL) |
| 199 |
-@md $(INSTALLDIR) |
| 200 |
-@$(CP) $(JPEGDLL) $(INSTALLDIR) |
| 201 |
|
| 202 |
|
| 203 |
|
| 204 |
$(JPEGDLL): $(JPEGOBJS) |
| 205 |
$(link32) $(ldebug) $(dlllflags) \ |
| 206 |
$(guilibsdll) -out:$(JPEGDLL) $(JPEGOBJS) |
| 207 |
|
| 208 |
|
| 209 |
# |
| 210 |
# Implicit rules |
| 211 |
# |
| 212 |
|
| 213 |
{$(ROOT)}.c{$(TMPDIR)}.obj: |
| 214 |
$(cc32) $(JPEG_CFLAGS) -Fo$(TMPDIR)\ $< |
| 215 |
|
| 216 |
|
| 217 |
clean: |
| 218 |
-@del *.exp |
| 219 |
-@del *.lib |
| 220 |
-@del *.dll |
| 221 |
-@del $(TMPDIR)\*.obj |
| 222 |
-@del *.pch |
| 223 |
-@del *.pdb |