annotate src/bzip2-1.0.6/Makefile @ 169:223a55898ab9 tip default

Add null config files
author Chris Cannam <cannam@all-day-breakfast.com>
date Mon, 02 Mar 2020 14:03:47 +0000
parents 8a15ff55d9af
children
rev   line source
cannam@89 1 # ------------------------------------------------------------------
cannam@89 2 # This file is part of bzip2/libbzip2, a program and library for
cannam@89 3 # lossless, block-sorting data compression.
cannam@89 4 #
cannam@89 5 # bzip2/libbzip2 version 1.0.6 of 6 September 2010
cannam@89 6 # Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
cannam@89 7 #
cannam@89 8 # Please read the WARNING, DISCLAIMER and PATENTS sections in the
cannam@89 9 # README file.
cannam@89 10 #
cannam@89 11 # This program is released under the terms of the license contained
cannam@89 12 # in the file LICENSE.
cannam@89 13 # ------------------------------------------------------------------
cannam@89 14
cannam@89 15 SHELL=/bin/sh
cannam@89 16
cannam@89 17 # To assist in cross-compiling
cannam@89 18 CC=gcc
cannam@89 19 AR=ar
cannam@89 20 RANLIB=ranlib
cannam@89 21 LDFLAGS=
cannam@89 22
cannam@89 23 BIGFILES=-D_FILE_OFFSET_BITS=64
cannam@89 24 CFLAGS=-Wall -Winline -O2 -g $(BIGFILES)
cannam@89 25
cannam@89 26 # Where you want it installed when you do 'make install'
cannam@89 27 PREFIX=/usr/local
cannam@89 28
cannam@89 29
cannam@89 30 OBJS= blocksort.o \
cannam@89 31 huffman.o \
cannam@89 32 crctable.o \
cannam@89 33 randtable.o \
cannam@89 34 compress.o \
cannam@89 35 decompress.o \
cannam@89 36 bzlib.o
cannam@89 37
cannam@89 38 all: libbz2.a bzip2 bzip2recover test
cannam@89 39
cannam@89 40 bzip2: libbz2.a bzip2.o
cannam@89 41 $(CC) $(CFLAGS) $(LDFLAGS) -o bzip2 bzip2.o -L. -lbz2
cannam@89 42
cannam@89 43 bzip2recover: bzip2recover.o
cannam@89 44 $(CC) $(CFLAGS) $(LDFLAGS) -o bzip2recover bzip2recover.o
cannam@89 45
cannam@89 46 libbz2.a: $(OBJS)
cannam@89 47 rm -f libbz2.a
cannam@89 48 $(AR) cq libbz2.a $(OBJS)
cannam@89 49 @if ( test -f $(RANLIB) -o -f /usr/bin/ranlib -o \
cannam@89 50 -f /bin/ranlib -o -f /usr/ccs/bin/ranlib ) ; then \
cannam@89 51 echo $(RANLIB) libbz2.a ; \
cannam@89 52 $(RANLIB) libbz2.a ; \
cannam@89 53 fi
cannam@89 54
cannam@89 55 check: test
cannam@89 56 test: bzip2
cannam@89 57 @cat words1
cannam@89 58 ./bzip2 -1 < sample1.ref > sample1.rb2
cannam@89 59 ./bzip2 -2 < sample2.ref > sample2.rb2
cannam@89 60 ./bzip2 -3 < sample3.ref > sample3.rb2
cannam@89 61 ./bzip2 -d < sample1.bz2 > sample1.tst
cannam@89 62 ./bzip2 -d < sample2.bz2 > sample2.tst
cannam@89 63 ./bzip2 -ds < sample3.bz2 > sample3.tst
cannam@89 64 cmp sample1.bz2 sample1.rb2
cannam@89 65 cmp sample2.bz2 sample2.rb2
cannam@89 66 cmp sample3.bz2 sample3.rb2
cannam@89 67 cmp sample1.tst sample1.ref
cannam@89 68 cmp sample2.tst sample2.ref
cannam@89 69 cmp sample3.tst sample3.ref
cannam@89 70 @cat words3
cannam@89 71
cannam@89 72 install: bzip2 bzip2recover
cannam@89 73 if ( test ! -d $(PREFIX)/bin ) ; then mkdir -p $(PREFIX)/bin ; fi
cannam@89 74 if ( test ! -d $(PREFIX)/lib ) ; then mkdir -p $(PREFIX)/lib ; fi
cannam@89 75 if ( test ! -d $(PREFIX)/man ) ; then mkdir -p $(PREFIX)/man ; fi
cannam@89 76 if ( test ! -d $(PREFIX)/man/man1 ) ; then mkdir -p $(PREFIX)/man/man1 ; fi
cannam@89 77 if ( test ! -d $(PREFIX)/include ) ; then mkdir -p $(PREFIX)/include ; fi
cannam@89 78 cp -f bzip2 $(PREFIX)/bin/bzip2
cannam@89 79 cp -f bzip2 $(PREFIX)/bin/bunzip2
cannam@89 80 cp -f bzip2 $(PREFIX)/bin/bzcat
cannam@89 81 cp -f bzip2recover $(PREFIX)/bin/bzip2recover
cannam@89 82 chmod a+x $(PREFIX)/bin/bzip2
cannam@89 83 chmod a+x $(PREFIX)/bin/bunzip2
cannam@89 84 chmod a+x $(PREFIX)/bin/bzcat
cannam@89 85 chmod a+x $(PREFIX)/bin/bzip2recover
cannam@89 86 cp -f bzip2.1 $(PREFIX)/man/man1
cannam@89 87 chmod a+r $(PREFIX)/man/man1/bzip2.1
cannam@89 88 cp -f bzlib.h $(PREFIX)/include
cannam@89 89 chmod a+r $(PREFIX)/include/bzlib.h
cannam@89 90 cp -f libbz2.a $(PREFIX)/lib
cannam@89 91 chmod a+r $(PREFIX)/lib/libbz2.a
cannam@89 92 cp -f bzgrep $(PREFIX)/bin/bzgrep
cannam@89 93 ln -s -f $(PREFIX)/bin/bzgrep $(PREFIX)/bin/bzegrep
cannam@89 94 ln -s -f $(PREFIX)/bin/bzgrep $(PREFIX)/bin/bzfgrep
cannam@89 95 chmod a+x $(PREFIX)/bin/bzgrep
cannam@89 96 cp -f bzmore $(PREFIX)/bin/bzmore
cannam@89 97 ln -s -f $(PREFIX)/bin/bzmore $(PREFIX)/bin/bzless
cannam@89 98 chmod a+x $(PREFIX)/bin/bzmore
cannam@89 99 cp -f bzdiff $(PREFIX)/bin/bzdiff
cannam@89 100 ln -s -f $(PREFIX)/bin/bzdiff $(PREFIX)/bin/bzcmp
cannam@89 101 chmod a+x $(PREFIX)/bin/bzdiff
cannam@89 102 cp -f bzgrep.1 bzmore.1 bzdiff.1 $(PREFIX)/man/man1
cannam@89 103 chmod a+r $(PREFIX)/man/man1/bzgrep.1
cannam@89 104 chmod a+r $(PREFIX)/man/man1/bzmore.1
cannam@89 105 chmod a+r $(PREFIX)/man/man1/bzdiff.1
cannam@89 106 echo ".so man1/bzgrep.1" > $(PREFIX)/man/man1/bzegrep.1
cannam@89 107 echo ".so man1/bzgrep.1" > $(PREFIX)/man/man1/bzfgrep.1
cannam@89 108 echo ".so man1/bzmore.1" > $(PREFIX)/man/man1/bzless.1
cannam@89 109 echo ".so man1/bzdiff.1" > $(PREFIX)/man/man1/bzcmp.1
cannam@89 110
cannam@89 111 clean:
cannam@89 112 rm -f *.o libbz2.a bzip2 bzip2recover \
cannam@89 113 sample1.rb2 sample2.rb2 sample3.rb2 \
cannam@89 114 sample1.tst sample2.tst sample3.tst
cannam@89 115
cannam@89 116 blocksort.o: blocksort.c
cannam@89 117 @cat words0
cannam@89 118 $(CC) $(CFLAGS) -c blocksort.c
cannam@89 119 huffman.o: huffman.c
cannam@89 120 $(CC) $(CFLAGS) -c huffman.c
cannam@89 121 crctable.o: crctable.c
cannam@89 122 $(CC) $(CFLAGS) -c crctable.c
cannam@89 123 randtable.o: randtable.c
cannam@89 124 $(CC) $(CFLAGS) -c randtable.c
cannam@89 125 compress.o: compress.c
cannam@89 126 $(CC) $(CFLAGS) -c compress.c
cannam@89 127 decompress.o: decompress.c
cannam@89 128 $(CC) $(CFLAGS) -c decompress.c
cannam@89 129 bzlib.o: bzlib.c
cannam@89 130 $(CC) $(CFLAGS) -c bzlib.c
cannam@89 131 bzip2.o: bzip2.c
cannam@89 132 $(CC) $(CFLAGS) -c bzip2.c
cannam@89 133 bzip2recover.o: bzip2recover.c
cannam@89 134 $(CC) $(CFLAGS) -c bzip2recover.c
cannam@89 135
cannam@89 136
cannam@89 137 distclean: clean
cannam@89 138 rm -f manual.ps manual.html manual.pdf
cannam@89 139
cannam@89 140 DISTNAME=bzip2-1.0.6
cannam@89 141 dist: check manual
cannam@89 142 rm -f $(DISTNAME)
cannam@89 143 ln -s -f . $(DISTNAME)
cannam@89 144 tar cvf $(DISTNAME).tar \
cannam@89 145 $(DISTNAME)/blocksort.c \
cannam@89 146 $(DISTNAME)/huffman.c \
cannam@89 147 $(DISTNAME)/crctable.c \
cannam@89 148 $(DISTNAME)/randtable.c \
cannam@89 149 $(DISTNAME)/compress.c \
cannam@89 150 $(DISTNAME)/decompress.c \
cannam@89 151 $(DISTNAME)/bzlib.c \
cannam@89 152 $(DISTNAME)/bzip2.c \
cannam@89 153 $(DISTNAME)/bzip2recover.c \
cannam@89 154 $(DISTNAME)/bzlib.h \
cannam@89 155 $(DISTNAME)/bzlib_private.h \
cannam@89 156 $(DISTNAME)/Makefile \
cannam@89 157 $(DISTNAME)/LICENSE \
cannam@89 158 $(DISTNAME)/bzip2.1 \
cannam@89 159 $(DISTNAME)/bzip2.1.preformatted \
cannam@89 160 $(DISTNAME)/bzip2.txt \
cannam@89 161 $(DISTNAME)/words0 \
cannam@89 162 $(DISTNAME)/words1 \
cannam@89 163 $(DISTNAME)/words2 \
cannam@89 164 $(DISTNAME)/words3 \
cannam@89 165 $(DISTNAME)/sample1.ref \
cannam@89 166 $(DISTNAME)/sample2.ref \
cannam@89 167 $(DISTNAME)/sample3.ref \
cannam@89 168 $(DISTNAME)/sample1.bz2 \
cannam@89 169 $(DISTNAME)/sample2.bz2 \
cannam@89 170 $(DISTNAME)/sample3.bz2 \
cannam@89 171 $(DISTNAME)/dlltest.c \
cannam@89 172 $(DISTNAME)/manual.html \
cannam@89 173 $(DISTNAME)/manual.pdf \
cannam@89 174 $(DISTNAME)/manual.ps \
cannam@89 175 $(DISTNAME)/README \
cannam@89 176 $(DISTNAME)/README.COMPILATION.PROBLEMS \
cannam@89 177 $(DISTNAME)/README.XML.STUFF \
cannam@89 178 $(DISTNAME)/CHANGES \
cannam@89 179 $(DISTNAME)/libbz2.def \
cannam@89 180 $(DISTNAME)/libbz2.dsp \
cannam@89 181 $(DISTNAME)/dlltest.dsp \
cannam@89 182 $(DISTNAME)/makefile.msc \
cannam@89 183 $(DISTNAME)/unzcrash.c \
cannam@89 184 $(DISTNAME)/spewG.c \
cannam@89 185 $(DISTNAME)/mk251.c \
cannam@89 186 $(DISTNAME)/bzdiff \
cannam@89 187 $(DISTNAME)/bzdiff.1 \
cannam@89 188 $(DISTNAME)/bzmore \
cannam@89 189 $(DISTNAME)/bzmore.1 \
cannam@89 190 $(DISTNAME)/bzgrep \
cannam@89 191 $(DISTNAME)/bzgrep.1 \
cannam@89 192 $(DISTNAME)/Makefile-libbz2_so \
cannam@89 193 $(DISTNAME)/bz-common.xsl \
cannam@89 194 $(DISTNAME)/bz-fo.xsl \
cannam@89 195 $(DISTNAME)/bz-html.xsl \
cannam@89 196 $(DISTNAME)/bzip.css \
cannam@89 197 $(DISTNAME)/entities.xml \
cannam@89 198 $(DISTNAME)/manual.xml \
cannam@89 199 $(DISTNAME)/format.pl \
cannam@89 200 $(DISTNAME)/xmlproc.sh
cannam@89 201 gzip -v $(DISTNAME).tar
cannam@89 202
cannam@89 203 # For rebuilding the manual from sources on my SuSE 9.1 box
cannam@89 204
cannam@89 205 MANUAL_SRCS= bz-common.xsl bz-fo.xsl bz-html.xsl bzip.css \
cannam@89 206 entities.xml manual.xml
cannam@89 207
cannam@89 208 manual: manual.html manual.ps manual.pdf
cannam@89 209
cannam@89 210 manual.ps: $(MANUAL_SRCS)
cannam@89 211 ./xmlproc.sh -ps manual.xml
cannam@89 212
cannam@89 213 manual.pdf: $(MANUAL_SRCS)
cannam@89 214 ./xmlproc.sh -pdf manual.xml
cannam@89 215
cannam@89 216 manual.html: $(MANUAL_SRCS)
cannam@89 217 ./xmlproc.sh -html manual.xml