added 'dist' target, and minor cleanup REL_0_10

Tue, 21 Jan 2003 18:53:48 +0000

author
eric
date
Tue, 21 Jan 2003 18:53:48 +0000
changeset 51
3398476bbedd
parent 50
efbc5e0957df
child 52
7a996a86036d

added 'dist' target, and minor cleanup

Makefile file | annotate | diff | revisions
     1.1 --- a/Makefile	Tue Jan 21 18:39:55 2003 +0000
     1.2 +++ b/Makefile	Tue Jan 21 18:53:48 2003 +0000
     1.3 @@ -1,6 +1,6 @@
     1.4  # t2p: build a PDF file out of one or more TIFF Class F Group 4 files
     1.5  # Makefile
     1.6 -# $Id: Makefile,v 1.10 2002/08/25 22:03:55 eric Exp $
     1.7 +# $Id: Makefile,v 1.11 2003/01/21 10:53:48 eric Exp $
     1.8  # Copyright 2001 Eric Smith <eric@brouhaha.com>
     1.9  #
    1.10  # This program is free software; you can redistribute it and/or modify
    1.11 @@ -24,16 +24,42 @@
    1.12  YACC = bison
    1.13  YFLAGS = -d -v
    1.14  
    1.15 -SRCS = bitblt.c bitblt_test.c t2p.c semantics.c
    1.16 -HDRS = bitblt.h t2p.h semantics.h
    1.17 -MISC = Makefile scanner.l parser.y
    1.18 +# -----------------------------------------------------------------------------
    1.19 +# You shouldn't have to change anything below this point, but if you do please
    1.20 +# let me know why so I can improve this Makefile.
    1.21 +# -----------------------------------------------------------------------------
    1.22 +
    1.23 +VERSION = 0.1
    1.24 +
    1.25 +PACKAGE = t2p
    1.26  
    1.27  TARGETS = t2p bitblt_test
    1.28  
    1.29 -AUTO_SRCS = scanner.c parser.tab.c
    1.30 +CSRCS = t2p.c semantics.c bitblt.c bitblt_test.c
    1.31 +OSRCS = scanner.l parser.y
    1.32 +HDRS = t2p.h semantics.h bitblt.h 
    1.33 +MISC = COPYING Makefile
    1.34 +
    1.35 +DISTFILES = $(MISC) $(HDRS) $(CSRCS) $(OSRCS)
    1.36 +DISTNAME = $(PACKAGE)-$(VERSION)
    1.37 +
    1.38 +
    1.39 +AUTO_CSRCS = scanner.c parser.tab.c
    1.40  AUTO_HDRS = parser.tab.h
    1.41  AUTO_MISC = parser.output
    1.42  
    1.43 +
    1.44 +all: $(TARGETS)
    1.45 +
    1.46 +
    1.47 +dist: $(DISTFILES)
    1.48 +	-rm -rf $(DISTNAME)
    1.49 +	mkdir $(DISTNAME)
    1.50 +	for f in $(DISTFILES); do ln $$f $(DISTNAME)/$$f; done
    1.51 +	tar --gzip -chf $(DISTNAME).tar.gz $(DISTNAME)
    1.52 +	-rm -rf $(DISTNAME)
    1.53 +
    1.54 +
    1.55  t2p: t2p.o scanner.o semantics.o parser.tab.o bitblt.o
    1.56  
    1.57  bitblt_test: bitblt_test.o bitblt.o
    1.58 @@ -47,10 +73,10 @@
    1.59  		*~ *.pdf
    1.60  
    1.61  wc:
    1.62 -	wc -l $(SRCS) $(HDRS) $(MISC)
    1.63 +	wc -l $(HDRS) $(CSRCS) $(OSRCS) $(MISC)
    1.64  
    1.65  ls-lt:
    1.66 -	ls -lt $(SRCS) $(HDRS) $(MISC)
    1.67 +	ls -lt $(HDRS) $(CSRCS) $(OSRCS) $(MISC)
    1.68  
    1.69  
    1.70  %.tab.c %.tab.h %.output: %.y
    1.71 @@ -60,9 +86,9 @@
    1.72  # 	$(LEX) $(LFLAGS) $<
    1.73  
    1.74  
    1.75 -ALL_SRCS = $(SRCS) $(AUTO_SRCS)
    1.76 +ALL_CSRCS = $(CSRCS) $(AUTO_CSRCS)
    1.77  
    1.78 -DEPENDS = $(ALL_SRCS:.c=.d)
    1.79 +DEPENDS = $(ALL_CSRCS:.c=.d)
    1.80  
    1.81  %.d: %.c
    1.82  	$(CC) -M -MG $(CFLAGS) $< | sed -e 's@ /[^ ]*@@g' -e 's@^\(.*\)\.o:@\1.d \1.o:@' > $@