.SUFFIXES:	.c .cpp .h .o

INSTDIR=/usr/local/bin/
INSTALL=install
CPU=	-m486
INCL=	# -I.
#DEBUG=	-g
OPT=	-O2
STRIP=strip	# use echo when debugging
CPOPTS=	-c $(DEBUG)$(OPT) $(CPU) -fhandle-exceptions
CP=	g++

OBJS=	xltcdplay.o cdrom.o menu.o

.cpp.o:
	$(CP) $(CPOPTS) $(INCL) $<

all:	xltcdplay

xltcdplay: $(OBJS)
	$(CP) $(OBJS) -lXm -lXt -lX11 -o xltcdplay
	$(STRIP) xltcdplay
	ls -l xltcdplay

install: xltcdplay
	$(INSTALL) -o root -g root -m 555 xltcdplay $(INSTDIR)

clean:
	rm -f *.o a.out core t.t errs.t

real_clean: clean
	rm -f xltcdplay
