Makefile

Fri, 07 Mar 2003 11:02:31 +0000

author
eric
date
Fri, 07 Mar 2003 11:02:31 +0000
changeset 82
abb03c7f4aab
parent 80
96c64a7566df
child 86
7de78f7789ef
permissions
-rw-r--r--

added pdf_compare_obj().

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