Improve bzip2 build system
This patch makes a number of improvements to the bzip2 build system:
* Remove the BIGFILE variable that was used to force largefile
support. Now, the user of the Makefile is supposed to pass
-D_FILE_OFFSET_BITS=64 when largefile support is desired.
* Use override CFLAGS += so that additional CFLAGS can be passed on
* Removed "forced" CFLAGS -O2, -g and -Winline. We don't want them by
default, and want the build system to use its own ones.
* When creating the symbolic links bzegrep, bzfgrep, bzless and
bzcmp, don't link them to an absolute path, or they'll point to
some path on the build machine.
* Provide an install target for the shared library, which creates the
appropriate symbolic links.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
===================================================================
-BIGFILES=-D_FILE_OFFSET_BITS=64
-CFLAGS=-Wall -Winline -O2 -g $(BIGFILES)
+override CFLAGS += -Wall
# Where you want it installed when you do 'make install'
cp -f libbz2.a $(PREFIX)/lib
chmod a+r $(PREFIX)/lib/libbz2.a
cp -f bzgrep $(PREFIX)/bin/bzgrep
- ln -s -f $(PREFIX)/bin/bzgrep $(PREFIX)/bin/bzegrep
- ln -s -f $(PREFIX)/bin/bzgrep $(PREFIX)/bin/bzfgrep
+ ln -s -f bzgrep $(PREFIX)/bin/bzegrep
+ ln -s -f bzgrep $(PREFIX)/bin/bzfgrep
chmod a+x $(PREFIX)/bin/bzgrep
cp -f bzmore $(PREFIX)/bin/bzmore
- ln -s -f $(PREFIX)/bin/bzmore $(PREFIX)/bin/bzless
+ ln -s -f bzmore $(PREFIX)/bin/bzless
chmod a+x $(PREFIX)/bin/bzmore
cp -f bzdiff $(PREFIX)/bin/bzdiff
- ln -s -f $(PREFIX)/bin/bzdiff $(PREFIX)/bin/bzcmp
+ ln -s -f bzdiff $(PREFIX)/bin/bzcmp
chmod a+x $(PREFIX)/bin/bzdiff
cp -f bzgrep.1 bzmore.1 bzdiff.1 $(PREFIX)/man/man1
chmod a+r $(PREFIX)/man/man1/bzgrep.1
Index: b/Makefile-libbz2_so
===================================================================