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

include ../make.inc

SRCS=irda.c utils.c udp.c unix.c hub.c lib.c prefs.c
HSRCS=hifimsg.h
LIB=libhifimsg.a
PROTOS=hifimsg_protos.h

RCSGUFF=${SRCS} ${HSRCS} server.c Makefile 

DEFINES=
INCLUDES  = -I../shared
CFLAGS= $(OPT) $(DEFINES) $(INCLUDES)  ${WARN}

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

all: ${LIB} server

server:server.o ${LIB}
	${CC} -o $@ server.o ${CFLAGS} ${INCLUDES} ${LIB}


${LIB}:${LIB}(${OBJS})

${LIB}(%.o):%.o
	ar rcs ${LIB} $<

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

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

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

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

nodepend:
	/bin/rm -f .depend

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

checkin:
	${RCSCI} -m# -l ${RCSGUFF}
	
tidy:checkin
	${INDENT} -ts0 -i2 ${SRCS} ${HS} server.c

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

