# Available compile time options:
# -DKNR for Kernighan/Ritchie compilers
# -DA4 gives A4 as default page size, omitting -DA4 gives U.S. letter format
# -DDOS adds DOS and OS/2 support

# The following was reported to work for emx/gcc 0.9c fix04 under OS/2:
# make -f Makefile "CCFLAGS=-c -DA4 -DDOS -O2" "LDFLAGS=-Zexe -s"

AS=as
CC=cc
CCFLAGS= -throwback -Wp -IC:,TCPIPLibs: -c -DA4 -D__riscos__
LD=link
LDFLAGS=TCPIPLibs:o.unixlib C:o.stubs

.c.o :
	$(CC) $(CCFLAGS) $*.c

.s.o:
	$(AS) $(AS_FLAGS) -o $@ $<

all:	jpeg2ps

# If your system doesn't have getopt(), add the supplied getopt.c
# module below in the jpeg2ps line.

jpeg2ps:	jpeg2ps.o readjpeg.o asc85ec.o getopt.o asmstuff.o
	$(LD) -o jpeg2ps $(LDFLAGS) jpeg2ps.o readjpeg.o asc85ec.o getopt.o asmstuff.o
	squeeze jpeg2ps

jpeg2ps.o:	jpeg2ps.c psimage.h

readjpeg.o:	readjpeg.c psimage.h

asc85ec.o:	asc85ec.c psimage.h

getopt.o:	getopt.c

clean:
	-wipe jpeg2ps ~CFR~V
	-wipe o.* ~CFR~V
