# Generated automatically from Makefile.in by configure.
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL.  You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation.  Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
# Reserved.
#
ifndef MOZ_JAVA
LOCAL_JMC_SUBDIR = .
endif

DEPTH		= ../../..
topsrcdir	= ../../..
srcdir		= .

include $(DEPTH)/config/autoconf.mk

MODULE		= img
LIBRARY_NAME	= img

REQUIRES	= $(JPEG_REQUIRES) $(PNG_REQUIRES) $(ZLIB_REQUIRES)
LOCAL_INCLUDES	= -I$(srcdir) $(PNG_CFLAGS) $(ZLIB_CFLAGS)
EXTRA_LIBS	= $(PNG_LIBS) $(ZLIB_LIBS)

CPPSRCS		= ilNetReader.cpp \
		  color.cpp \
		  colormap.cpp \
		  dither.cpp \
		  gif.cpp \
		  if.cpp \
		  ilclient.cpp \
		  il_util.cpp \
		  jpeg.cpp \
		  scale.cpp \
		  xbm.cpp \
		  ipng.cpp \
		  png_png.cpp \
		  $(NULL)

ifdef STANDALONE_IMAGE_LIB

CPPSRCS		+= xpcompat.cpp \
		  $(NULL)

REQUIRES	+= util img xpcom

EXTRA_LIBS	+= $(NSPR_LIBS)

else
CPPSRCS		+= dummy_nc.cpp \
		  external.cpp \
		  $(NULL)

REQUIRES	+= jtools java dbm util img layer js xpcom

#
# Generate MIMGCB.c (and similar sources) here.
# MIMGCB.h is generated in ../public/_jmc/
#
JMC_GEN		= MIMGCB MPSIMGCB
JMC_GEN_FLAGS	= -cimpl -noexc -module
endif

EXPORTS		= PIMGCB.h PPSIMGCB.h

ifdef NU_CACHE
REQUIRES 	+= cache
endif

EXPORTS := $(addprefix $(srcdir)/, $(EXPORTS))

symbols::
	@echo "LIBRARY_NAME     is $(LIBRARY_NAME)"
	@echo "LIBRARY          is $(LIBRARY)"
	@echo  "DIST		is $(DIST)"

include $(topsrcdir)/config/rules.mk

#
# This is about as far from the right way of doing things as you can get.
# HACK larubbio fix me
#
ifdef STANDALONE_IMAGE_LIB
CC = $(CCC)
endif
