1## $Id: Makefile.am,v 1.17.2.6 2002/06/05 23:52:05 rlk Exp $ 2## Copyright (C) 2000 Roger Leigh 3## 4## This program is free software; you can redistribute it and/or modify 5## it under the terms of the GNU General Public License as published by 6## the Free Software Foundation; either version 2, or (at your option) 7## any later version. 8## 9## This program is distributed in the hope that it will be useful, 10## but WITHOUT ANY WARRANTY; without even the implied warranty of 11## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12## GNU General Public License for more details. 13## 14## You should have received a copy of the GNU General Public License 15## along with this program; if not, write to the Free Software 16## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 18## Process this file with automake to produce Makefile.in. 19 20AUTOMAKE_OPTIONS = 1.4 gnu 21 22@SET_MAKE@ 23 24MAINT_CHARSET = latin1 25 26## Use old compatability method for now... 27 28## Variables 29 30MAINCODE = canon.c \ 31 color.c \ 32 dither.c \ 33 escp2.c \ 34 escp2-data.c \ 35 lexmark.c \ 36 pcl.c \ 37 printers.c \ 38 ps.c \ 39 util.c \ 40 weave.c \ 41 dither-matrices.c 42 43MAINHEADERS = print.h \ 44 print-internal.h \ 45 print-intl-internal.h \ 46 quickmatrix257.h \ 47 ran.367.179.h \ 48 ran.509.131.h \ 49 print-dither.h \ 50 print-escp2.h 51 52MAINFILES = $(MAINCODE) $(MAINHEADERS) 53 54if BUILD_GHOST 55ALL_LOCAL_DEPS = $(srcdir)/$(addprefix gdevstp-,$(MAINCODE)) $(srcdir)/$(addprefix gdevstp-,$(MAINHEADERS)) 56else 57ALL_LOCAL_DEPS = 58endif 59 60 61## Rules 62 63all-local: $(ALL_LOCAL_DEPS) 64 65GHCODE = -e 's/print-printers.c/gdevstp-printers.c/' \ 66 -e 's/^\\\#include "\(gimp\-\)*\(.*\)\.h"$$/\\\#include "gdevstp-\2.h"/' \ 67 -e 's/^\\\#include <gimp-print\/gimp-print\(.*\)\.h>$$/\\\#include "gdevstp-print\1.h"/' 68 69$(srcdir)/gdevstp-print.h: $(top_srcdir)/include/gimp-print/gimp-print.h 70 sed $(GHCODE) $< > $(srcdir)/$@ 71 72$(srcdir)/gdevstp-print-internal.h: $(top_srcdir)/src/main/gimp-print-internal.h 73 echo '#define VERSION "@VERSION@"' > $(srcdir)/$@ 74 echo '#define RELEASE_DATE "@RELEASE_DATE@"' >> $(srcdir)/$@ 75 sed $(GHCODE) $< >> $(srcdir)/$@ 76 77$(srcdir)/gdevstp-print-intl-internal.h: $(top_srcdir)/include/gimp-print/gimp-print-intl-internal.h 78 sed $(GHCODE) $< > $(srcdir)/$@ 79 80gdevstp-%.h: $(srcdir)/../main/%.h Makefile 81 cd $(srcdir) ; sed $(GHCODE) $< > $@ 82 83gdevstp-printers.c: ../main/print-printers.c 84 sed $(GHCODE) $< > $@ 85 86gdevstp-%: $(srcdir)/../main/print-% Makefile 87 cd $(srcdir) ; sed $(GHCODE) $< > $@ 88 89../main/print-printers.c: ../printdef/printdef $(srcdir)/../main/printers.xml 90 ../printdef/printdef < $(srcdir)/../main/printers.xml > $(top_builddir)/src/main/print-printers.c 91 92printdefl.o: printdefy.o 93 94../printdef/printdef: $(addprefix ../printdef/, printdefl.l printdefy.y printdef.h) 95 cd ../printdef ; \ 96 $(MAKE) 97 98 99## Clean 100 101CLEANFILES = \ 102 $(srcdir)/gdevstp-printers.c \ 103 $(srcdir)/gdevstp-ran.367.179.h \ 104 $(srcdir)/gdevstp-ran.509.131.h \ 105 $(srcdir)/gdevstp-color.c \ 106 $(srcdir)/gdevstp-print.h \ 107 $(srcdir)/gdevstp-print-internal.h \ 108 $(srcdir)/gdevstp-print-intl-internal.h \ 109 $(srcdir)/gdevstp-quickmatrix257.h \ 110 $(srcdir)/gdevstp-util.c \ 111 $(srcdir)/gdevstp-weave.c \ 112 $(srcdir)/gdevstp-canon.c \ 113 $(srcdir)/gdevstp-dither.c \ 114 $(srcdir)/gdevstp-print-dither.h \ 115 $(srcdir)/gdevstp-dither-matrices.c \ 116 $(srcdir)/gdevstp-escp2.c \ 117 $(srcdir)/gdevstp-print-escp2.h \ 118 $(srcdir)/gdevstp-escp2-data.c \ 119 $(srcdir)/gdevstp-lexmark.c \ 120 $(srcdir)/gdevstp-pcl.c \ 121 $(srcdir)/gdevstp-ps.c 122 123# End of old compatability cruft 124 125MAINTAINERCLEANFILES = Makefile.in 126 127EXTRA_DIST = \ 128 COPYING \ 129 Makefile \ 130 Makefile.am \ 131 README \ 132 README.bsd \ 133 contrib.mak.addon.in \ 134 contrib.mak.addon.old \ 135 debian-patch \ 136 debian-patch-stp \ 137 devs.mak.addon-5.10 \ 138 gdevstp.c 139 140## Variables 141 142AM_CFLAGS = $(GNUCFLAGS) 143INCLUDES = @IJS_CFLAGS@ @INCLUDES@ $(LIBGIMPPRINT_CFLAGS) 144LIBPRINTUT = $(top_builddir)/lib/libprintut.la 145LIBS = @IJS_LIBS@ @LIBS@ $(INTLLIBS) 146 147## Programs 148 149IJS_BIN = ijsgimpprint 150 151bin_PROGRAMS = @IJS_BIN@ 152 153EXTRA_PROGRAMS = ijsgimpprint 154 155ijsgimpprint_LDADD = $(LIBPRINTUT) $(LIBGIMPPRINT_LIBS) 156ijsgimpprint_DEPENDENCIES = $(LIBGIMPPRINT_LIBS) 157 158$(LIBGIMPPRINT_LIBS): 159 cd ../main ; \ 160 $(MAKE) 161