# These variables need to be changed to change the type of build.
# Unfortunately RISC OS is too useless to cope with handling so many
# complicated arguments to amu/make on the command line even with DDEUtils.

Link = link
CC = cc
CFLAGS = -apcs 3/32/fpe2/swst/fp/nofpr -depend !Depend -throwback -IC:
Stubs = C:o.stubsg
LinkFlags = -aif -rescan -nounused
MakeLib = MakeAlf

LIBS =	$(Stubs) o.libbz2

OBJS =	o.blocksort o.huffman o.crctable o.randtable o.compress \
	o.decompress o.bzlib

OPTS =	-DHAVE_CONFIG_H -DCHAR_BIT=8 -DUSING_POSIX -DVOID=void \
	-DBZ_STRICT_ANSI -D__riscos -DBZ_DEBUG=0


bunzip2:	o.bzip2 lib $(LIBS)
		$(Link) $(Linkflags) -o bunzip2 o.bzip2 $(LIBS)

lib:	o.libbz2
	create lib 0

clean:
	ifthere o.* then wipe o.* ~c~fr~v
	remove bzip2
	remove bzip2recover

.SUFFIXES: .c.o

.c.o:;		$(CC) $(CFLAGS) $(OPTS) -c $< -o $@

VPATH = ^.^.Source.bzip2


# Dependencies:

o.libbz2:	$(OBJS)
		remove o.libbz2
		$(MakeLib) -o o.libbz2 $(OBJS)

o.blocksort:	c.blocksort
o.bzip2:	c.bzip2
o.bzip2recover:	c.bzip2recover
o.bzlib:	c.bzlib
o.compress:	c.compress
o.crctable:	c.crctable
o.decompress:	c.decompress
o.howbig:	c.howbig
o.huffman:	c.huffman
o.randtable:	c.randtable

# Dynamic dependencies:o.bzlib:	^.^.Source.bzip2.c.bzlib
o.bzlib:	^.^.Source.bzip2.h.bzlib_private
o.bzlib:	^.^.Source.bzip2.h.bzlib

# Dynamic dependencies:
o.bzip2:	^.^.Source.bzip2.c.bzip2
o.bzip2:	^.^.Source.bzip2.h.bzlib
o.bzip2:	C:h.swis
o.bzip2:	C:h.kernel
o.blocksort:	^.^.Source.bzip2.c.blocksort
o.blocksort:	^.^.Source.bzip2.h.bzlib_private
o.blocksort:	^.^.Source.bzip2.h.bzlib
o.huffman:	^.^.Source.bzip2.c.huffman
o.huffman:	^.^.Source.bzip2.h.bzlib_private
o.huffman:	^.^.Source.bzip2.h.bzlib
o.crctable:	^.^.Source.bzip2.c.crctable
o.crctable:	^.^.Source.bzip2.h.bzlib_private
o.crctable:	^.^.Source.bzip2.h.bzlib
o.randtable:	^.^.Source.bzip2.c.randtable
o.randtable:	^.^.Source.bzip2.h.bzlib_private
o.randtable:	^.^.Source.bzip2.h.bzlib
o.compress:	^.^.Source.bzip2.c.compress
o.compress:	^.^.Source.bzip2.h.bzlib_private
o.compress:	^.^.Source.bzip2.h.bzlib
o.decompress:	^.^.Source.bzip2.c.decompress
o.decompress:	^.^.Source.bzip2.h.bzlib_private
o.decompress:	^.^.Source.bzip2.h.bzlib
o.bzlib:	^.^.Source.bzip2.c.bzlib
o.bzlib:	^.^.Source.bzip2.h.bzlib_private
o.bzlib:	^.^.Source.bzip2.h.bzlib
