Fri, 21 Feb 2003 12:29:16 +0000
updated HDRS
1 # t2p: build a PDF file out of one or more TIFF Class F Group 4 files
2 # Makefile
3 # $Id: Makefile,v 1.15 2003/02/21 04:29:16 eric Exp $
4 # Copyright 2001 Eric Smith <eric@brouhaha.com>
5 #
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License version 2 as
8 # published by the Free Software Foundation. Note that permission is
9 # not granted to redistribute this program under the terms of any
10 # other version of the General Public License.
11 #
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
16 #
17 # You should have received a copy of the GNU General Public License
18 # along with this program; if not, write to the Free Software
19 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA
22 CFLAGS = -Wall -g
24 # Panda is not all that common, so we'll statically link it in order to
25 # make the t2p binary more portable.
27 LDFLAGS = -g
28 LDLIBS = -ltiff -lm
30 YACC = bison
31 YFLAGS = -d -v
34 # -----------------------------------------------------------------------------
35 # You shouldn't have to change anything below this point, but if you do please
36 # let me know why so I can improve this Makefile.
37 # -----------------------------------------------------------------------------
39 VERSION = 0.10
41 PACKAGE = t2p
43 TARGETS = t2p bitblt_test
45 CSRCS = t2p.c semantics.c bitblt.c bitblt_test.c bitblt_table_gen.c \
46 pdf.c pdf_util.c pdf_prim.c pdf_g4.c
47 OSRCS = scanner.l parser.y
48 HDRS = t2p.h semantics.h bitblt.h \
49 pdf.h pdf_private.h pdf_util.h pdf_prim.h pdf_g4_codes.h
50 MISC = COPYING Makefile
52 DISTFILES = $(MISC) $(HDRS) $(CSRCS) $(OSRCS)
53 DISTNAME = $(PACKAGE)-$(VERSION)
56 AUTO_CSRCS = scanner.c parser.tab.c
57 AUTO_HDRS = parser.tab.h bitblt_tables.h
58 AUTO_MISC = parser.output
61 all: $(TARGETS)
64 t2p: t2p.o scanner.o semantics.o parser.tab.o bitblt.o \
65 pdf.o pdf_util.o pdf_prim.o pdf_g4.o
67 bitblt_tables.h: bitblt_table_gen
68 ./bitblt_table_gen >bitblt_tables.h
70 bitblt_table_gen: bitblt_table_gen.o
72 bitblt_test: bitblt_test.o bitblt.o
75 dist: $(DISTFILES)
76 -rm -rf $(DISTNAME)
77 mkdir $(DISTNAME)
78 for f in $(DISTFILES); do ln $$f $(DISTNAME)/$$f; done
79 tar --gzip -chf $(DISTNAME).tar.gz $(DISTNAME)
80 -rm -rf $(DISTNAME)
83 clean:
84 rm -f *.o *.d $(TARGETS) $(AUTO_CSRCS) $(AUTO_HDRS) $(AUTO_MISC)
86 very_clean:
87 rm -f *.o *.d $(TARGETS) $(AUTO_CSRCS) $(AUTO_HDRS) $(AUTO_MISC) \
88 *~ *.pdf
90 wc:
91 wc -l $(HDRS) $(CSRCS) $(OSRCS) $(MISC)
93 ls-lt:
94 ls -lt $(HDRS) $(CSRCS) $(OSRCS) $(MISC)
97 %.tab.c %.tab.h %.output: %.y
98 $(YACC) $(YFLAGS) $<
101 ALL_CSRCS = $(CSRCS) $(AUTO_CSRCS)
103 DEPENDS = $(ALL_CSRCS:.c=.d)
105 %.d: %.c
106 $(CC) -M -MG $(CFLAGS) $< | sed -e 's@ /[^ ]*@@g' -e 's@^\(.*\)\.o:@\1.d \1.o:@' > $@
108 include $(DEPENDS)