Makefile

Fri, 21 Feb 2003 08:49:11 +0000

author
eric
date
Fri, 21 Feb 2003 08:49:11 +0000
changeset 63
6eddf63aa517
parent 62
9bd354b83e16
child 70
16e2cf55dbd9
permissions
-rw-r--r--

GPL.

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