summaryrefslogtreecommitdiff
path: root/Build/source/texk/dvipng/Makefile.in
blob: ad57e7e059ddcfdd575387073ca132bde990683e (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
# Makefile is generated by 'configure' from Makefile.in

#************************************************************************
#
#  Part of the dvipng distribution
#
#  This program is free software; you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation; either version 2 of the License, or
#  (at your option) any later version.
#
#  This program is distributed in the hope that it will be useful, but
#  WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
#  General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with this program; if not, write to the Free Software
#  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
#  02110-1301 USA.
#
#  Copyright (C) 2002-2005 Jan-Åke Larsson
#
#************************************************************************

PACKAGE_STRING="@PACKAGE_STRING@"

FREETYPE2DIR = ../../libs/freetype2
FREETYPE2SRCDIR = $(srcdir)/$(FREETYPE2DIR)
FREETYPE2CPPFLAGS = @FREETYPE2CPPFLAGS@
FREETYPE2DEP = @FREETYPE2DEP@
LDFREETYPE2 = @LDFREETYPE2@

GDDIR=../../libs/gd
GDSRCDIR=$(srcdir)/$(GDDIR)
GDCPPFLAGS = @GDCPPFLAGS@
GDDEP = @GDDEP@
LDGD = @LDGD@

LIBT1DIR=../../libs/t1lib
LIBT1SRCDIR=$(srcdir)/$(LIBT1DIR)
LIBT1CPPFLAGS = @LIBT1CPPFLAGS@
LIBT1DEP = @LIBT1DEP@
LDLIBT1 = @LDLIBT1@

LIBPNGDIR=../../libs/libpng
LIBPNGSRCDIR=$(srcdir)/$(LIBPNGDIR)
LIBPNGCPPFLAGS = @LIBPNGCPPFLAGS@
LIBPNGDEP = @LIBPNGDEP@
LDLIBPNG = @LDLIBPNG@

ZLIBDIR=../../libs/zlib
ZLIBSRCDIR=$(srcdir)/$(ZLIBDIR)
ZLIBCPPFLAGS = @ZLIBCPPFLAGS@
ZLIBDEP = @ZLIBDEP@
LDZLIB = @LDZLIB@

lib_cppflags = $(GDCPPFLAGS) $(FREETYPE2CPPFLAGS) $(LIBT1CPPFLAGS) \
               $(LIBPNGCPPFLAGS) $(ZLIBCPPFLAGS) -I.. -I$(srcdir)/..
lib_libs = $(LDGD) $(LDFREETYPE2) $(LDLIBT1) $(LDLIBPNG) $(LDZLIB)

CC = @CC@
CFLAGS = @CFLAGS@ -Wall
CPPFLAGS = @CPPFLAGS@ -I. $(lib_cppflags)
# -I. must come first, or get gd/config.h.
LN_S = @LN_S@

LIBS = $(lib_libs) @LIBS@
LDFLAGS = @LDFLAGS@

srcdir = @srcdir@
VPATH = @srcdir@

prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
infodir = @infodir@
mandir = @mandir@
DESTDIR=
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
MKINSTALLDIRS = $(srcdir)/mkinstalldirs

MAKEINFO=@MAKEINFO@ @MAKEINFO_MACROS@
INSTALL_INFO=@INSTALL_INFO@
TEX=tex
TEXIDVI=texi2dvi
TEXIHTML=texi2html
DVIPS=dvips
TEXIFILES = dvipng.texi readme.texi install.texi macros.texi dvipng.help

objects = dvipng.o color.o draw.o dvi.o font.o misc.o pk.o \
	set.o special.o papersiz.o ppagelist.o \
	vf.o @PSFONTS_O@

all: dvipng docs

install: @INSTALL_BIN_TARGET@   @INSTALL_BIN_TARGET@-docs

####################################### The program

dvipng: $(objects)
	$(CC) $(LDFLAGS) $(objects) -o dvipng $(LIBS) 

$(objects): dvipng.h commands.h config.h

install-dvipng: dvipng
	-$(MKINSTALLDIRS) $(DESTDIR)$(bindir)
	$(INSTALL) dvipng $(DESTDIR)$(bindir)

install-dvigif: install-dvipng
	(cd $(DESTDIR)$(bindir) && rm -f dvigif && $(LN_S) dvipng dvigif)

####################################### The documentation

docs: dvipng.dvi dvipng.info

dvipng.dvi: $(TEXIFILES)
	-$(TEXIDVI) -I $(srcdir) $(srcdir)/dvipng.texi

dvipng.ps: dvipng.dvi
	$(DVIPS) -Ppdf dvipng.dvi 

dvipng.info: $(TEXIFILES) dvipng.help
	-$(MAKEINFO) -I$(srcdir) $(srcdir)/dvipng.texi

dvipng.help: misc.c
	-./dvipng > dvipng.tmp
	( test -r dvipng.help && diff dvipng.tmp dvipng.help ) \
		|| cp dvipng.tmp dvipng.help
	rm -f dvipng.tmp

www: $(TEXIFILES) dvipng.help
	texi2html -split chapter -nosec-nav -subdir html \
	   -I $(srcdir) $(srcdir)/dvipng.texi
	(cd html; for i in *; do \
	   sed -e "s/Jan-A/Jan-\&Aring\;/g" $$i > ../www/$$i; \
	done) 
	cp www/dvipng.html www/index.html
	rm -rf html

dvipng_mono.html: $(TEXIFILES) dvipng.help
	texi2html --monolithic -nomenu -nosec_nav -o dvipng_mono.html \
		 -I $(srcdir) $(srcdir)/dvipng.texi

INSTALL: install.texi
	-$(MAKEINFO) -D rawfile --no-headers --no-validate \
		--no-number-sections \
		-I$(srcdir) $(srcdir)/install.texi --output INSTALL

README: readme.texi
	-$(MAKEINFO) -D rawfile --no-headers --no-validate \
		--no-number-sections \
		-I$(srcdir) $(srcdir)/readme.texi --output README

dvipng.1: dvipng.texi readme.texi
	texi2pod.pl -D man $(srcdir)/dvipng.texi | \
	sed -es/@//g -es/previewlatex/preview-latex/g -es/{}//g > dvipng.pod
	pod2man --center="User commands" --release=$(PACKAGE_STRING)\
		dvipng.pod > dvipng.1
	rm dvipng.pod

install-docs: docs
	-$(MKINSTALLDIRS) $(DESTDIR)$(infodir)
	for x in $(srcdir)/dvipng.info* ; do \
		$(INSTALL_DATA) $$x $(DESTDIR)$(infodir) ; \
	done
	-$(INSTALL_INFO) --info-dir=$(DESTDIR)$(infodir) $(srcdir)/dvipng.info
	-$(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man1
	$(INSTALL_DATA) $(srcdir)/dvipng.1 $(DESTDIR)$(mandir)/man1

install-dvipng-docs: install-docs

install-dvigif-docs: install-docs
	(cd $(DESTDIR)$(mandir)/man1 && rm -f dvigif.1 && $(LN_S) dvipng.1 dvigif.1)

####################################### The test

test: test_dvipng.dvi dvipng
	./dvipng -T tight -strict test_dvipng
	echo View the result e.g. with xv test_dvipng\*.png

test_dvipng.dvi: test_dvipng.tex
	latex $(srcdir)/test_dvipng.tex

####################################### The cleaning up

clean:
	rm -f *.o dvipng *.help *.info* *dvipng.dvi *.aux *.log
	rm -f *dvipng.ps *.cp *.fn *.ky *~ \#*\# \
		*.tp *.vr *.pg *.toc *.tp *.bak *.cps *.kys *.tps \
		*.fns *.vrs *.pgs *.html *.tmp

distclean: clean
	rm -f Makefile
	rm -f config.status config.log config.cache c-auto.h

dist: INSTALL README dvipng.1 distclean

# SunOS make suffix rule wierdness
.cps.h: