# makefile for tfmx-play
# jhp 26May96 / Neochrome 13Mar2000
##############################################################################
# this version does not support realtime scheduling anymore,
# since it was very insecure and not really useful
# (but oversampling is added!)
##############################################################################
# edit this if you wish a different install-location
# for the binary than /usr/local/bin/tfmx-play
# (default: /usr/local for standalone, or $KDEDIR as backend for TFMXcess)

#INSTALL_PREFIX=/usr/local
INSTALL_PREFIX=$(KDEDIR)

########################## USER CONFIG ENDS ##################################

# uncomment below for gprof support
#PROFLAGS=-pg
PROFLAGS=

#DEBUGFLAGS=-ggdb
DEBUGFLAGS=

OBJS=player.o tfmx.o audio.o

CFLAGS=$(PROFLAGS) -O -fno-strength-reduce $(SCHEDFLAGS) $(DEBUGFLAGS)
LDFLAGS=$(PROFLAGS) $(DEBUGFLAGS)

BINARY=tfmx-play

all:		${BINARY}

$(OBJS):	tfmx.h Makefile
player.c:	tfmxsong.h player.h
tfmx.c:		tfmxsong.h player.h
audio.c:	player.h

audio.o: audio.c
	$(CC) $(CFLAGS) -O3 -fno-strength-reduce -c audio.c -o audio.o

clean:
	rm -rf *.o $(BINARY)

${BINARY}:	$(OBJS)
	gcc $(LDFLAGS) -o $(BINARY) $(OBJS)


install: ${BINARY}
	install -D $(BINARY) $(INSTALL_PREFIX)/bin/$(BINARY)
