1 --- Makefile.vc.sav 2021-07-30 00:55:37.000000000 +0200
2 +++ Makefile.vc 2022-01-25 17:35:30.206117700 +0100
4 LIBSHARPYUV_BASENAME = libsharpyuv
7 -!IF ! [ cl 2>&1 | find "x86" > NUL ]
8 +!IF ! [ $(CC) 2>&1 | grep -q "x86" > NUL ]
10 -!ELSE IF ! [ cl 2>&1 | find "x64" > NUL ]
11 +!ELSE IF ! [ $(CC) 2>&1 | grep -q "x64" > NUL ]
13 -!ELSE IF ! [ cl 2>&1 | find "ARM64" > NUL ]
14 +!ELSE IF ! [ $(CC) 2>&1 | grep -q "ARM64" > NUL ]
16 -!ELSE IF ! [ cl 2>&1 | find "ARM" > NUL ]
17 +!ELSE IF ! [ $(CC) 2>&1 | grep -q "ARM" > NUL ]
20 !ERROR Unable to auto-detect toolchain architecture! \
22 ## Nothing more to do below this line!
25 -CCNODBG = cl.exe $(NOLOGO) /O2 /DNDEBUG
26 -CCDEBUG = cl.exe $(NOLOGO) /Od /Zi /D_DEBUG /RTC1
27 +CCNODBG = $(CC) $(NOLOGO) /O2 /DNDEBUG
28 +CCDEBUG = $(CC) $(NOLOGO) /Od /Zi /D_DEBUG /RTC1
29 CFLAGS = /I. /Isrc $(NOLOGO) /W3 /EHsc /c
30 CFLAGS = $(CFLAGS) /DWIN32 /D_CRT_SECURE_NO_WARNINGS /DWIN32_LEAN_AND_MEAN
31 LDFLAGS = /LARGEADDRESSAWARE /MANIFEST:EMBED /NXCOMPAT /DYNAMICBASE
36 -DIRBASE = $(OUTDIR)\$(CFG)\$(ARCH)
38 DIROBJ = $(DIRBASE)\obj
39 DIRLIB = $(DIRBASE)\lib
40 DIRINC = $(DIRBASE)\include
43 # Target configuration
44 !IF "$(CFG)" == "release-static"
48 !ELSE IF "$(CFG)" == "debug-static"
53 LIBWEBPDECODER_BASENAME = $(LIBWEBPDECODER_BASENAME)_debug
55 LIBWEBPDEMUX_BASENAME = $(LIBWEBPDEMUX_BASENAME)_debug
56 LIBSHARPYUV_BASENAME = $(LIBSHARPYUV_BASENAME)_debug
57 !ELSE IF "$(CFG)" == "release-dynamic"
62 !ELSE IF "$(CFG)" == "debug-dynamic"
71 !IF "$(STATICLIBBUILD)" == "TRUE"
73 +CC_ = $(CC_) $(RTLIB)
75 LIBWEBPDECODER = $(DIRLIB)\$(LIBWEBPDECODER_BASENAME).lib
76 LIBWEBP = $(DIRLIB)\$(LIBWEBP_BASENAME).lib
78 LIBWEBPDEMUX = $(DIRLIB)\$(LIBWEBPDEMUX_BASENAME).lib
79 LIBSHARPYUV = $(DIRLIB)\$(LIBSHARPYUV_BASENAME).lib
80 !ELSE IF "$(DLLBUILD)" == "TRUE"
81 -CC = $(CC) /I$(DIROBJ) $(RTLIB) /DWEBP_DLL
82 +CC_ = $(CC_) /I$(DIROBJ) $(RTLIB) /DWEBP_DLL
83 LIBWEBPDECODER = $(DIRLIB)\$(LIBWEBPDECODER_BASENAME)_dll.lib
84 LIBWEBP = $(DIRLIB)\$(LIBWEBP_BASENAME)_dll.lib
85 LIBWEBPMUX = $(DIRLIB)\$(LIBWEBPMUX_BASENAME)_dll.lib
88 !IF "$(DLLBUILD)" == "TRUE"
89 {$(DIROBJ)}.c{$(DIROBJ)}.obj:
90 - $(CC) $(CFLAGS) /Fd$(LIBWEBP_PDBNAME) /Fo$@ $<
91 + $(CC_) $(CFLAGS) /Fd$(LIBWEBP_PDBNAME) /Fo$@ $<
93 {src}.rc{$(DIROBJ)}.res:
96 # File-specific flag builds. Note batch rules take precedence over wildcards,
97 # so for now name each file individually.
98 $(DIROBJ)\examples\anim_diff.obj: examples\anim_diff.c
99 - $(CC) $(CFLAGS) /DWEBP_HAVE_GIF /Fd$(LIBWEBP_PDBNAME) \
100 + $(CC_) $(CFLAGS) /DWEBP_HAVE_GIF /Fd$(LIBWEBP_PDBNAME) \
101 /Fo$(DIROBJ)\examples\ examples\$(@B).c
102 $(DIROBJ)\examples\anim_dump.obj: examples\anim_dump.c
103 - $(CC) $(CFLAGS) /DWEBP_HAVE_GIF /Fd$(LIBWEBP_PDBNAME) \
104 + $(CC_) $(CFLAGS) /DWEBP_HAVE_GIF /Fd$(LIBWEBP_PDBNAME) \
105 /Fo$(DIROBJ)\examples\ examples\$(@B).c
106 $(DIROBJ)\examples\anim_util.obj: examples\anim_util.c
107 - $(CC) $(CFLAGS) /DWEBP_HAVE_GIF /Fd$(LIBWEBP_PDBNAME) \
108 + $(CC_) $(CFLAGS) /DWEBP_HAVE_GIF /Fd$(LIBWEBP_PDBNAME) \
109 /Fo$(DIROBJ)\examples\ examples\$(@B).c
110 $(DIROBJ)\examples\gif2webp.obj: examples\gif2webp.c
111 - $(CC) $(CFLAGS) /DWEBP_HAVE_GIF /Fd$(LIBWEBP_PDBNAME) \
112 + $(CC_) $(CFLAGS) /DWEBP_HAVE_GIF /Fd$(LIBWEBP_PDBNAME) \
113 /Fo$(DIROBJ)\examples\ examples\$(@B).c
114 $(DIROBJ)\examples\gifdec.obj: examples\gifdec.c
115 - $(CC) $(CFLAGS) /DWEBP_HAVE_GIF /Fd$(LIBWEBP_PDBNAME) \
116 + $(CC_) $(CFLAGS) /DWEBP_HAVE_GIF /Fd$(LIBWEBP_PDBNAME) \
117 /Fo$(DIROBJ)\examples\ examples\$(@B).c
119 {examples}.c{$(DIROBJ)\examples}.obj::
120 - $(CC) $(CFLAGS) /Fd$(DIROBJ)\examples\ /Fo$(DIROBJ)\examples\ $<
121 + $(CC_) $(CFLAGS) /Fd$(DIROBJ)\examples\ /Fo$(DIROBJ)\examples\ $<
122 {extras}.c{$(DIROBJ)\extras}.obj::
123 - $(CC) $(CFLAGS) /Fd$(DIROBJ)\extras\ /Fo$(DIROBJ)\extras\ $<
124 + $(CC_) $(CFLAGS) /Fd$(DIROBJ)\extras\ /Fo$(DIROBJ)\extras\ $<
125 {imageio}.c{$(DIROBJ)\imageio}.obj::
126 - $(CC) $(CFLAGS) /Fd$(DIROBJ)\imageio\ /Fo$(DIROBJ)\imageio\ $<
127 + $(CC_) $(CFLAGS) /Fd$(DIROBJ)\imageio\ /Fo$(DIROBJ)\imageio\ $<
128 {sharpyuv}.c{$(DIROBJ)\sharpyuv}.obj::
129 - $(CC) $(CFLAGS) /Fd$(DIROBJ)\sharpyuv\ /Fo$(DIROBJ)\sharpyuv\ $<
130 + $(CC_) $(CFLAGS) /Fd$(DIROBJ)\sharpyuv\ /Fo$(DIROBJ)\sharpyuv\ $<
131 {src\dec}.c{$(DIROBJ)\dec}.obj::
132 - $(CC) $(CFLAGS) /Fd$(LIBWEBP_PDBNAME) /Fo$(DIROBJ)\dec\ $<
133 + $(CC_) $(CFLAGS) /Fd$(LIBWEBP_PDBNAME) /Fo$(DIROBJ)\dec\ $<
134 {src\demux}.c{$(DIROBJ)\demux}.obj::
135 - $(CC) $(CFLAGS) /Fd$(LIBWEBP_PDBNAME) /Fo$(DIROBJ)\demux\ $<
136 + $(CC_) $(CFLAGS) /Fd$(LIBWEBP_PDBNAME) /Fo$(DIROBJ)\demux\ $<
137 {src\dsp}.c{$(DIROBJ)\dsp}.obj::
138 - $(CC) $(CFLAGS) /Fd$(LIBWEBP_PDBNAME) /Fo$(DIROBJ)\dsp\ $<
139 + $(CC_) $(CFLAGS) /Fd$(LIBWEBP_PDBNAME) /Fo$(DIROBJ)\dsp\ $<
140 {src\enc}.c{$(DIROBJ)\enc}.obj::
141 - $(CC) $(CFLAGS) /Fd$(LIBWEBP_PDBNAME) /Fo$(DIROBJ)\enc\ $<
142 + $(CC_) $(CFLAGS) /Fd$(LIBWEBP_PDBNAME) /Fo$(DIROBJ)\enc\ $<
143 {src\mux}.c{$(DIROBJ)\mux}.obj::
144 - $(CC) $(CFLAGS) /Fd$(LIBWEBP_PDBNAME) /Fo$(DIROBJ)\mux\ $<
145 + $(CC_) $(CFLAGS) /Fd$(LIBWEBP_PDBNAME) /Fo$(DIROBJ)\mux\ $<
146 {src\utils}.c{$(DIROBJ)\utils}.obj::
147 - $(CC) $(CFLAGS) /Fd$(LIBWEBP_PDBNAME) /Fo$(DIROBJ)\utils\ $<
148 + $(CC_) $(CFLAGS) /Fd$(LIBWEBP_PDBNAME) /Fo$(DIROBJ)\utils\ $<
150 LNKLIBS = ole32.lib windowscodecs.lib shlwapi.lib
151 !IF "$(UNICODE)" == "1"