Makefile

Wed, 19 Feb 2003 10:14:49 +0000

author
eric
date
Wed, 19 Feb 2003 10:14:49 +0000
changeset 53
bb180150e603
parent 51
3398476bbedd
child 61
0dbb3612d812
permissions
-rw-r--r--

rename br.c to bitblt_table_gen.c, and integrate use of it into build process

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