Thu, 20 Feb 2003 12:21:10 +0000
my own PDF routines to replace Panda.
1 # t2p: build a PDF file out of one or more TIFF Class F Group 4 files
2 # Makefile
3 # $Id: Makefile,v 1.13 2003/02/20 04:21:10 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 -I/usr/local/include/panda
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 = -Wl,-static -lpanda -Wl,-dy -lpng -ltiff -ljpeg -lz -lm -L/usr/local/lib/panda
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 MISC = COPYING Makefile
51 DISTFILES = $(MISC) $(HDRS) $(CSRCS) $(OSRCS)
52 DISTNAME = $(PACKAGE)-$(VERSION)
55 AUTO_CSRCS = scanner.c parser.tab.c
56 AUTO_HDRS = parser.tab.h bitblt_tables.h
57 AUTO_MISC = parser.output
60 all: $(TARGETS)
63 t2p: t2p.o scanner.o semantics.o parser.tab.o bitblt.o \
64 pdf_util.o pdf_prim.o pdf_g4.o
66 bitblt_tables.h: bitblt_table_gen
67 ./bitblt_table_gen >bitblt_tables.h
69 bitblt_table_gen: bitblt_table_gen.o
71 bitblt_test: bitblt_test.o bitblt.o
74 dist: $(DISTFILES)
75 -rm -rf $(DISTNAME)
76 mkdir $(DISTNAME)
77 for f in $(DISTFILES); do ln $$f $(DISTNAME)/$$f; done
78 tar --gzip -chf $(DISTNAME).tar.gz $(DISTNAME)
79 -rm -rf $(DISTNAME)
82 clean:
83 rm -f *.o *.d $(TARGETS) $(AUTO_CSRCS) $(AUTO_HDRS) $(AUTO_MISC)
85 very_clean:
86 rm -f *.o *.d $(TARGETS) $(AUTO_CSRCS) $(AUTO_HDRS) $(AUTO_MISC) \
87 *~ *.pdf
89 wc:
90 wc -l $(HDRS) $(CSRCS) $(OSRCS) $(MISC)
92 ls-lt:
93 ls -lt $(HDRS) $(CSRCS) $(OSRCS) $(MISC)
96 %.tab.c %.tab.h %.output: %.y
97 $(YACC) $(YFLAGS) $<
100 ALL_CSRCS = $(CSRCS) $(AUTO_CSRCS)
102 DEPENDS = $(ALL_CSRCS:.c=.d)
104 %.d: %.c
105 $(CC) -M -MG $(CFLAGS) $< | sed -e 's@ /[^ ]*@@g' -e 's@^\(.*\)\.o:@\1.d \1.o:@' > $@
107 include $(DEPENDS)