Tue, 21 Jan 2003 18:53:48 +0000
added 'dist' target, and minor cleanup
eric@44 | 1 | # t2p: build a PDF file out of one or more TIFF Class F Group 4 files |
eric@1 | 2 | # Makefile |
eric@51 | 3 | # $Id: Makefile,v 1.11 2003/01/21 10:53:48 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@6 | 23 | LDLIBS = -g -ltiff -lm -L/usr/local/lib/panda -lpanda -lpng |
eric@6 | 24 | YACC = bison |
eric@6 | 25 | YFLAGS = -d -v |
eric@6 | 26 | |
eric@51 | 27 | # ----------------------------------------------------------------------------- |
eric@51 | 28 | # You shouldn't have to change anything below this point, but if you do please |
eric@51 | 29 | # let me know why so I can improve this Makefile. |
eric@51 | 30 | # ----------------------------------------------------------------------------- |
eric@51 | 31 | |
eric@51 | 32 | VERSION = 0.1 |
eric@51 | 33 | |
eric@51 | 34 | PACKAGE = t2p |
eric@12 | 35 | |
eric@44 | 36 | TARGETS = t2p bitblt_test |
eric@15 | 37 | |
eric@51 | 38 | CSRCS = t2p.c semantics.c bitblt.c bitblt_test.c |
eric@51 | 39 | OSRCS = scanner.l parser.y |
eric@51 | 40 | HDRS = t2p.h semantics.h bitblt.h |
eric@51 | 41 | MISC = COPYING Makefile |
eric@51 | 42 | |
eric@51 | 43 | DISTFILES = $(MISC) $(HDRS) $(CSRCS) $(OSRCS) |
eric@51 | 44 | DISTNAME = $(PACKAGE)-$(VERSION) |
eric@51 | 45 | |
eric@51 | 46 | |
eric@51 | 47 | AUTO_CSRCS = scanner.c parser.tab.c |
eric@15 | 48 | AUTO_HDRS = parser.tab.h |
eric@15 | 49 | AUTO_MISC = parser.output |
eric@15 | 50 | |
eric@51 | 51 | |
eric@51 | 52 | all: $(TARGETS) |
eric@51 | 53 | |
eric@51 | 54 | |
eric@51 | 55 | dist: $(DISTFILES) |
eric@51 | 56 | -rm -rf $(DISTNAME) |
eric@51 | 57 | mkdir $(DISTNAME) |
eric@51 | 58 | for f in $(DISTFILES); do ln $$f $(DISTNAME)/$$f; done |
eric@51 | 59 | tar --gzip -chf $(DISTNAME).tar.gz $(DISTNAME) |
eric@51 | 60 | -rm -rf $(DISTNAME) |
eric@51 | 61 | |
eric@51 | 62 | |
eric@44 | 63 | t2p: t2p.o scanner.o semantics.o parser.tab.o bitblt.o |
eric@6 | 64 | |
eric@11 | 65 | bitblt_test: bitblt_test.o bitblt.o |
eric@6 | 66 | |
eric@6 | 67 | |
eric@15 | 68 | clean: |
eric@44 | 69 | rm -f *.o *.d $(TARGETS) $(AUTO_SRCS) $(AUTO_HDRS) $(AUTO_MISC) |
eric@44 | 70 | |
eric@44 | 71 | very_clean: |
eric@44 | 72 | rm -f *.o *.d $(TARGETS) $(AUTO_SRCS) $(AUTO_HDRS) $(AUTO_MISC) \ |
eric@44 | 73 | |
eric@15 | 74 | |
eric@20 | 75 | wc: |
eric@51 | 76 | wc -l $(HDRS) $(CSRCS) $(OSRCS) $(MISC) |
eric@20 | 77 | |
eric@20 | 78 | ls-lt: |
eric@51 | 79 | ls -lt $(HDRS) $(CSRCS) $(OSRCS) $(MISC) |
eric@20 | 80 | |
eric@15 | 81 | |
eric@15 | 82 | %.tab.c %.tab.h %.output: %.y |
eric@6 | 83 | $(YACC) $(YFLAGS) $< |
eric@6 | 84 | |
eric@6 | 85 | # %.c: %.l |
eric@11 | 86 | # $(LEX) $(LFLAGS) $< |
eric@11 | 87 | |
eric@15 | 88 | |
eric@51 | 89 | ALL_CSRCS = $(CSRCS) $(AUTO_CSRCS) |
eric@15 | 90 | |
eric@51 | 91 | DEPENDS = $(ALL_CSRCS:.c=.d) |
eric@15 | 92 | |
eric@15 | 93 | %.d: %.c |
eric@15 | 94 | $(CC) -M -MG $(CFLAGS) $< | sed -e 's@ /[^ ]*@@g' -e 's@^\(.*\)\.o:@\1.d \1.o:@' > $@ |
eric@15 | 95 | |
eric@15 | 96 | include $(DEPENDS) |