######################################################################
#
# Makefile:
#
# Copyright (c) 2000 James McKenzie <james@fishsoup.dhs.org>.
#
# $Id: Makefile,v 1.12 2001/10/12 13:51:17 root Exp root $
#
# $Log: Makefile,v $
# Revision 1.12  2001/10/12 13:51:17  root
# #
#
# Revision 1.11  2000/11/23 23:45:28  root
# #
#
# Revision 1.10  2000/10/07 18:30:09  root
# #
#
# Revision 1.9  2000/10/06 19:52:44  root
# #
#
# Revision 1.8  2000/09/24 01:52:56  root
# #
#
# Revision 1.7  2000/09/24 01:52:21  root
# #
#
# Revision 1.6  2000/09/24 01:46:08  root
# #
#
# Revision 1.5  2000/09/24 01:12:55  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=tuner

ifeq (alpha,${ARCH}) 
DEFINES+=-DALPHA
endif

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

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

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

all: ${PROG}

${PROG}: $(OBJS) ${LIB}
	$(CC) ${LDFLAGS} $(CFLAGS) $(OBJS) -o $@ ${LIBS}
#	cp $@ /net/caesious/usr/exports/tea/root


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

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

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

depend:
	${MAKEDEPEND} -f- -s "# DO NOT DELETE" -- $(INCLUDES) -- $(SRCS) > .depend
nodepend:
	/bin/rm -f .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} ${SRCS} ${HS}

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

