#
#
#
include	../../../../../Makefile.rules

#
#
#
LODFILES=main.lod

#
# Sub directories for recursive make.
#
MAKEABLE= 

none:

#
#
#
all:: main.lod mainteleport.lod


dsp.asm: ../dsp.h
	/lib/cpp -P ../dsp.h >dsp.asm

main.cln: main.asm dsp.asm
	$(ASM56K) -L -I$(INCDIR) -c -B main.cln -- main.asm

main.cld: main.cln
	$(LINK56K) -M -c -g -R /usr/local/dsp/lib/map56 -B main.cld -- main.cln

mainteleport.cln: mainteleport.asm dsp.asm
	$(ASM56K) -L -I$(INCDIR) -c \
		-B mainteleport.cln -- mainteleport.asm

mainteleport.cld: mainteleport.cln
	$(LINK56K) -M -c -g -R /usr/local/dsp/lib/map56 \
		 -B mainteleport.cld -- mainteleport.cln

#
#  Test version of the DSP lod file that does a digital loopback.
#
testmain.cln: testmain.asm dsp.asm
	$(ASM56K) -L -I$(INCDIR) -c -B testmain.cln -- testmain.asm

testmain.cld: testmain.cln
	$(LINK56K) -M -c -g -R /usr/local/dsp/lib/map56 -B testmain.cld -- testmain.cln


#
#
#
G56KFLAGS = -I../ -I$(INCDIR)

DSPCRT = $(USRLIBDIR)/crt056y.cln

AFDSP_H_SRC = AFmain.h
AFDSP_C_SRC = AFmain.c AFcodec.c AFhost.c
AFDSP_OBJ = AFmain.cln AFcodec.cln AFhost.cln 

ALL_SRC = $(AFDSP_C_SRC) $(AFDSP_H_SRC)

AFdsp.cld : $(AFDSP_OBJ) $(DSPCRT)
	g56k -g -O -o AFdsp.cld $(AFDSP_OBJ) -B./ -crt $(DSPCRT)

AFmain.cln : AFmain.c

AFcodec.cln : AFcodec.c

AFhost.cln : AFhost.c

install::
	make install.`/bin/machine`

install.mips::
	@case '${MFLAGS}' in *[i]*) set +e;; esac; \
	for i in $(LODFILES); do \
		(set -x; $(INSTALL) -c $(INSTLIBFLAGS) $$i $(LODDIR)); \
	done

install.alpha::
	@case '${MFLAGS}' in *[i]*) set +e;; esac; \
	for i in $(LODFILES); do \
		(set -x; $(INSTALLALPHA) -c $(INSTLIBFLAGS) $$i $(LODDIR)); \
	done

clean::
	rm -f *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut

completely_clean::
	make clean
	rm -f *.lod *.cld *.cln *.map *.lst


# DO NOT DELETE THIS LINE -- make depend depends on it.
