/* Imakefile for ppm tools
 *
 * Copyright (C) 1991 Rainer Klute
 *
 * Permission to use, copy, modify, distribute, and sell this software and
 * its documentation for any purpose is hereby granted without fee, provided
 * that the above copyright notice appear in all copies and that both that
 * copyright notice and this permission notice appear in supporting
 * documentation, and that the copyright holder's name not be used in
 * advertising or publicity pertaining to distribution of the software
 * without specific, written prior permission. The copyright holder makes
 * no representations about the suitability of this software for any
 * purpose. It is provided "as is" without express or implied warranty.
 */

#define LibPpm libppm.a
#define DepLibPpm LibPpm
#include <../Pbmplus.tmpl>

   CURRENTLIBS = $(LIBPPM) $(LIBPGM) $(LIBPBM)
CURRENTDEPLIBS = $(DEPLIBPPM) $(DEPLIBPGM) $(DEPLIBPBM)
     INCLUDES  = -I.. -I$(PBMDIR) -I$(PGMDIR)
       DEFINES = -DRGB_DB=\"DefaultRGBDatabase\"
         MERGE = ppmmerge

          MAN1 = giftoppm.1 gouldtoppm.1 ilbmtoppm.1 imgtoppm.1 mtvtoppm.1 \
		 pcxtoppm.1 pgmtoppm.1 pi1toppm.1 picttoppm.1 pjtoppm.1 \
		 ppmdither.1 ppmhist.1 ppmmake.1 ppmquant.1 ppmrelief.1 \
		 ppmtogif.1 ppmtoicr.1 ppmtoilbm.1 ppmtopcx.1 ppmtopgm.1 \
		 ppmtopi1.1 ppmtopict.1 ppmtopj.1 ppmtopuzz.1 ppmtorgb3.1 \
		 ppmtosixel.1 ppmtotga.1 ppmtouil.1 ppmtoxpm.1 ppmtoyuv.1 \
		 qrttoppm.1 rawtoppm.1 rgb3toppm.1 spctoppm.1 sputoppm.1 \
		 tgatoppm.1 ximtoppm.1 xpmtoppm.1 yuvtoppm.1 ppmpat.1 \
		 ppmquantall.1
          MAN3 = libppm.3
          MAN5 = ppm.5

     SRCS = giftoppm.c gouldtoppm.c ilbmtoppm.c imgtoppm.c mtvtoppm.c \
	    pcxtoppm.c pgmtoppm.c pi1toppm.c picttoppm.c pjtoppm.c \
	    ppmdither.c ppmhist.c ppmmake.c ppmquant.c ppmrelief.c \
	    ppmtogif.c ppmtoicr.c ppmtoilbm.c ppmtopcx.c ppmtopgm.c \
	    ppmtopi1.c ppmtopict.c ppmtopj.c ppmtopuzz.c ppmtorgb3.c \
	    ppmtosixel.c ppmtotga.c ppmtouil.c ppmtoxpm.c ppmtoyuv.c \
	    qrttoppm.c rawtoppm.c rgb3toppm.c spctoppm.c sputoppm.c \
	    tgatoppm.c ximtoppm.c xpmtoppm.c yuvtoppm.c ppmpat.c

     OBJS = giftoppm.o gouldtoppm.o ilbmtoppm.o imgtoppm.o mtvtoppm.o \
	    pcxtoppm.o pgmtoppm.o pi1toppm.o picttoppm.o pjtoppm.o \
	    ppmdither.o ppmhist.o ppmmake.o ppmquant.o ppmrelief.o \
	    ppmtogif.o ppmtoicr.o ppmtoilbm.o ppmtopcx.o ppmtopgm.o \
	    ppmtopi1.o ppmtopict.o ppmtopj.o ppmtopuzz.o ppmtorgb3.o \
	    ppmtosixel.o ppmtotga.o ppmtouil.o ppmtoxpm.o ppmtoyuv.o \
	    qrttoppm.o rawtoppm.o rgb3toppm.o spctoppm.o sputoppm.o \
	    tgatoppm.o ximtoppm.o xpmtoppm.o yuvtoppm.o ppmpat.o

     BINS = giftoppm gouldtoppm ilbmtoppm imgtoppm mtvtoppm pcxtoppm pgmtoppm \
	    pi1toppm picttoppm pjtoppm ppmdither ppmhist ppmmake ppmquant \
	    ppmrelief ppmtogif ppmtoicr ppmtoilbm ppmtopcx ppmtopgm ppmtopi1 \
	    ppmtopict ppmtopj ppmtopuzz ppmtorgb3 ppmtosixel ppmtotga \
	    ppmtouil ppmtoxpm ppmtoyuv qrttoppm rawtoppm rgb3toppm spctoppm \
	    sputoppm tgatoppm ximtoppm xpmtoppm yuvtoppm ppmpat

