######################################################################
#
# Makefile:
#
# Copyright (c) 2000 James McKenzie <james@fishsoup.dhs.org>.
#
# $Id: Makefile,v 1.7 2001/10/12 13:51:16 root Exp root $
#
# $Log: Makefile,v $
# Revision 1.7  2001/10/12 13:51:16  root
# #
#
# Revision 1.6  2000/11/23 23:45:24  root
# #
#
# Revision 1.5  2000/10/06 19:52:21  root
# #
#
# Revision 1.4  2000/09/24 01:46:06  root
# #
#
# Revision 1.3  2000/09/24 01:12:49  root
# #
#
# Revision 1.2  2000/09/03 03:21:53  root
# #
#
# Revision 1.1  2000/09/02 17:14:58  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=naanad

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

PSRCS = main.c object.c when.c util.c lcd.c
SRCS=${PSRCS} 
HS= project.h when.h object.h lcd.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 $<

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} -ts0 -i2 ${SRCS} ${HS}

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

