summaryrefslogtreecommitdiff
path: root/systems/unix/tex-fpc/dvipsnk/Makefile
blob: cbdf300d176772ec66ba06cb8b323893fd029f10 (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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
#
#   Makefile for dvips.  Edit this first part of the file.
#   Adapted to TeX-GPC in Aug. 2008.
#
#   First, the things that absolutely must be edited for your system.
#   Please, don't forget to edit MakeTeXPK in the same way!

# Change to your binary directory.
BINDIR = $(HOME)/bin
# the place man pages are located.
MANDIR = $(HOME)/man/man1

# Change the default resolution to reflect your printer's.
DEFS= -DDEBUG -DDEFRES=600 -DCREATIONDATE

# where TeX is `rooted'.  Sometimes /usr/local/lib/tex.
# TEXDIR = /usr/lib/tex
TEXDIR = .

# another place pk, tfm, and vf files might be found.
# LOCALDIR = /LocalLibrary/Fonts/TeXFonts
LOCALDIR = TeXFonts

# the default path to search for TFM files 
# (this usually is identical to TeX's defaultfontpath, which omits `.')
# (private fonts are given an explicit directory, which overrides the path)
#   overridden by the environment variable TEXFONTS
# TFMPATH = $(LOCALDIR)/tfm:$(TEXDIR)/fonts/tfm
TFMPATH = TeXFonts

# the default path to search for PK files (usually omits `.')
# Don't forget to add the directory that
# MakeTeXPK puts the files!  (In this case, /LocalLibrary/Fonts...)
#   overridden by the environment variable TEXPKS or TEXPACKED or PKFONTS
# PKPATH = $(LOCALDIR)/pk:$(TEXDIR)/fonts/pk
PKPATH = PKfonts

# the default path to search for VF files (usually omits `.')
#   overridden by the environment variable VFFONTS
# VFPATH = $(LOCALDIR)/vf:$(TEXDIR)/fonts/vf
VFPATH = VFfonts

# additional directories in which to search for subdirectories to find
# both tfm and pk files
FONTSUBDIRPATH = 

# where the config files go
# CONFIGDIR = $(TEXDIR)/ps
CONFIGDIR = DVIPSconf

# the default path to search for config files
#   overridden by the environment variable TEXCONFIG
# CONFIGPATH = .:$(CONFIGDIR)
CONFIGPATH = DVIPSconf

# the name of your config file
# CONFIGFILE = config.ps
CONFIGFILE = config.ps

# where the header PS files go
# HEADERDIR = $(TEXDIR)/ps
HEADERDIR = DVIPSconf

# the default path to search for header files
# HEADERPATH = .:$(HEADERDIR)
HEADERPATH = DVIPSconf

# where epsf.tex and rotate.tex go (usually the TeX macros directory)
# TEXMACRODIR = $(TEXDIR)/inputs
TEXMACRODIR = TeXinputs

# the default path to search for epsf and psfiles
# (usually the same as TeX's defaultinputpath)
# FIGPATH = .:..:$(TEXDIR)/inputs
FIGPATH = .:TeXinputs

# change -DDEFRES=300 or whatever is required
#    if the default resolution is not 300 dpi,
# add -DDEBUG to turn on debugging capability
# add -DTPIC for tpic support
# add -DFONTLIB to search font libraries
# add -DSEARCH_SUBDIRECTORIES to search the FONTSUBDIRPATH.
# add -DHAVE_GETCWD if you have getcwd (relevant only for subdir searching)
# add -DIBM6000 for compiling on IBM 6000 systems
# add -DCREATIONDATE if your system has a working time() and you want dated files
# (for VM/CMS, see the MKDVIPS.EXEC file in the vmcms subdirectory).
#
#   If you define FONTLIB, make sure to also give definitions to
#   FLIPATH and FLINAME.
#
#   If your compiler doesn't like void*, then add
#      -DVOID=char
#

# either use
# OPT = -O -funsigned-char
# or
OPT = -g -Wall -funsigned-char

# libraries to include (-lm -lc on most systems)
#FLIBS= -lNeXT_s -lsys_s
FLIBS= -lm -lc

# If you are compiling dvips for suid or other privileges, you will
# definitely want to define the following symbol; else don't.
# SECURE = -DSECURE

# If you want EMTEX specials, define the following.
# EMTEX = -DEMTEX

# for SYSV (and friends which use <string.h> instead of <strings.h>)
# define the c-compiler flag
# add -D_POSIX_SOURCE if you are POSIX (also define SYSV) (only relevant
# for subdir searching)
# SYS = -DSYSV

# Define this to be whatever you use for installation.  If you don't have
# install, use a script that invokes copy and chmod's the files
# appropriately.
# INSTALL = install
INSTALL = install

PATHS = -DTFMPATH=\"$(TFMPATH)\" \
	-DPKPATH=\"$(PKPATH)\" \
	-DVFPATH=\"$(VFPATH)\" \
	-DHEADERPATH=\"$(HEADERPATH)\" \
	-DCONFIGPATH=\"$(CONFIGPATH)\" \
        -DCONFIGFILE=\"$(CONFIGFILE)\" \
	-DFONTSUBDIRPATH=\"$(FONTSUBDIRPATH)\" \
	-DFIGPATH=\"$(FIGPATH)\"

CFLAGS = $(DEFS) $(OPT) $(SYS) $(SECURE) $(EMTEX) $(DEFPFMT)

SRC = dospecial.c dviinput.c fontdef.c loadfont.c dvips.c tfmload.c \
	download.c prescan.c scanpage.c skippage.c output.c scalewidth.c \
	dosection.c dopage.c resident.c search.c unpack.c drawPS.c \
	header.c makefont.c repack.c virtualfont.c dpicheck.c finclude.c \
	pprescan.c papersiz.c flib.c color.c bbox.c emspecial.c t1part.c \
        hps.c

OBJ = dospecial.o dviinput.o fontdef.o loadfont.o dvips.o tfmload.o \
	download.o prescan.o scanpage.o skippage.o output.o scalewidth.o \
	dosection.o dopage.o resident.o search.o unpack.o drawPS.o \
	header.o makefont.o repack.o virtualfont.o dpicheck.o finclude.o \
	pprescan.o papersiz.o flib.o color.o bbox.o emspecial.o t1part.o \
        hps.o

all : afm2tfm dvips tex.pro texps.pro texc.pro special.pro finclude.pro \
      color.pro crop.pro hps.pro

dvips : $(OBJ)
	$(CC) $(CFLAGS) $(OBJ) $(LIBS) $(FLIBS) -o dvips

dvips.o: dvips.c
	$(CC) $(CFLAGS) $(PATHS) -c dvips.c

afm2tfm: afm2tfm.c
	$(CC) $(CFLAGS) -o afm2tfm afm2tfm.c $(LIBS) $(FLIBS)

$(OBJ) : dvips.h debug.h
flib.o resident.o dvips.o loadfont.o tfmload.o : paths.h

squeeze : squeeze.o
	$(CC) $(CFLAGS) squeeze.o -o squeeze $(LIBS) $(FLIBS)

tex.pro : tex.lpro squeeze
	./squeeze <tex.lpro > tex.pro

texc.pro: texc.lpro squeeze
	./squeeze <texc.lpro >texc.pro

texc.lpro: texc.script tex.lpro
	sh texc.script tex.lpro texc.lpro

texps.pro : texps.lpro squeeze
	./squeeze <texps.lpro >texps.pro

special.pro : special.lpro squeeze
	./squeeze <special.lpro >special.pro

finclude.pro : finclude.lpro squeeze
	./squeeze <finclude.lpro >finclude.pro

color.pro : color.lpro squeeze
	./squeeze <color.lpro >color.pro

crop.pro : crop.lpro squeeze
	./squeeze <crop.lpro >crop.pro

hps.pro : hps.lpro squeeze
	./squeeze <hps.lpro >hps.pro

install : afm2tfm dvips MakeTeXPK \
	tex.pro texc.pro texps.pro special.pro finclude.pro color.pro \
	crop.pro hps.pro config.ps psfonts.map epsf.tex rotate.tex \
	colordvi.tex blackdvi.tex \
	dvips.tex dvipsmac.tex
	- mkdir $(BINDIR)
	- mkdir $(CONFIGDIR)
	- mkdir $(HEADERDIR)
	- mkdir $(TEXMACRODIR)
	$(INSTALL) -c -m 755 afm2tfm $(BINDIR)/afm2tfm
	$(INSTALL) -c -m 755 dvips $(BINDIR)/dvips
	$(INSTALL) -c -m 755 MakeTeXPK $(BINDIR)/MakeTeXPK
	$(INSTALL) -c -m 644 tex.pro $(HEADERDIR)
	$(INSTALL) -c -m 644 texc.pro $(HEADERDIR)
	$(INSTALL) -c -m 644 texps.pro $(HEADERDIR)
	$(INSTALL) -c -m 644 special.pro $(HEADERDIR)
	$(INSTALL) -c -m 644 finclude.pro $(HEADERDIR)
	$(INSTALL) -c -m 644 color.pro $(HEADERDIR)
	$(INSTALL) -c -m 644 crop.pro $(HEADERDIR)
	$(INSTALL) -c -m 644 hps.pro $(HEADERDIR)
	$(INSTALL) -c -m 644 config.ps $(CONFIGDIR)/$(CONFIGFILE)
	$(INSTALL) -c -m 644 psfonts.map $(CONFIGDIR)
	$(INSTALL) -c -m 644 epsf.tex $(TEXMACRODIR)
	$(INSTALL) -c -m 644 rotate.tex $(TEXMACRODIR)
	$(INSTALL) -c -m 644 colordvi.tex $(TEXMACRODIR)
	$(INSTALL) -c -m 644 blackdvi.tex $(TEXMACRODIR)
	$(INSTALL) -c -m 644 dvips.tex $(TEXMACRODIR)
	$(INSTALL) -c -m 644 dvipsmac.tex $(TEXMACRODIR)
	- $(INSTALL) -c -m 644 dvips.1 $(MANDIR)
	- $(INSTALL) -c -m 644 afm2tfm.1 $(MANDIR)

veryclean :
	rm -f *.o dvips squeeze afm2tfm texc.lpro *.pro *~ *.log *.dvi

clean :
	rm -f *.o squeeze afm2tfm *~ *.log *.dvi

lint :
	lint $(DEFS) $(PATHS) $(SRC)
	lint $(DEFS) squeeze.c
	lint $(DEFS) afm2tfm.c