Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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