# Build specification for the 'jam' tool
#
# You still need to run configure to generate config.h
# 

include $(HOME)/.jamrules ;

# assume stdint.h and libpng are available, except on win32
if $(OS) != NT {
  CCFLAGS += -DHAVE_STDINT_H -DHAVE_LIBPNG ;
  LINKLIBS += -lpng -lz ;
  Library libjbig2dec : jbig2_image_png.c ;
}

Library libjbig2dec :
	jbig2_arith.c jbig2_arith_int.c jbig2_arith_iaid.c jbig2_huffman.c
	jbig2_segment.c jbig2_page.c
	jbig2_symbol_dict.c jbig2_text.c
	jbig2_halftone.c
	jbig2_generic.c jbig2_refinement.c jbig2_mmr.c
	jbig2_image.c jbig2_image_pbm.c # jbig2_image_png.c
	jbig2_metadata.c 
	jbig2.c
	;

Main jbig2dec : jbig2dec.c sha1.c ;

LinkLibraries jbig2dec : libjbig2dec ;

InstallBin $(BINDIR) : jbig2dec$(SUFEXE) ;
InstallLib $(LIBDIR) : libjbig2dec$(SUFLIB) ;
InstallFile $(LIBDIR)/../include : jbig2.h ;

