Wed, 05 Mar 2003 01:58:36 +0000
added bookmark support.
1 # t2p: build a PDF file out of one or more TIFF Class F Group 4 files
2 # Makefile
3 # $Id: Makefile,v 1.17 2003/03/04 17:58:36 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_bookmark.c pdf_g4.c pdf_g4_table_gen.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
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 pdf_g4_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_bookmark.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
74 pdf_g4_tables.h: pdf_g4_table_gen
75 ./pdf_g4_table_gen >pdf_g4_tables.h
77 pdf_g4_table_gen: pdf_g4_table_gen.o
80 dist: $(DISTFILES)
81 -rm -rf $(DISTNAME)
82 mkdir $(DISTNAME)
83 for f in $(DISTFILES); do ln $$f $(DISTNAME)/$$f; done
84 tar --gzip -chf $(DISTNAME).tar.gz $(DISTNAME)
85 -rm -rf $(DISTNAME)
88 clean:
89 rm -f *.o *.d $(TARGETS) $(AUTO_CSRCS) $(AUTO_HDRS) $(AUTO_MISC)
91 very_clean:
92 rm -f *.o *.d $(TARGETS) $(AUTO_CSRCS) $(AUTO_HDRS) $(AUTO_MISC) \
93 *~ *.pdf
95 wc:
96 wc -l $(HDRS) $(CSRCS) $(OSRCS) $(MISC)
98 ls-lt:
99 ls -lt $(HDRS) $(CSRCS) $(OSRCS) $(MISC)
102 %.tab.c %.tab.h %.output: %.y
103 $(YACC) $(YFLAGS) $<
106 ALL_CSRCS = $(CSRCS) $(AUTO_CSRCS)
108 DEPENDS = $(ALL_CSRCS:.c=.d)
110 %.d: %.c
111 $(CC) -M -MG $(CFLAGS) $< | sed -e 's@ /[^ ]*@@g' -e 's@^\(.*\)\.o:@\1.d \1.o:@' > $@
113 include $(DEPENDS)