# GNU makefile for rebuilding the test program

CC=/usr/gnu/bin/gcc
SRCDIR=.
INCLDIR=../../src
OBJDIR=../obj
LIBDIR=../bin
EXEDIR=../bin
INCLUDES=-I../../src -I../../../otherlib/jpeglib -I../jpeglib	     \
	 -I../../../otherlib/libtiff/libtiff -I../libtiff
CPPFLAGS= -g -I${SRCDIR} ${INCLUDES} -Wall			     \
	  -fhandle-exceptions -Wno-unused -D _DEBUG		     \
	  -o $@

#    -g 		 turn on debug info
#    -I 		 specifies include directory
#    -Wall		 turns on all warnings
#    -fhandle-exceptions allows exception handling
#    -Wno-unused	 don't complain when function arguments stay
#			 unused.
#    -o $@		 object file created is target of
#			 dependency rule.

# Release flags: -O3 is Optimize,
#      -m486 is 486 as target processor

OBJS=${OBJDIR}/testdec.o

LIBS=${LIBDIR}/paintlib.a ${LIBDIR}/libjpeg.a ${LIBDIR}/libtiff.a

debug: ${EXEDIR}/testdec

${EXEDIR}/testdec: ${OBJS} ${LIBS}
	${CC} -O -o $@ ${OBJS} ${LIBS} -lc -lm	-lstdc++

# Include files of every cpp file
${OBJS}: makefile

${OBJDIR}/testdec.o: ${SRCDIR}/testdec.cpp ${INCLDIR}/anybmp.h	     \
	  ${INCLDIR}/anydec.h ${INCLDIR}/stdpch.h
	${CC} -c ${CPPFLAGS} ${SRCDIR}/testdec.cpp





