Tue, 11 Mar 2003 11:14:39 +0000
many bug fixes including bit ordering of output, search positions and polarities. added G4_DEBUG conditional.
eric@44 | 1 | # t2p: build a PDF file out of one or more TIFF Class F Group 4 files |
eric@1 | 2 | # Makefile |
eric@91 | 3 | # $Id: Makefile,v 1.21 2003/03/10 01:49:49 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@90 | 22 | # Conditionals: uncomment the following defines as nessary. Note that a |
eric@90 | 23 | # "0" value is considered true by make, so to disable conditionals comment |
eric@90 | 24 | # them out or set them to a null string. |
eric@86 | 25 | |
eric@90 | 26 | #DEBUG=1 |
eric@90 | 27 | #EFENCE=1 |
eric@90 | 28 | #STATIC=1 |
eric@86 | 29 | |
eric@86 | 30 | |
eric@86 | 31 | CFLAGS = -Wall |
eric@86 | 32 | LDFLAGS = |
eric@86 | 33 | LDLIBS = -ltiff -ljpeg -lz -lm |
eric@53 | 34 | |
eric@86 | 35 | ifdef DEBUG |
eric@86 | 36 | CFLAGS := $(CFLAGS) -g |
eric@86 | 37 | LDFLAGS := $(LDFLAGS) -g |
eric@90 | 38 | endif |
eric@90 | 39 | |
eric@90 | 40 | ifdef EFENCE |
eric@86 | 41 | LDLIBS := $(LDLIBS) -lefence -lpthread |
eric@86 | 42 | endif |
eric@53 | 43 | |
eric@86 | 44 | ifdef STATIC |
eric@86 | 45 | LDLIBS := -Wl,-static $(LDLIBS) |
eric@86 | 46 | endif |
eric@86 | 47 | |
eric@53 | 48 | |
eric@6 | 49 | YACC = bison |
eric@6 | 50 | YFLAGS = -d -v |
eric@6 | 51 | |
eric@53 | 52 | |
eric@51 | 53 | # ----------------------------------------------------------------------------- |
eric@51 | 54 | # You shouldn't have to change anything below this point, but if you do please |
eric@51 | 55 | # let me know why so I can improve this Makefile. |
eric@51 | 56 | # ----------------------------------------------------------------------------- |
eric@51 | 57 | |
eric@86 | 58 | VERSION = 0.11 |
eric@51 | 59 | |
eric@51 | 60 | PACKAGE = t2p |
eric@12 | 61 | |
eric@90 | 62 | TARGETS = t2p |
eric@15 | 63 | |
eric@80 | 64 | CSRCS = t2p.c semantics.c \ |
eric@91 | 65 | bitblt.c bitblt_table_gen.c bitblt_g4.c g4_table_gen.c \ |
eric@91 | 66 | pdf.c pdf_util.c pdf_prim.c pdf_bookmark.c pdf_name_tree.c pdf_g4.c |
eric@51 | 67 | OSRCS = scanner.l parser.y |
eric@70 | 68 | HDRS = t2p.h semantics.h bitblt.h \ |
eric@80 | 69 | pdf.h pdf_private.h pdf_util.h pdf_prim.h pdf_name_tree.h |
eric@51 | 70 | MISC = COPYING Makefile |
eric@51 | 71 | |
eric@51 | 72 | DISTFILES = $(MISC) $(HDRS) $(CSRCS) $(OSRCS) |
eric@51 | 73 | DISTNAME = $(PACKAGE)-$(VERSION) |
eric@51 | 74 | |
eric@51 | 75 | |
eric@51 | 76 | AUTO_CSRCS = scanner.c parser.tab.c |
eric@91 | 77 | AUTO_HDRS = parser.tab.h bitblt_tables.h g4_tables.h |
eric@15 | 78 | AUTO_MISC = parser.output |
eric@15 | 79 | |
eric@51 | 80 | |
eric@90 | 81 | -include Maketest |
eric@90 | 82 | |
eric@90 | 83 | |
eric@90 | 84 | all: $(TARGETS) $(TEST_TARGETS) |
eric@51 | 85 | |
eric@51 | 86 | |
eric@91 | 87 | t2p: t2p.o scanner.o semantics.o parser.tab.o bitblt.o bitblt_g4.o \ |
eric@91 | 88 | pdf.o pdf_util.o pdf_prim.o pdf_bookmark.o pdf_name_tree.o \ |
eric@91 | 89 | pdf_g4.o |
eric@86 | 90 | $(LINK.o) $^ $(LOADLIBES) $(LDLIBS) -o $@ |
eric@86 | 91 | ifndef DEBUG |
eric@86 | 92 | strip $@ |
eric@86 | 93 | endif |
eric@86 | 94 | |
eric@53 | 95 | |
eric@53 | 96 | bitblt_tables.h: bitblt_table_gen |
eric@53 | 97 | ./bitblt_table_gen >bitblt_tables.h |
eric@53 | 98 | |
eric@53 | 99 | bitblt_table_gen: bitblt_table_gen.o |
eric@53 | 100 | |
eric@91 | 101 | g4_tables.h: g4_table_gen |
eric@91 | 102 | ./g4_table_gen >g4_tables.h |
eric@71 | 103 | |
eric@91 | 104 | g4_table_gen: g4_table_gen.o |
eric@71 | 105 | |
eric@53 | 106 | |
eric@51 | 107 | dist: $(DISTFILES) |
eric@51 | 108 | -rm -rf $(DISTNAME) |
eric@51 | 109 | mkdir $(DISTNAME) |
eric@51 | 110 | for f in $(DISTFILES); do ln $$f $(DISTNAME)/$$f; done |
eric@51 | 111 | tar --gzip -chf $(DISTNAME).tar.gz $(DISTNAME) |
eric@51 | 112 | -rm -rf $(DISTNAME) |
eric@51 | 113 | |
eric@51 | 114 | |
eric@15 | 115 | clean: |
eric@53 | 116 | rm -f *.o *.d $(TARGETS) $(AUTO_CSRCS) $(AUTO_HDRS) $(AUTO_MISC) |
eric@44 | 117 | |
eric@44 | 118 | very_clean: |
eric@53 | 119 | rm -f *.o *.d $(TARGETS) $(AUTO_CSRCS) $(AUTO_HDRS) $(AUTO_MISC) \ |
eric@44 | 120 | |
eric@15 | 121 | |
eric@20 | 122 | wc: |
eric@51 | 123 | wc -l $(HDRS) $(CSRCS) $(OSRCS) $(MISC) |
eric@20 | 124 | |
eric@20 | 125 | ls-lt: |
eric@51 | 126 | ls -lt $(HDRS) $(CSRCS) $(OSRCS) $(MISC) |
eric@20 | 127 | |
eric@15 | 128 | |
eric@15 | 129 | %.tab.c %.tab.h %.output: %.y |
eric@6 | 130 | $(YACC) $(YFLAGS) $< |
eric@6 | 131 | |
eric@15 | 132 | |
eric@90 | 133 | ALL_CSRCS = $(CSRCS) $(AUTO_CSRCS) $(TEST_CSRCS) |
eric@15 | 134 | |
eric@51 | 135 | DEPENDS = $(ALL_CSRCS:.c=.d) |
eric@15 | 136 | |
eric@15 | 137 | %.d: %.c |
eric@15 | 138 | $(CC) -M -MG $(CFLAGS) $< | sed -e 's@ /[^ ]*@@g' -e 's@^\(.*\)\.o:@\1.d \1.o:@' > $@ |
eric@15 | 139 | |
eric@15 | 140 | include $(DEPENDS) |