Makefile

Sat, 08 Mar 2003 06:52:09 +0000

author
eric
date
Sat, 08 Mar 2003 06:52:09 +0000
changeset 85
dcfd1d4b5c24
parent 80
96c64a7566df
child 86
7de78f7789ef
permissions
-rw-r--r--

add linked list of name trees to struct pdf_file, and finalize all name trees when PDF file is closed.

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