includes:: ppmquantall.script

ppmquantall.script:
	$(LN) ppmquantall ppmquantall.script

AllTarget($(LIBPPM) $(BINS))

DependTarget()

NormalPbmplusProgramTarget(giftoppm)
NormalPbmplusProgramTarget(gouldtoppm)
NormalPbmplusProgramTarget(ilbmtoppm)
NormalPbmplusProgramTarget(imgtoppm)
NormalPbmplusProgramTarget(mtvtoppm)
NormalPbmplusProgramTarget(pcxtoppm)
NormalPbmplusProgramTarget(pgmtoppm)
NormalPbmplusProgramTarget(pi1toppm)
NormalPbmplusProgramTarget(picttoppm)
NormalPbmplusProgramTarget(pjtoppm)
NormalPbmplusProgramTarget(ppmdither)
NormalPbmplusProgramTarget(ppmhist)
NormalPbmplusProgramTarget(ppmmake)
NormalPbmplusProgramTarget(ppmquant)
NormalPbmplusProgramTarget(ppmrelief)
NormalPbmplusProgramTarget(ppmtogif)
NormalPbmplusProgramTarget(ppmtoicr)
NormalPbmplusProgramTarget(ppmtoilbm)
NormalPbmplusProgramTarget(ppmtopcx)
NormalPbmplusProgramTarget(ppmtopgm)
NormalPbmplusProgramTarget(ppmtopi1)
NormalPbmplusProgramTarget(ppmtopict)
NormalPbmplusProgramTarget(ppmtopj)
NormalPbmplusProgramTarget(ppmtopuzz)
NormalPbmplusProgramTarget(ppmtorgb3)
NormalPbmplusProgramTarget(ppmtosixel)
NormalPbmplusProgramTarget(ppmtotga)
NormalPbmplusProgramTarget(ppmtouil)
NormalPbmplusProgramTarget(ppmtoxpm)
NormalPbmplusProgramTarget(ppmtoyuv)
NormalPbmplusProgramTarget(qrttoppm)
NormalPbmplusProgramTarget(rawtoppm)
NormalPbmplusProgramTarget(rgb3toppm)
NormalPbmplusProgramTarget(spctoppm)
NormalPbmplusProgramTarget(sputoppm)
NormalPbmplusProgramTarget(tgatoppm)
NormalPbmplusProgramTarget(ximtoppm)
NormalPbmplusProgramTarget(xpmtoppm)
NormalPbmplusProgramTarget(yuvtoppm)
NormalPbmplusMathProgramTarget(ppmpat)

#if InstallMerged
NormalProgramTarget($(MERGE),$(MERGE).o $(OBJS),$(CURRENTDEPLIBS),$(CURRENTLIBS),-lm)
InstallProgram($(MERGE),$(PBMPLUSDIR)$(PBMPLUSBINDIR))
#endif

InstallPbmplusPrograms($(BINS),$(PBMPLUSDIR)$(PBMPLUSBINDIR),$(INSTPGMFLAGS))
InstallScript(ppmquantall,$(PBMPLUSDIR)$(PBMPLUSBINDIR))
InstallMultipleMan($(MAN1),$(PBMPLUSDIR)$(PBMPLUSMANDIR)/man1)
InstallMultipleMan($(MAN3),$(PBMPLUSDIR)$(PBMPLUSMANDIR)/man3)
InstallMultipleMan($(MAN5),$(PBMPLUSDIR)$(PBMPLUSMANDIR)/man5)

NormalLibraryObjectRule()
NormalLibraryTarget(ppm,libppm1.o libppm2.o libppm3.o libppm4.o libppm5.o)
InstallLibrary(ppm,$(PBMPLUSDIR)$(PBMPLUSLIBDIR))

InstallMultipleFlags(ppm.h,$(PBMPLUSDIR)$(PBMPLUSINCDIR),$(INSTINCFLAGS))
