# $Phone: Makefile,v 1.2 2013/01/02 23:00:43 christos Exp $
# Makefile for phone conversation daemon	 20 December 1985
#

# This one is pretty straightforward - no special flags for it.

CC	=	cc
CFLAGS+= -std=gnu99  -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-sign-compare  -Wno-traditional	 -Wa,--fatal-warnings -Wreturn-type -Wswitch -Wshadow -Wcast-qual -Wwrite-strings -Wextra -Wno-unused-parameter -Wno-sign-compare -Wold-style-definition -Wsign-compare -Wformat=2   -Wno-format-zero-length  -Werror

CFLAGS +=	-g
SRCS	=	convd.c
DEST	=	convd
RDEST	=	/usr/etc/convd

all: ${DEST}

${DEST}:	${SRCS}
	/bin/rm -f ${DEST}
	${CC} ${CFLAGS} -o ${DEST} ${SRCS}

install:	${DEST}
	/bin/rm -f ${RDEST}
	cp ${DEST} ${RDEST}

clean:
	/bin/rm -f ${DEST} core *.o

shar:	Makefile ${SRCS}
	shar -v Makefile ${SRCS} > ../shar.convd

dist: ${DEST}
	-cp  ${DEST} ${RDEST}
	-rcp ${DEST} buddy:${RDEST}
	-rcp ${DEST} franny:${RDEST}
	-rcp ${DEST} holden:${RDEST}
	-rcp ${DEST} seymour:${RDEST}
	-rcp ${DEST} zooey:${RDEST}
	-rcp ${DEST} miro:${RDEST}
	-rcp ${DEST} cory:${RDEST}

depend: ${SRCS}
	mv Makefile makefile.old
	sed '/^# Dependencies follow/,$$d' makefile.old > Makefile
	echo '# Dependencies follow' >> Makefile
	includes -so ${SRCS} >> Makefile
	echo ' ' >> Makefile
	echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY' >> Makefile
	echo '# see depend: above' >> Makefile

# DO NOT DELETE THE FOLLOWING LINE
# Dependencies follow

convd.o: /usr/include/errno.h

convd.o: /usr/include/sys/ttydev.h

convd.o: /usr/include/sys/ttychars.h

convd.o: /usr/include/sys/ioctl.h

convd.o: /usr/include/signal.h

convd.o: /usr/include/netdb.h

convd.o: /usr/include/netinet/in.h

convd.o: /usr/include/sys/socket.h

convd.o: /usr/include/sys/uio.h

convd.o: /usr/include/sys/types.h

convd.o: /usr/include/stdio.h

convd.o: ./../common.h
 
# IF YOU PUT STUFF HERE IT WILL GO AWAY
# see depend: above
