SRCDIR = ..
include $(SRCDIR)/Make.Rules

ARLIB = libjpeg.a

SYSDEPMEM= jmemnobs.o

COMOBJECTS= jcomapi.o jutils.o jerror.o jmemmgr.o $(SYSDEPMEM)
# compression library object files
CLIBOBJECTS= jcapimin.o jcapistd.o jctrans.o jcparam.o jdatadst.o jcinit.o \
        jcmaster.o jcmarker.o jcmainct.o jcprepct.o jccoefct.o jccolor.o \
        jcsample.o jchuff.o jcphuff.o jcdctmgr.o jfdctfst.o jfdctflt.o \
        jfdctint.o
# decompression library object files
DLIBOBJECTS= jdapimin.o jdapistd.o jdtrans.o jdatasrc.o jdmaster.o \
        jdinput.o jdmarker.o jdhuff.o jdphuff.o jdmainct.o jdcoefct.o \
        jdpostct.o jddctmgr.o jidctfst.o jidctflt.o jidctint.o jidctred.o \
        jdsample.o jdcolor.o jquant1.o jquant2.o jdmerge.o
# These objectfiles are included in libjpeg.a
OBJS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)

MAJOR=6
MINOR=0
PATCH=0

SHBASE=jpeg

HDRS= jconfig.h jpeglib.h jmorecfg.h jerror.h

COBJECTS= cjpeg.o rdppm.o rdgif.o rdtarga.o rdrle.o rdbmp.o rdswitch.o \
        cdjpeg.o
DOBJECTS= djpeg.o wrppm.o wrgif.o wrtarga.o wrrle.o wrbmp.o rdcolmap.o \
        cdjpeg.o
TROBJECTS= jpegtran.o rdswitch.o cdjpeg.o

APPS=cjpeg djpeg jpegtran rdjpgcom wrjpgcom

MAN1S = cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 wrjpgcom.1

include $(SRCDIR)/Make.Targets

cjpeg : $(COBJECTS) $(SHLIB)
	gcc -o $@ $(COBJECTS) $(LOADLIBES)

djpeg : $(DOBJECTS) $(SHLIB)
	gcc -o $@ $(DOBJECTS) $(LOADLIBES)

jpegtran : $(TROBJECTS) $(SHLIB)
	gcc -o $@ $(TROBJECTS) $(LOADLIBES)

rdjpgcom : rdjpgcom.o $(SHLIB)
	gcc -o $@ rdjpgcom.o $(LOADLIBES)

wrjpgcom : wrjpgcom.o $(SHLIB)
	gcc -o $@ wrjpgcom.o $(LOADLIBES)

