######################################################################
#
# Makefile:
#
# Copyright (c) 2000 James McKenzie <james@fishsoup.dhs.org>.
#
# $Id: Makefile,v 1.6 2001/10/12 13:51:15 root Exp root $
#
# $Log: Makefile,v $
# Revision 1.6  2001/10/12 13:51:15  root
# #
#
# Revision 1.5  2000/11/23 23:45:23  root
# #
#
# Revision 1.4  2000/10/07 18:30:06  root
# #
#
# Revision 1.3  2000/10/06 19:52:20  root
# #
#
# Revision 1.2  2000/09/24 01:46:06  root
# #
#
# Revision 1.1  2000/09/24 01:11:47  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=lcd

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

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

OBJS = $(SRCS:.c=.o) hifi_packet.o #xplatorm code

all: ${PROG}

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

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

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

lcd.o:lcd.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} -v ${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

