summaryrefslogtreecommitdiff
path: root/Build/source/texk/dvipng/Makefile.am
blob: 7f6af504800e6179b3a1d6c4de70752baa959c9f (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
##
#************************************************************************
#
#  Part of the dvipng distribution
#
#  This program is free software: you can redistribute it and/or modify
#  it under the terms of the GNU Lesser General Public License as
#  published by the Free Software Foundation, either version 3 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
#  Lesser General Public License for more details.
#
#  You should have received a copy of the GNU Lesser General Public
#  License along with this program. If not, see
#  <http://www.gnu.org/licenses/>.
#
#  Copyright (C) 2002-2008 Jan-Åke Larsson
#
#************************************************************************
#
#  Adapted for TeX Live by  Peter Breitenlohner  <peb@mppmu.mpg.de>
#  All settings here are our fault, don't blame the dvipng maintainer for it.
#
#************************************************************************
##
ACLOCAL_AMFLAGS = -I ../../m4 -I m4

INCLUDES = $(KPATHSEA_INCLUDES) $(FREETYPE2_INCLUDES) $(GD_INCLUDES)
INCLUDES +=  $(T1LIB_INCLUDES) $(LIBPNG_INCLUDES) $(ZLIB_INCLUDES)
AM_CFLAGS = $(WARNING_CFLAGS)

DVIPS = dvips -Ppdf

TEXI2HTML = texi2html

# In order that `make distcheck' succeeds, we must not attempt to rebuild
# dvipng.info if dvipng.help has not changed,  Thus we delegate rebuilding
# dvipng.help and  dvipng.info, if necessary, to subdirectories. 
SUBDIRS = . help doc

## #################################### The program
##
bin_PROGRAMS = dvipng

dvipng_SOURCES = \
	color.c \
	commands.h \
	draw.c \
	dvi.c \
	dvipng.c \
	dvipng.h \
	font.c \
	misc.c \
	papersiz.c \
	pk.c \
	ppagelist.c \
	set.c \
	special.c \
	vf.c

if have_t1
dvipng_SOURCES += t1.c
endif have_t1

if have_ft2
dvipng_SOURCES += ft.c sfd.c
endif have_ft2

if have_ft2_or_t1
dvipng_SOURCES += enc.c fontmap.c tfm.c
endif have_ft2_or_t1

dvipng_DEPENDENCIES = $(KPATHSEA_DEPEND) $(FREETYPE2_DEPEND) $(GD_DEPEND)
dvipng_DEPENDENCIES += $(T1LIB_DEPEND) $(LIBPNG_DEPEND) $(ZLIB_DEPEND)

LDADD = $(KPATHSEA_LIBS) $(FREETYPE2_LIBS) $(GD_LIBS)
LDADD += $(T1LIB_LIBS) $(LIBPNG_LIBS) $(ZLIB_LIBS)

## Rebuild libkpathsea
@KPATHSEA_RULE@
## Rebuild libfreetype
@FREETYPE2_RULE@
## Rebuild libgd
@GD_RULE@
## Rebuild libt1
@T1LIB_RULE@
## Rebuild libpng
@LIBPNG_RULE@
## Rebuild libz
@ZLIB_RULE@

if have_gif
install-exec-hook:
	cd $(DESTDIR)$(bindir) && \
	  rm -f dvigif$(EXEEXT) && \
	  $(LN_S) dvipng$(EXEEXT) dvigif$(EXEEXT)
uninstall-hook:
	rm -f $(DESTDIR)$(bindir)/dvigif$(EXEEXT)
endif have_gif

## #################################### The test
##
test: test_dvipng.dvi dvipng$(EXEEXT)
	./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

TESTS = dvipng.test

EXTRA_DIST = dvipng.test test_dvipng.tex

CLEANFILES = missfont.log test_dvipng.aux test_dvipng.dvi test_dvipng.log test_dvipng*.png

## #################################### Maintainer targets
##
## Make sure INSTALL and README exist
##
EXTRA_DIST += ChangeLog.0 INSTALL README RELEASE

## Not used
##
EXTRA_DIST += miktex.h miktex.mak

## #################################### Build as part of the TeX Live tree
##
EXTRA_DIST += ChangeLog.TL

## Patches applied to the dvipng-1.12 distribution
##
EXTRA_DIST += dvipng-1.12-patches

## Original files from the dvipng distribution
##
EXTRA_DIST += Makefile.in.orig aclocal.m4.orig configure.ac.orig