# makefile for tfmx-play
# jhp 26May96 / Neochrome 23Dec2000
##############################################################################
# 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)

# make this a comment if you for some reason do not want ALSA compatibility
# (NOTE: at least on my machine it still works with OSS even if ALSA-
# compatibility is compiled in)
ALSADEF=-DALSA_HACK

########################## 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 $(ALSADEF)

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

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


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