# $Id: smakefile,v 4.3 2001/09/16 19:04:28 lcs Exp $
# $Log: smakefile,v $
# Revision 4.3  2001/09/16 19:04:28  lcs
# * paula.audio:  The fixed CMD_STOP/CMD_START in ahi.device
# triggered a bug that could make the driver lose track of the
# AHIsub_Disable and AHIsub_Enable nesting.  Also, these functions
# was not "thread safe" (they are not actually called from a thread
# but rather an interrupt).
#
# Now uses "rx" to launch the rexx script.
#
# Revision 4.2  1998/01/10 19:47:33  lcs
# Alright, the DMA version is ready for release.
#
# Revision 4.1  1997/12/02 09:34:56  lcs
# First RCS'ed version.
#

DEST    = AHI:User/Devs/ahi/paula.audio
DEST000 = AHI:User/Devs/ahi/paula.audio.000
PDEST   = AHI:User/Devs/AudioModes/PAULA

AFLAGS	= I INCLUDE: DS DL QUIET NOEXE OPT NRQBPSMD
LFLAGS	= NOALVS NOICONS SMALLDATA SMALLCODE DEFINE @__chkabort=@__dummy \
          LIB LIB:sc.lib LIB:debug.lib LIB:amiga.lib STRIPDEBUG

all: $(DEST) $(DEST000) $(PDEST)


$(DEST): paula_audio.o debug.o
	slink $(LFLAGS) TO $@ FROM paula_audio.o debug.o
	--flushlib paula.audio

$(DEST000): paula_audio.000.o debug.o
	slink $(LFLAGS) TO $@ FROM paula_audio.000.o debug.o
	--flushlib paula.audio

$(PDEST): prefsfile.a smakefile
	basm -ua+ -o$(PDEST) prefsfile.a
	AHI:User/C/AddAudioModes $(PDEST)

version.i: paula_audio.a version.rexx smakefile
	grep $$Id: paula_audio.a | rx version.rexx > version.i

paula_audio.o: paula_audio.a version.i smakefile
	PhxAss $(AFLAGS) TO $@ MACHINE 68020 paula_audio.a

paula_audio.000.o: paula_audio.a version.i smakefile
	PhxAss $(AFLAGS) TO $@ MACHINE 68000 paula_audio.a

debug.o: debug.a
	PhxAss $(AFLAGS) TO $@ debug.a


dist:
	smake allclean
	smake all
	smake clean

clean:
	--delete \#?.o \#?.tmp >NIL:

allclean:
	smake clean
	--delete version.i $(DEST) $(DEST000) $(PDEST) 

ci:
	ci -l paula_audio.a debug.a prefsfile.a smakefile
