1# Makefile for UnZip's bzip2 support library 2# Unix, and other ports using sufficiently unix-compatible 3# library naming conventions (e.g. misc. GCC ports) 4# 5# (c) 2006-2007 Info-ZIP 6# Last revision: Christian Spieler, 2007-Mar-31 7# 8# This Makefile is intended to be called from UnZip's main make procedure. 9 10SHELL=/bin/sh 11 12# To assist in cross-compiling 13CC=gcc 14AR=ar 15RANLIB=ranlib 16RM=rm -f 17LDFLAGS= 18O=.o 19 20CFLAGS=-Wall -Winline -O2 -g 21CCBZ2DEFS=-DBZ_NO_STDIO 22 23 24OBJS= blocksort$(O) \ 25 huffman$(O) \ 26 crctable$(O) \ 27 randtable$(O) \ 28 compress$(O) \ 29 decompress$(O) \ 30 bzlib$(O) 31 32# How to compile sources 33.c$(O): 34 $(CC) $(CFLAGS) $(CCBZ2DEFS) -o $@ -c $< 35 36all: libbz2.a 37 38libbz2.a: $(OBJS) 39 -@$(RM) libbz2.a 40 $(AR) cq libbz2.a $(OBJS) 41 -$(RANLIB) libbz2.a 42 43clean: 44 $(RM) $(OBJS) libbz2.a 45 46$(OBJS): bzlib.h bzlib_private.h 47 48blocksort$(O): blocksort.c 49huffman$(O): huffman.c 50crctable$(O): crctable.c 51randtable$(O): randtable.c 52compress$(O): compress.c 53decompress$(O): decompress.c 54bzlib$(O): bzlib.c 55