
# CFLAGS = -g -Wall
CFLAGS = -O2 -Wall

DEFINES = 
# Possible things to add to DEFINE:
#
#	To allow a default device (which is generally useful,
#	especially if you have only one changer device!):
# DEFINES += -DDEFAULT_DEVICE=\"/dev/hdd\"
#
#	To allow a non-cdchanger cdrom:
# DEFINES += -DALLOW_ORDINARY_CDROM
#
#	To specify the location of the executables mount and umount.
#	(otherwise they will be found from the path):
# DEFINES += -DMOUNT \"/bin/mount\"
# DEFINES += -DUMOUNT \"/bin/umount\"
#


#	Where to install:
PREFIX = /usr/local
BINDIR = $(PREFIX)/bin
MANDIR = $(PREFIX)/man


cdchanger:	cdchanger.c
	$(CC) $(CFLAGS) $(DEFINES) -o $@  $^


#	`make install' must be done as root (chdchanger is setuid root).
#
# Note: if your perl is not in /usr/bin/perl,  then you
# must edit the first line of tkchanger.
#
install:	cdchanger
	install -m 4755 -o root   cdchanger $(BINDIR)
	install tkchanger $(BINDIR)
	install cdchanger.1 $(MANDIR)
	install tkchanger.1 $(MANDIR)

clean:
	rm -f *.o
