summaryrefslogtreecommitdiffstats
path: root/src/devices/xditview/xditview.am
blob: 2968a66786775ee288315b043ce98194627e0e33 (plain) (blame)
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
# Copyright (C) 2014-2020 Free Software Foundation, Inc.
#
# This file is part of groff.
#
# groff 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 3 of the License, or
# (at your option) any later version.
#
# groff 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, see <http://www.gnu.org/licenses/>.

GXDITVIEWSOURCES = \
  src/devices/xditview/device.c \
  src/devices/xditview/draw.c \
  src/devices/xditview/draw.h \
  src/devices/xditview/Dvi.c \
  src/devices/xditview/font.c \
  src/devices/xditview/font.h \
  src/devices/xditview/lex.c \
  src/devices/xditview/lex.h \
  src/devices/xditview/page.c \
  src/devices/xditview/page.h \
  src/devices/xditview/parse.c \
  src/devices/xditview/parse.h \
  src/devices/xditview/xditview.c \
  src/devices/xditview/device.h \
  src/devices/xditview/DviP.h \
  src/devices/xditview/Menu.h \
  src/devices/xditview/Dvi.h

if WITHOUT_X11
EXTRA_DIST += $(GXDITVIEWSOURCES)
else
xditview_srcdir = $(top_srcdir)/src/devices/xditview
bin_PROGRAMS += gxditview
gxditview_CPPFLAGS = $(AM_CPPFLAGS) $(X_CFLAGS) -Dlint \
  -I$(top_builddir)/src/devices/xditview
gxditview_LDADD = $(X_LIBS) $(X_PRE_LIBS) -lXaw -lXmu -lXt -lX11 \
  $(X_EXTRA_LIBS) $(LIBM) libxutil.a lib/libgnu.a
XDITVIEW_GENHDRS = src/devices/xditview/GXditview-ad.h
gxditview_SOURCES = $(GXDITVIEWSOURCES)
nodist_gxditview_SOURCES = $(XDITVIEW_GENHDRS)
CLEANFILES += $(XDITVIEW_GENHDRS)

man1_MANS += src/devices/xditview/gxditview.1

# Because we defined gxditview_CPPFLAGS, automake renames all the xditview's 
# objects, adding an "gxditview-" prefix. 
src/devices/xditview/gxditview-device.$(OBJEXT): defs.h
src/devices/xditview/gxditview-xditview.$(OBJEXT): $(XDITVIEW_GENHDRS)

src/devices/xditview/GXditview-ad.h: $(xditview_srcdir)/GXditview.ad
	@echo Making $@
	$(SHELL) $(xditview_srcdir)/ad2c $(xditview_srcdir)/GXditview.ad > $@
endif

EXTRA_DIST += \
  src/devices/xditview/ad2c \
  src/devices/xditview/ChangeLog \
  src/devices/xditview/DESC.in \
  src/devices/xditview/FontMap \
  src/devices/xditview/GXditview-color.ad \
  src/devices/xditview/GXditview.ad \
  src/devices/xditview/README \
  src/devices/xditview/TODO \
  src/devices/xditview/gray1.bm \
  src/devices/xditview/gray2.bm \
  src/devices/xditview/gray3.bm \
  src/devices/xditview/gray4.bm \
  src/devices/xditview/gray5.bm \
  src/devices/xditview/gray6.bm \
  src/devices/xditview/gray7.bm \
  src/devices/xditview/gray8.bm \
  src/devices/xditview/xdit.bm \
  src/devices/xditview/xdit_mask.bm \
  src/devices/xditview/gxditview.1.man

# Custom installation of GXditview.ad and GXditview-color.ad
install-data-local: install_xditview
uninstall-local: uninstall_xditview

if WITHOUT_X11
install_xditview:
uninstall_xditview:
else
install_xditview: $(xditview_srcdir)/GXditview.ad $(xditview_srcdir)/GXditview-color.ad
	-test -d $(DESTDIR)$(appresdir) \
	  || $(mkinstalldirs) $(DESTDIR)$(appresdir)
	if test -f $(DESTDIR)$(appresdir)/GXditview; then \
	  mv $(DESTDIR)$(appresdir)/GXditview \
	    $(DESTDIR)$(appresdir)/GXditview.old; \
	fi
	if test -f $(DESTDIR)$(appresdir)/GXditview-color; then \
	  mv $(DESTDIR)$(appresdir)/GXditview-color \
	    $(DESTDIR)$(appresdir)/GXditview-color.old; \
	fi
	$(INSTALL_DATA) $(xditview_srcdir)/GXditview.ad \
	  $(DESTDIR)$(appresdir)/GXditview
	$(INSTALL_DATA) $(xditview_srcdir)/GXditview-color.ad \
	  $(DESTDIR)$(appresdir)/GXditview-color

uninstall_xditview:
	rm -f $(DESTDIR)$(appresdir)/GXditview
	rm -f $(DESTDIR)$(appresdir)/GXditview-color

endif


# Local Variables:
# fill-column: 72
# mode: makefile-automake
# End:
# vim: set autoindent filetype=automake textwidth=72: