Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
to see if it'll compile on VS2019
  • Loading branch information
sylikc committed Jan 8, 2023
2 parents 5b56afa + ca75bed commit f61a5d7
Show file tree
Hide file tree
Showing 10 changed files with 1,326 additions and 5 deletions.
28 changes: 28 additions & 0 deletions Makefile.w32
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Win32 Makefile created by Zoltan Frombach <[email protected]>

CC = cl
CFLAGS = -I. -I./src -I../mozjpeg -I../mozjpeg/build -DHAVE_CONFIG_H -D_CONSOLE /W2 /O2 /DNDEBUG /nologo
LDLIBS = /DEBUG:NONE /NODEFAULTLIB:MSVCRT
LIBJPEG = ../mozjpeg/WIN32/jpeg.lib
LIBIQA = src/iqa/build/release/iqa.lib

all: jpeg-recompress jpeg-compare jpeg-hash

jpeg-recompress: jpeg-recompress.obj src/util.obj src/edit.obj src/smallfry.obj $(LIBIQA)
$(CC) $(CFLAGS) /Fejpeg-recompress.exe jpeg-recompress.obj util.obj edit.obj smallfry.obj $(LIBIQA) $(LIBJPEG) $(LDFLAGS) /link /LTCG $(LDLIBS)

jpeg-compare: jpeg-compare.obj src/util.obj src/hash.obj src/edit.obj src/smallfry.obj $(LIBIQA)
$(CC) $(CFLAGS) /Fejpeg-compare.exe jpeg-compare.obj util.obj hash.obj edit.obj smallfry.obj $(LIBIQA) $(LIBJPEG) $(LDFLAGS) /link /LTCG $(LDLIBS)

jpeg-hash: jpeg-hash.obj src/util.obj src/hash.obj
$(CC) $(CFLAGS) /Fejpeg-hash.exe jpeg-hash.obj util.obj hash.obj $(LIBJPEG) $(LDFLAGS) /link $(LDLIBS)

%.obj: %.c %.h
$(CC) $(CFLAGS) /c $<

test: test/test.obj src/util.obj src/edit.obj src/hash.obj
$(CC) $(CFLAGS) /Fetest/test.exe test.obj util.obj edit.obj hash.obj $(LIBJPEG) $(LDFLAGS) /link $(LDLIBS)
./test.exe

clean:
del *.obj src/*.obj *.exe
5 changes: 5 additions & 0 deletions compile-on-windows.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@ECHO OFF
CD src\iqa
MsBuild.exe iqa.sln /t:Build /p:Configuration=Release /p:Platform=x64 /p:DebugSymbols=false /p:DebugType=None
CD ..\..
nmake /NOLOGO -f Makefile.w32
Loading

0 comments on commit f61a5d7

Please sign in to comment.