summaryrefslogtreecommitdiff
path: root/Build/source/texk/dvipsk/win32.mak
blob: 3867c08082c775f0715a9ed51981c80d86e77de1 (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
234
235
236
237
238
239
240
241
242
################################################################################
#
# Makefile  : Dvipsk
# Author    : Fabrice Popineau <Fabrice.Popineau@supelec.fr>
# Platform  : Win32, Microsoft VC++ 6.0, depends upon fpTeX 0.5 sources
# Time-stamp: <03/11/16 17:29:08 popineau>
#
################################################################################
root_srcdir = ..\..
!ifdef DEVELOPMENT
INCLUDE=$(INCLUDE);$(root_srcdir)\texk.development
!else
INCLUDE=$(INCLUDE);$(root_srcdir)\texk
!endif

version = 5.86g

# Add -DDEFRES=dpi to DEFS to change the default resolution from 600.
# Add -DSECURE if you will install dvips with special privileges.
# Add -DNO_DEBUG to omit debugging support.
# Add -DNO_EMTEX to omit EMTEX specials.
# Add -DNO_HPS to omit hypertex support.
# Add -DNO_TPIC to omit tpic support.
# 
# For VM/CMS or (perhaps) VMS or DOS compilation, need the corresponding
# subdirectory from the original dvips distribution.  (Maybe dvipsk
# won't work at all on such systems; if you have info one way or the
# other, please let kb@cs.umb.edu know.)
USE_KPATHSEA = 1
USE_GNUW32 = 1

!include <msvc/common.mak>

DEFS = $(DEFS) -DHAVE_CONFIG_H

!ifdef USE_KPATHSEA
DEFS = $(DEFS) -DDEFRES=600 -DA4 -DSHIFTLOWCHARS \
	-DKPATHSEA                               \
	-DNeedFunctionPrototypes

!else
DEFS = $(DEFS) -DDEFRES=600
!endif

# writet1.c is taken from pdftex
pdftexdir = ..\web2c\pdftexdir

# The `t[mp]-' business is so that we don't create an empty .pro file,
# if running squeeze fails for some reason.  A dependency on squeeze
# fails here, so we include it below.
.SUFFIXES: .pro .lpro
.lpro.pro:
	.\$(objdir)\squeeze <$< >t-$@
	$(copy) t-$@ $@ && $(del) t-$@ $(redir_stdout)

prologues = tex.pro texps.pro texc.pro special.pro finclude.pro \
            color.pro crop.pro hps.pro

srcfiles = dospecial.c dviinput.c emspecial.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 repack.c  \
	virtualfont.c dpicheck.c finclude.c $(pdftexdir)\writet1.c pprescan.c    \
	papersiz.c color.c bbox.c hps.c flib.c

objects = $(objdir)\dospecial.obj $(objdir)\dviinput.obj   \
	$(objdir)\emspecial.obj $(objdir)\fontdef.obj      \
	$(objdir)\loadfont.obj $(objdir)\dvips.obj         \
	$(objdir)\tfmload.obj $(objdir)\download.obj       \
	$(objdir)\prescan.obj $(objdir)\scanpage.obj       \
	$(objdir)\skippage.obj $(objdir)\output.obj        \
	$(objdir)\scalewidth.obj $(objdir)\dosection.obj   \
	$(objdir)\dopage.obj $(objdir)\resident.obj        \
	$(objdir)\search.obj $(objdir)\unpack.obj          \
	$(objdir)\drawPS.obj $(objdir)\header.obj          \
	$(objdir)\repack.obj $(objdir)\virtualfont.obj     \
	$(objdir)\dpicheck.obj $(objdir)\finclude.obj      \
	$(objdir)\writet1.obj $(objdir)\pprescan.obj       \
	$(objdir)\papersiz.obj $(objdir)\color.obj         \
	$(objdir)\bbox.obj $(objdir)\hps.obj

program = $(objdir)\dvips.exe
programs = $(objdir)\afm2tfm.exe $(program)

installdirs =  $(mandir) $(infodir) $(psheaderdir)/base # $(dvips_plain_macrodir)

manfiles = dvips.1 afm2tfm.1
infofiles = dvips.info # dvips.info-1 dvips.info-2 dvips.info-3 dvips.info-3 dvips.info-4
pdfdocfiles = dvips.pdf
docsubdir = dvips

default all: $(objdir) $(programs) $(prologues) dvips.info

!ifdef USE_KPATHSEA
$(program): $(kpathsealib) $(objects) $(objdir)\dvips.res
	$(link) $(**) $(conlibs)
$(objdir)\afm2tfm.exe: $(kpathsealib) $(objdir)\afm2tfm.obj $(objdir)\afm2tfm.res
	$(link) $(**) $(conlibs)
# Omit LOADLIBES since no need to dynamically link with kpathsea.
$(objdir)\squeeze.exe: $(objdir)\squeeze.obj
	$(link) $(**) $(conlibs)

$(objdir)\writet1.obj: $(pdftexdir)\writet1.c
	$(compile) -I$(pdftexdir) $(pdftexdir)\writet1.c

!else
# where TeX is `rooted'.  Sometimes /usr/local/lib/tex.
# TEXDIR = /usr/lib/tex
TEXDIR = e:/Local/TeX/share/texmf

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

# 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 = .;$(LOCALDIR)/tfm;$(TEXDIR)/fonts/tfm

# 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 = .;$(LOCALDIR)/pk;$(TEXDIR)/fonts/pk

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

# 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 = $(TEXDIR)/dvips

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

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

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

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

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

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

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

DEFS = $(DEFS) $(PATHS)

objects = $(objects) $(objdir)/makefont.obj

$(program): $(objects) $(objdir)\dvips.res
	$(link) $(**) $(conlibs)
$(objdir)\afm2tfm.exe: $(objdir)\afm2tfm.obj $(objdir)\afm2tfm.res
	$(link) $(**) $(conlibs)
# Omit LOADLIBES since no need to dynamically link with kpathsea.
$(objdir)\squeeze.exe: $(objdir)\squeeze.obj
	$(link) $(**) $(conlibs)
!endif

$(prologues): $(objdir)\squeeze.exe

texc.lpro: texc.script tex.lpro
	$(sed) -f $(win32seddir)/texc-script.sed < .\tex.lpro > $@

!include <msvc/config.mak>

!include <msvc/install.mak>

check: all
	-@$(del) mtest.ps
	set TFMFONTS=$(srcdir)/testdata
	set VFFONTS=$(srcdir)/testdata
	-.\$(objdir)\dvips -D 300 $(srcdir)/testdata/dvipstst.xdv -o dvipstst.ps
	$(move) dvipstst.ps mtest.ps
	-.\$(objdir)\dvips -D 300 $(srcdir)/testdata/dvipstst.xdv -o
	-diff --ignore-all-space $(srcdir)/testdata/dvipstst.xps dvipstst.ps
	-@$(del) dvipstst.ps # mtest.ps

install:: install-exec install-data install-info install-man install-doc
	@echo "Create $(psheaderdir)/base/config.ps if necessary (see ./INSTALL)."

install-data::
# PostScript prologues and encodings.
	-@echo $(verbose) & ( \
		for %%h in ($(prologues)) do $(copy) %%h $(psheaderdir)\base\%%h $(redir_stdout) \
	)
	-@echo $(verbose) & ( \
		for %%e in (*.enc) do $(copy) reencode\%%e $(psheaderdir)\base\%%e $(redir_stdout) \
	)
!ifdef TETEX
	-@echo $(verbose) & ( \
		for %%m in (blackdvi.tex colordvi.tex epsf.tex rotate.tex) do \
			$(copy) tex\%%m $(dvips_plain_macrodir)\%%m $(redir_stdout) \
	)
!endif

!include <msvc/clean.mak>

extraclean::
	-@$(del) afm2tfm.ps dvips.ps testdata\*.log testdata\dvipstst.dvi \
	testdata\dvipstst.pdf testdata\dvipstst.ps testdata\mtest.ps

distclean::
	-@$(del) *.pro texc.lpro

!include <msvc/rdepend.mak>
!include "./depend.mak"

#
# Local Variables:
# mode: Makefile
# End: