# Makefile for jpeg2ps
# (C) Thomas Merz 1994-1997
#
# modified for Amiga SAS/C PPC by ARK (7/Mar/99)
#

# ----------------------------------------------------------------------------
# UNIX version
# throw out -DA4 if you want letter format as default size
# use -DKNR for Kernighan/Ritchie compilers

CC    = SCPPC
CCOPT =
LD    =
LDOPT =
OBJ   = o
EXE   =
RM    = delete

.c.$(OBJ) :
        $(CC) $(CCOPT) $*.c

all:    jpeg2ps$(EXE)

jpeg2ps$(EXE):  jpeg2ps.$(OBJ) readjpeg.$(OBJ) asc85ec.$(OBJ) getopt.$(OBJ)
                ppc-amigaos-ld -r LIB:c_ppc.o jpeg2ps.$(OBJ) readjpeg.$(OBJ) asc85ec.$(OBJ) getopt.$(OBJ) LIB:scppc.a lib:end.o -o jpeg2ps.elf
                Protect jpeg2ps.elf +e

zip:    jpeg2ps.c psimage.h readjpeg.c asc85ec.c getopt.c makefile.dos makefile.unx jpeg2ps.txt jpeg2ps.exe
        lineend -d *.c *.h makefile.* *.txt
        pkzip jpeg2ps.zip *.c *.h *.txt makefile.* jpeg2ps.exe

tar:    jpeg2ps.c psimage.h readjpeg.c asc85ec.c getopt.c makefile.dos makefile jpeg2ps.txt
        lineend -u *.c *.h makefile *.txt
        tar cvf jpeg2ps.tar *.c *.h *.txt makefile makefile.dos
        gzip jpeg2ps.tar

clean:
        $(RM) *.$(OBJ)
        $(RM) jpeg2ps$(EXE) jpeg2ps.tar.gz

jpeg2ps.$(OBJ):         jpeg2ps.c psimage.h

readjpeg.$(OBJ):        readjpeg.c psimage.h

asc85ec.$(OBJ):         asc85ec.c

getopt.$(OBJ):          getopt.c