ref: c65c52c0638fdfd3613fc7becd77410769ac62ec
parent: 1ed232578276caf6e999a2a9c0b6fd8952af659c
author: giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
date: Wed May 7 18:41:01 EDT 2003
Move HAVE_LIBPNG to the msvc makefile; this shouldn't necessarily be included in the win32 build (e.g. in ghostscript) so we only define it in our local msvc makefile. (recommitted after repository became corrupt. original change Wed May 7 03:48:12 2003) git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@249 ded80894-8fb9-0310-811b-c03f3676ab4d
--- a/config_win32.h
+++ b/config_win32.h
@@ -4,9 +4,6 @@
#define PACKAGE "jbig2dec"
#define VERSION "0.3"
-/* define this iff you are linking to/compiling in libpng */
-#define HAVE_LIBPNG
-
#ifdef _MSC_VER /* Microsoft Visual C+*/
typedef signed char int8_t;
--- a/msvc.mak
+++ b/msvc.mak
@@ -10,11 +10,16 @@
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
+#LIBPNG_CFLAGS=
+#LIBPNG_LDFLAGS=
EXE=.exe
OBJ=.obj
NUL=
-CFLAGS=-nologo -W4 -Zi -DHAVE_STRING_H=1 -I$(LIBPNGDIR) -I$(ZLIBDIR)
+CFLAGS=-nologo -W4 -Zi -DHAVE_STRING_H=1 $(LIBPNG_CFLAGS)
CC=cl
FE=-Fe
@@ -33,7 +38,7 @@
all: jbig2dec$(EXE)
jbig2dec$(EXE): $(OBJS)
- $(CC) $(CFLAGS) $(FE)jbig2dec$(EXE) $(OBJS) $(LIBPNGDIR)/libpng.lib $(ZLIBDIR)/zlib.lib
+ $(CC) $(CFLAGS) $(FE)jbig2dec$(EXE) $(OBJS) $(LIBPNG_LDFLAGS)
getopt$(OBJ): getopt.c getopt.h
$(CC) $(CFLAGS) -c getopt.c