summaryrefslogtreecommitdiff
path: root/support/jpeg2ps/Makefile
blob: a1b5aa98706e03e4cac757746063afd09f19b713 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# Makefile for jpeg2ps
# (C) Thomas Merz 1994-1999

VERSION=1.8
DIRNAME = jpeg2ps-$(VERSION)
TARFILE = jpeg2ps-$(VERSION).tar
ZIPFILE = jpeg2ps-$(VERSION).zip

# ----------------------------------------------------------------------------
# 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"

CC=gcc
CCFLAGS= -c -DA4
LD=gcc
LDFLAGS=
OBJ=o
EXE=
RM=rm -f

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

all:	jpeg2ps$(EXE)

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

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

DISTFILES = jpeg2ps.c psimage.h readjpeg.c asc85ec.c getopt.c Makefile jpeg2ps.dsp jpeg2ps.txt descrip.mms

DOSDISTFILES = $(DISTFILES) jpeg2ps.exe

CONVFILES = jpeg2ps.c psimage.h readjpeg.c asc85ec.c getopt.c Makefile jpeg2ps.txt

dist:	$(DOSDISTFILES)
	$(RM) $(ZIPFILE) $(TARFILE).gz;			\
	ln -s . $(DIRNAME);					\
	lineend -d $(CONVFILES);		 	\
	(for i in $(DOSDISTFILES); do				\
		echo $$i;					\
	done) | sed "s;.*;$(DIRNAME)/&;" >distfiles;		\
	zip -9 $(ZIPFILE) `cat distfiles`;			\
	(for i in $(DISTFILES); do				\
		echo $$i;					\
	done) | sed "s;.*;$(DIRNAME)/&;" >distfiles;		\
	lineend -u $(CONVFILES); 			\
	tar cvf  $(TARFILE) `cat distfiles`;			\
	gzip -9 $(TARFILE);					\
	$(RM) $(DIRNAME) distfiles;

clean:
	$(RM) *.$(OBJ) jpeg2ps$(EXE) $(TARFILE) $(ZIPFILE)

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

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

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

getopt.$(OBJ):		getopt.c