Makefile

Thu, 20 Feb 2003 12:20:28 +0000

author
eric
date
Thu, 20 Feb 2003 12:20:28 +0000
changeset 60
ffb5b1e54eb2
parent 53
bb180150e603
child 61
0dbb3612d812
permissions
-rw-r--r--

fix includes.

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