# 
# Copyright (C) 1994 
#            Olav Woelfelschneider (wosch@rbg.informatik.th-darmstadt.de)
#
# This file is part of xplaycd
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
CFLAGS		=	-I.. -I../McTools -I../bitmaps $(COPTS)
TARGET		=	xplaycd
LDFLAGS		=	$(LDOPTS)
LIBS		=	-L../McTools -lMcTools -lX11 $(LIBOPTS)
SRCS		=	xplaycd.c icons.c hardware.c cd.c volume.c discid.c\
			editor.c scsi.c
OBJS		=	xplaycd.o icons.o hardware.o cd.o volume.o discid.o\
			editor.o scsi.o

all: $(TARGET)

ifeq (.depend,$(wildcard .depend))
include .depend
else
DEPEND=needdepend
endif

$(TARGET): $(DEPEND) $(OBJS)
	$(CC) $(LDFLAGS) -o $(TARGET) $(OBJS) $(LIBS) $(XLIBS)

clean:
	rm -f *.o $(TARGET)

proper:
	rm -f *.o $(TARGET) .depend

needdepend: depend
	@echo
	@echo "Dependency information created, please re-run make and ignore"
	@echo "the error that follows."
	@echo
	@exit 1

depend:
	$(CPP) -MM $(CFLAGS) $(SRCS) >.depend
