#							SORTEX makef
# macros defined in toplevel csound/Makefile
#	CFLAGS INCLUDE LIB DEST


T = ../..

SCSORT =  smain.o $T/scsort.o $T/sread.o $T/sort.o $T/twarp.o $T/swrite.o \
	  $T/memalloc.o
EXTRACT = xmain.o $T/scxtract.o $T/sread.o $T/extract.o $T/twarp.o $T/swrite.o \
	  $T/memalloc.o

PROGS = scsort extract

sortexs:	$(PROGS)

smain.o xmain.o:	$T/sort.h

scsort: 	$(SCSORT)
		cc $(CFLAGS) -o scsort $(SCSORT)

extract: 	$(EXTRACT)
		cc $(CFLAGS) -o extract $(EXTRACT)

install: 	$(PROGS)
		-strip $(PROGS)
		-rm -f $(DEST)/scsort $(DEST)/extract
		cp $(PROGS) $(DEST)

clean:
		-rm smain.o xmain.o $(PROGS) debug.c report.dll

rmbak:
		-rm *.bak *~
