# Makefile for jpeg2ps
# (C) Thomas Merz 1994-1997
# Makefile for OS/2 adaptions by Stefan Deutscher 1997
# os/2 version: $Id: makefile.os2,v 1.2 1997/07/29 15:59:41 stefand Exp $

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

CC=gcc
# CCOPT= -c -DA4 -s -Wall -DOS2
CCOPT= -c -s -Wall -DOS2
LD=gcc
LDOPT= -s -DOS2
OBJ=o
EXE=.exe
RM=rm

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

all:	jpeg2ps$(EXE)

jpeg2ps$(EXE):	jpeg2ps.$(OBJ) readjpeg.$(OBJ) asc85ec.$(OBJ) getopt.$(OBJ)
		$(LD) $(LDOPT) -o jpeg2ps$(EXE) jpeg2ps.$(OBJ) readjpeg.$(OBJ) asc85ec.$(OBJ) getopt.$(OBJ)


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

os2dist: 
	zip -u -m -9 jpeg2ps2.zip jpeg2ps.c psimage.h readjpeg.c asc85ec.c getopt.c makefile.dos makefile.org makefile.os2 makefile.unx jpeg2ps.txt jpeg2ps.exe readme.os2
	zip -u -9 jpeg2ps2.zip makefile

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 makefile.org makefile.os2
	gzip -9 jpeg2ps.tar

clean:
	-$(RM) *.$(OBJ)

veryclean: clean
	-$(RM) jpeg2ps$(EXE)
	-$(RM) *~

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

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

asc85ec.$(OBJ):		asc85ec.c

getopt.$(OBJ):		getopt.c

# OS/2 Logfile:
# $Log: makefile.os2,v $
# Revision 1.2  1997/07/29 15:59:41  stefand
# Added -DOS2 option to activate OS/2 dependent changes in jpeg2ps.c.
#
# Revision 1.1  1997/07/29 15:58:22  stefand
# Initial revision
#
#
# eof.
