######################################################################
#
# Makefile:
#
# Copyright (c) 2000 James McKenzie <james@fishsoup.dhs.org>.
#
# $Id: Makefile,v 1.10 2001/10/12 13:51:15 root Exp root $
#
# $Log: Makefile,v $
# Revision 1.10  2001/10/12 13:51:15  root
# #
#
# Revision 1.9  2000/11/23 23:45:22  root
# #
#
# Revision 1.8  2000/10/07 18:30:05  root
# #
#
# Revision 1.7  2000/10/06 19:52:19  root
# #
#
# Revision 1.6  2000/09/24 01:46:05  root
# #
#
# Revision 1.5  2000/09/24 01:12:42  root
# #
#
# Revision 1.4  2000/02/21 04:01:00  root
# #
#
# Revision 1.3  2000/02/20 18:24:06  root
# #
#
# Revision 1.2  2000/02/20 18:22:59  root
# #
#
# Revision 1.1  2000/02/20 03:14:21  root
# #
#
#
######################################################################

include ../make.inc

PROG=cd

INCLUDES  = -I../shared -I../libhifimsg -I../mixer
CFLAGS= $(OPT) $(DEFINES) $(INCLUDES) ${WARN}
LDFLAGS=-L../libhifimsg 
LIB=../libhifimsg/libhifimsg.a ../mixer/libmixer.a
LIBS=${LIB} ${MATHLIB}

PSRCS = cd.c main.c hifi.c #prototype srcs
SRCS=${PSRCS} 
HS= project.h

OBJS = $(SRCS:.c=.o)

all: ${PROG}

${PROG}: $(OBJS) ${LIB}
	$(CC) ${LDFLAGS} $(CFLAGS) $(OBJS) -o $@ ${LIBS}


%.o:%.c
	$(CC) $(CFLAGS) $(INCLUDES) -c $<

clean:
	/bin/rm -rf *% *~ ${OBJS} core a.out ${PROG}

nodepend:
	/bin/rm -f .depend

depend:
	${MAKEDEPEND} -f- -s "# DO NOT DELETE" -- $(INCLUDES) -- $(SRCS) > .depend


protos:
	echo > prototypes.h
	echo > prototypes.h.tmp
	for i in ${PSRCS}; do ${CPROTO} ${INCLUDES} $$i | grep -v ^__ >> prototypes.h.tmp; done
	/bin/mv -f prototypes.h.tmp prototypes.h

checkin:
	${RCSCI} -m# -l ${SRCS} ${HS} Makefile
	
tidy:checkin
	${INDENT} -ts0 -i2 ${SRCS} ${HS}

ifeq (.depend,$(wildcard .depend))
  include .depend
endif

