shithub: jbig2

Download patch

ref: 11b4c3203dc5a9551720760570c82408c303cd1c
parent: 6e1f2259115efac14cd6c7ad9d119b43013a32a1
author: Ken Sharp <ken.sharp@artifex.com>
date: Wed Feb 5 09:19:59 EST 2014

Update jbig2dec standalone build for Windows.

Add the missing jbig2_halftone.c file, and make building without libpng
the default.

CLUSTER_UNTESTED

--- a/msvc.mak
+++ b/msvc.mak
@@ -11,10 +11,10 @@
 LIBPNGDIR=../libpng
 ZLIBDIR=../zlib
 # define iff you're linking to libpng
-LIBPNG_CFLAGS=-DHAVE_LIBPNG -I$(LIBPNGDIR) -I$(ZLIBDIR)
-LIBPNG_LDFLAGS=$(LIBPNGDIR)/libpng.lib $(ZLIBDIR)/zlib.lib /link /NODEFAULTLIB:LIBCMT
-#LIBPNG_CFLAGS=
-#LIBPNG_LDFLAGS=
+# LIBPNG_CFLAGS=-DHAVE_LIBPNG -I$(LIBPNGDIR) -I$(ZLIBDIR)
+# LIBPNG_LDFLAGS=$(LIBPNGDIR)/libpng.lib $(ZLIBDIR)/zlib.lib /link /NODEFAULTLIB:LIBCMT
+LIBPNG_CFLAGS=
+LIBPNG_LDFLAGS=
 
 EXE=.exe
 OBJ=.obj
@@ -23,14 +23,27 @@
 CC=cl
 FE=-Fe
 
+
+# no libpng
+#
 OBJS=getopt$(OBJ) getopt1$(OBJ) jbig2$(OBJ) jbig2_arith$(OBJ) \
  jbig2_arith_iaid$(OBJ) jbig2_arith_int$(OBJ) jbig2_huffman$(OBJ) \
- jbig2_generic$(OBJ) jbig2_refinement$(OBJ) \
- jbig2_image$(OBJ) jbig2_image_pbm$(OBJ) jbig2_image_png$(OBJ) \
+ jbig2_generic$(OBJ) jbig2_refinement$(OBJ) jbig2_halftone$(OBJ)\
+ jbig2_image$(OBJ) jbig2_image_pbm$(OBJ)\
  jbig2_segment$(OBJ) jbig2_symbol_dict$(OBJ) jbig2_text$(OBJ) \
  jbig2_mmr$(OBJ) jbig2_page$(OBJ) jbig2_metadata$(OBJ) \
  jbig2dec$(OBJ) sha1$(OBJ)
 
+# libpng - if you link to libpng, uncomment these lines.
+#
+#OBJS=getopt$(OBJ) getopt1$(OBJ) jbig2$(OBJ) jbig2_arith$(OBJ) \
+# jbig2_arith_iaid$(OBJ) jbig2_arith_int$(OBJ) jbig2_huffman$(OBJ) \
+# jbig2_generic$(OBJ) jbig2_refinement$(OBJ) jbig2_halftone$(OBJ)\
+# jbig2_image$(OBJ) jbig2_image_pbm$(OBJ) jbig2_image_png$(OBJ) \
+# jbig2_segment$(OBJ) jbig2_symbol_dict$(OBJ) jbig2_text$(OBJ) \
+# jbig2_mmr$(OBJ) jbig2_page$(OBJ) jbig2_metadata$(OBJ) \
+# jbig2dec$(OBJ) sha1$(OBJ)
+
 HDRS=getopt.h jbig2.h jbig2_arith.h jbig2_arith_iaid.h jbig2_arith_int.h \
  jbig2_generic.h jbig2_huffman.h jbig2_hufftab.h jbig2_image.h \
  jbig2_mmr.h jbig2_priv.h jbig2_symbol_dict.h jbig2_metadata.h \
@@ -76,6 +89,9 @@
 
 jbig2_image_png$(OBJ): jbig2_image_png.c $(HDRS)
 	$(CC) $(CFLAGS) -c jbig2_image_png.c
+
+jbig2_halftone$(OBJ): jbig2_halftone.c $(HDRS)
+	$(CC) $(CFLAGS) -c jbig2_halftone.c
 
 jbig2_mmr$(OBJ): jbig2_mmr.c $(HDRS)
 	$(CC) $(CFLAGS) -c jbig2_mmr.c