#
# See file customize.h for additional customizations.
#
# ------------------------------------------------------------------
# Edit the next definitions if you use Motif 1.0 or if your motif
# lives in a non-standard place.
MOTIF_DEF=
MOTIF_INC=-I/usr/local/X11R5/include
MOTIF_LIB=-L/usr/local/X11R5/lib -lXm -lXt -lX11 -lm
#
# SGI version of the above:
#MOTIF_DEF=
#MOTIF_INC=
#MOTIF_LIB=-lXm_s -lXt_s -lX11_s -lPW -lm
#
# CWI Sun config of the above:
#MOTIF_DEF=-DMOTIF1_0
#MOTIF_INC=-I/usr/local/X/usr/include/X11/motif
#MOTIF_LIB=-L/usr/local/X/motif/lib -lXm -lXt -lX11 -lm
#
# -----------------------------------------------------------------
# Pick your type of audio support here:
#
# No audio support (i.e. no volume slider):
#VOL_DEF=
#VOL_INC=
#VOL_LIB=
#
# SGI audio support:
#VOL_DEF=-DVOLUME -DVOLUME_SGI
#VOL_INC=
#VOL_LIB=-laudio
#
# Sun audio support:
VOL_DEF=-DVOLUME -DVOLUME_SUN
VOL_INC=-I/usr/demo/SOUND
VOL_LIB=
#
# AudioFile audio support:
#VOL_DEF=-DVOLUME -DVOLUME_AUDIOFILE
#VOL_INC=-Iaudiofiledir/include
#VOL_LIB=-Laudiofiledir/lib.sun4 -lAF -lAFUtil
#
# ---------------------------------------------------------------
#
# Set RESDIR to the place where the Tuner.resources file will be kept.
RESDIR=/usr/local/X11R5/lib/app-defaults
#
# Set BINDIR to the place where the tuner binary will be installed.
BINDIR=/usr/local/X11R5/bin
MANDIR=/usr/local/X11R5/man
MEXT=1
#
# ----------------------------------------------------------------
# End of customizable definitions.

DEFS=$(VOL_DEF) $(MOTIF_DEF)
INCS=$(VOL_INC) $(MOTIF_INC)
LIBS=$(VOL_LIB) $(MOTIF_LIB) 

OBJS=tuner_main.o tuner_ui.o tuner_io.o tuner_sl.o tuner_volume.o
SRCS=tuner_main.c tuner_io.c tuner_ui.c tuner_sl.c tuner_volume.c
XSRCS=README Makefile Tuner.resources tuner.man tuner.h customize.h
CFLAGS=-O -DRESOURCE_PATH=\"$(RESDIR)/Tuner\" $(DEFS) $(INCS)

tuner: $(OBJS)
	$(CC) $(OBJS) $(LIBS) -o tuner

$(OBJS): tuner.h customize.h Makefile

install: tuner Tuner.resources
	install -c -m 755 tuner $(BINDIR)/tuner
	install -c -m 644 Tuner.resources $(RESDIR)/Tuner
	install -c -m 644 tuner.man $(MANDIR)/man$(MEXT)/tuner.$(MEXT)

clean:
	rm -f $(OBJS)

shar:	tuner1.6.shar

tuner1.6.shar: $(XSRCS) $(SRCS)
	shar $(XSRCS) $(SRCS) > tuner1.6.shar

ci:
	ci -l $(XSRCS) $(SRCS)
