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 "ARM" > NUL ]
14 +!ELSE IF ! [ $(CC) 2>&1 | grep -q "ARM" > NUL ]
17 !ERROR Unable to auto-detect toolchain architecture! \
19 ## Nothing more to do below this line!
22 -CCNODBG = cl.exe $(NOLOGO) /O2 /DNDEBUG
23 -CCDEBUG = cl.exe $(NOLOGO) /Od /Zi /D_DEBUG /RTC1
24 +CCNODBG = $(CC) $(NOLOGO) /O2 /DNDEBUG
25 +CCDEBUG = $(CC) $(NOLOGO) /Od /Zi /D_DEBUG /RTC1
26 CFLAGS = /I. /Isrc $(NOLOGO) /W3 /EHsc /c
27 CFLAGS = $(CFLAGS) /DWIN32 /D_CRT_SECURE_NO_WARNINGS /DWIN32_LEAN_AND_MEAN
28 LDFLAGS = /LARGEADDRESSAWARE /MANIFEST:EMBED /NXCOMPAT /DYNAMICBASE
33 -DIRBASE = $(OUTDIR)\$(CFG)\$(ARCH)
35 DIROBJ = $(DIRBASE)\obj
36 DIRLIB = $(DIRBASE)\lib
37 DIRINC = $(DIRBASE)\include
40 # Target configuration
41 !IF "$(CFG)" == "release-static"
45 !ELSE IF "$(CFG)" == "debug-static"
50 LIBWEBPDECODER_BASENAME = $(LIBWEBPDECODER_BASENAME)_debug
52 LIBWEBPDEMUX_BASENAME = $(LIBWEBPDEMUX_BASENAME)_debug
53 LIBSHARPYUV_BASENAME = $(LIBSHARPYUV_BASENAME)_debug
54 !ELSE IF "$(CFG)" == "release-dynamic"
59 !ELSE IF "$(CFG)" == "debug-dynamic"
68 !IF "$(STATICLIBBUILD)" == "TRUE"
70 +CC_ = $(CC_) $(RTLIB)
72 LIBWEBPDECODER = $(DIRLIB)\$(LIBWEBPDECODER_BASENAME).lib
73 LIBWEBP = $(DIRLIB)\$(LIBWEBP_BASENAME).lib
75 LIBWEBPDEMUX = $(DIRLIB)\$(LIBWEBPDEMUX_BASENAME).lib
76 LIBSHARPYUV = $(DIRLIB)\$(LIBSHARPYUV_BASENAME).lib
77 !ELSE IF "$(DLLBUILD)" == "TRUE"
78 -CC = $(CC) /I$(DIROBJ) $(RTLIB) /DWEBP_DLL
79 +CC_ = $(CC_) /I$(DIROBJ) $(RTLIB) /DWEBP_DLL
80 LIBWEBPDECODER = $(DIRLIB)\$(LIBWEBPDECODER_BASENAME)_dll.lib
81 LIBWEBP = $(DIRLIB)\$(LIBWEBP_BASENAME)_dll.lib
82 LIBWEBPMUX = $(DIRLIB)\$(LIBWEBPMUX_BASENAME)_dll.lib
85 !IF "$(DLLBUILD)" == "TRUE"
86 {$(DIROBJ)}.c{$(DIROBJ)}.obj:
87 - $(CC) $(CFLAGS) /Fd$(LIBWEBP_PDBNAME) /Fo$@ $<
88 + $(CC_) $(CFLAGS) /Fd$(LIBWEBP_PDBNAME) /Fo$@ $<
90 {src}.rc{$(DIROBJ)}.res:
93 # File-specific flag builds. Note batch rules take precedence over wildcards,
94 # so for now name each file individually.
95 $(DIROBJ)\examples\anim_diff.obj: examples\anim_diff.c
96 - $(CC) $(CFLAGS) /DWEBP_HAVE_GIF /Fd$(LIBWEBP_PDBNAME) \
97 + $(CC_) $(CFLAGS) /DWEBP_HAVE_GIF /Fd$(LIBWEBP_PDBNAME) \
98 /Fo$(DIROBJ)\examples\ examples\$(@B).c
99 $(DIROBJ)\examples\anim_dump.obj: examples\anim_dump.c
100 - $(CC) $(CFLAGS) /DWEBP_HAVE_GIF /Fd$(LIBWEBP_PDBNAME) \
101 + $(CC_) $(CFLAGS) /DWEBP_HAVE_GIF /Fd$(LIBWEBP_PDBNAME) \
102 /Fo$(DIROBJ)\examples\ examples\$(@B).c
103 $(DIROBJ)\examples\anim_util.obj: examples\anim_util.c
104 - $(CC) $(CFLAGS) /DWEBP_HAVE_GIF /Fd$(LIBWEBP_PDBNAME) \
105 + $(CC_) $(CFLAGS) /DWEBP_HAVE_GIF /Fd$(LIBWEBP_PDBNAME) \
106 /Fo$(DIROBJ)\examples\ examples\$(@B).c
107 $(DIROBJ)\examples\gif2webp.obj: examples\gif2webp.c
108 - $(CC) $(CFLAGS) /DWEBP_HAVE_GIF /Fd$(LIBWEBP_PDBNAME) \
109 + $(CC_) $(CFLAGS) /DWEBP_HAVE_GIF /Fd$(LIBWEBP_PDBNAME) \
110 /Fo$(DIROBJ)\examples\ examples\$(@B).c
111 $(DIROBJ)\examples\gifdec.obj: examples\gifdec.c
112 - $(CC) $(CFLAGS) /DWEBP_HAVE_GIF /Fd$(LIBWEBP_PDBNAME) \
113 + $(CC_) $(CFLAGS) /DWEBP_HAVE_GIF /Fd$(LIBWEBP_PDBNAME) \
114 /Fo$(DIROBJ)\examples\ examples\$(@B).c
116 {examples}.c{$(DIROBJ)\examples}.obj::
117 - $(CC) $(CFLAGS) /Fd$(DIROBJ)\examples\ /Fo$(DIROBJ)\examples\ $<
118 + $(CC_) $(CFLAGS) /Fd$(DIROBJ)\examples\ /Fo$(DIROBJ)\examples\ $<
119 {extras}.c{$(DIROBJ)\extras}.obj::
120 - $(CC) $(CFLAGS) /Fd$(DIROBJ)\extras\ /Fo$(DIROBJ)\extras\ $<
121 + $(CC_) $(CFLAGS) /Fd$(DIROBJ)\extras\ /Fo$(DIROBJ)\extras\ $<
122 {imageio}.c{$(DIROBJ)\imageio}.obj::
123 - $(CC) $(CFLAGS) /Fd$(DIROBJ)\imageio\ /Fo$(DIROBJ)\imageio\ $<
124 + $(CC_) $(CFLAGS) /Fd$(DIROBJ)\imageio\ /Fo$(DIROBJ)\imageio\ $<
125 {sharpyuv}.c{$(DIROBJ)\sharpyuv}.obj::
126 - $(CC) $(CFLAGS) /Fd$(DIROBJ)\sharpyuv\ /Fo$(DIROBJ)\sharpyuv\ $<
127 + $(CC_) $(CFLAGS) /Fd$(DIROBJ)\sharpyuv\ /Fo$(DIROBJ)\sharpyuv\ $<
128 {src\dec}.c{$(DIROBJ)\dec}.obj::
129 - $(CC) $(CFLAGS) /Fd$(LIBWEBP_PDBNAME) /Fo$(DIROBJ)\dec\ $<
130 + $(CC_) $(CFLAGS) /Fd$(LIBWEBP_PDBNAME) /Fo$(DIROBJ)\dec\ $<
131 {src\demux}.c{$(DIROBJ)\demux}.obj::
132 - $(CC) $(CFLAGS) /Fd$(LIBWEBP_PDBNAME) /Fo$(DIROBJ)\demux\ $<
133 + $(CC_) $(CFLAGS) /Fd$(LIBWEBP_PDBNAME) /Fo$(DIROBJ)\demux\ $<
134 {src\dsp}.c{$(DIROBJ)\dsp}.obj::
135 - $(CC) $(CFLAGS) /Fd$(LIBWEBP_PDBNAME) /Fo$(DIROBJ)\dsp\ $<
136 + $(CC_) $(CFLAGS) /Fd$(LIBWEBP_PDBNAME) /Fo$(DIROBJ)\dsp\ $<
137 {src\enc}.c{$(DIROBJ)\enc}.obj::
138 - $(CC) $(CFLAGS) /Fd$(LIBWEBP_PDBNAME) /Fo$(DIROBJ)\enc\ $<
139 + $(CC_) $(CFLAGS) /Fd$(LIBWEBP_PDBNAME) /Fo$(DIROBJ)\enc\ $<
140 {src\mux}.c{$(DIROBJ)\mux}.obj::
141 - $(CC) $(CFLAGS) /Fd$(LIBWEBP_PDBNAME) /Fo$(DIROBJ)\mux\ $<
142 + $(CC_) $(CFLAGS) /Fd$(LIBWEBP_PDBNAME) /Fo$(DIROBJ)\mux\ $<
143 {src\utils}.c{$(DIROBJ)\utils}.obj::
144 - $(CC) $(CFLAGS) /Fd$(LIBWEBP_PDBNAME) /Fo$(DIROBJ)\utils\ $<
145 + $(CC_) $(CFLAGS) /Fd$(LIBWEBP_PDBNAME) /Fo$(DIROBJ)\utils\ $<
147 LNKLIBS = ole32.lib windowscodecs.lib shlwapi.lib
148 !IF "$(UNICODE)" == "1"