Makefile

Wed, 05 Mar 2003 20:44:33 +0000

author
eric
date
Wed, 05 Mar 2003 20:44:33 +0000
changeset 78
74b6b230f85d
parent 74
12bc5088172e
child 80
96c64a7566df
permissions
-rw-r--r--

correct copyright years on recently created source files.

eric@44 1 # t2p: build a PDF file out of one or more TIFF Class F Group 4 files
eric@1 2 # Makefile
eric@74 3 # $Id: Makefile,v 1.17 2003/03/04 17:58:36 eric Exp $
eric@1 4 # Copyright 2001 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@61 45 CSRCS = t2p.c semantics.c bitblt.c bitblt_test.c bitblt_table_gen.c \
eric@74 46 pdf.c pdf_util.c pdf_prim.c pdf_bookmark.c pdf_g4.c pdf_g4_table_gen.c
eric@51 47 OSRCS = scanner.l parser.y
eric@70 48 HDRS = t2p.h semantics.h bitblt.h \
eric@71 49 pdf.h pdf_private.h pdf_util.h pdf_prim.h
eric@51 50 MISC = COPYING Makefile
eric@51 51
eric@51 52 DISTFILES = $(MISC) $(HDRS) $(CSRCS) $(OSRCS)
eric@51 53 DISTNAME = $(PACKAGE)-$(VERSION)
eric@51 54
eric@51 55
eric@51 56 AUTO_CSRCS = scanner.c parser.tab.c
eric@71 57 AUTO_HDRS = parser.tab.h bitblt_tables.h pdf_g4_tables.h
eric@15 58 AUTO_MISC = parser.output
eric@15 59
eric@51 60
eric@51 61 all: $(TARGETS)
eric@51 62
eric@51 63
eric@61 64 t2p: t2p.o scanner.o semantics.o parser.tab.o bitblt.o \
eric@74 65 pdf.o pdf_util.o pdf_prim.o pdf_bookmark.o pdf_g4.o
eric@53 66
eric@53 67 bitblt_tables.h: bitblt_table_gen
eric@53 68 ./bitblt_table_gen >bitblt_tables.h
eric@53 69
eric@53 70 bitblt_table_gen: bitblt_table_gen.o
eric@53 71
eric@53 72 bitblt_test: bitblt_test.o bitblt.o
eric@53 73
eric@71 74 pdf_g4_tables.h: pdf_g4_table_gen
eric@71 75 ./pdf_g4_table_gen >pdf_g4_tables.h
eric@71 76
eric@71 77 pdf_g4_table_gen: pdf_g4_table_gen.o
eric@71 78
eric@53 79
eric@51 80 dist: $(DISTFILES)
eric@51 81 -rm -rf $(DISTNAME)
eric@51 82 mkdir $(DISTNAME)
eric@51 83 for f in $(DISTFILES); do ln $$f $(DISTNAME)/$$f; done
eric@51 84 tar --gzip -chf $(DISTNAME).tar.gz $(DISTNAME)
eric@51 85 -rm -rf $(DISTNAME)
eric@51 86
eric@51 87
eric@15 88 clean:
eric@53 89 rm -f *.o *.d $(TARGETS) $(AUTO_CSRCS) $(AUTO_HDRS) $(AUTO_MISC)
eric@44 90
eric@44 91 very_clean:
eric@53 92 rm -f *.o *.d $(TARGETS) $(AUTO_CSRCS) $(AUTO_HDRS) $(AUTO_MISC) \
eric@44 93 *~ *.pdf
eric@15 94
eric@20 95 wc:
eric@51 96 wc -l $(HDRS) $(CSRCS) $(OSRCS) $(MISC)
eric@20 97
eric@20 98 ls-lt:
eric@51 99 ls -lt $(HDRS) $(CSRCS) $(OSRCS) $(MISC)
eric@20 100
eric@15 101
eric@15 102 %.tab.c %.tab.h %.output: %.y
eric@6 103 $(YACC) $(YFLAGS) $<
eric@6 104
eric@15 105
eric@51 106 ALL_CSRCS = $(CSRCS) $(AUTO_CSRCS)
eric@15 107
eric@51 108 DEPENDS = $(ALL_CSRCS:.c=.d)
eric@15 109
eric@15 110 %.d: %.c
eric@15 111 $(CC) -M -MG $(CFLAGS) $< | sed -e 's@ /[^ ]*@@g' -e 's@^\(.*\)\.o:@\1.d \1.o:@' > $@
eric@15 112
eric@15 113 include $(DEPENDS)