#
# Makefile:
#
# Copyright (c) 2001 James McKenzie <james@fishsoup.dhs.org>,
# All rights reserved.
#
# $Id: Makefile,v 1.13 2001/10/12 13:51:21 root Exp root $
#
# $Log: Makefile,v $
# Revision 1.13  2001/10/12 13:51:21  root
# #
#
# Revision 1.11  2001/01/07 22:36:20  root
# #
#
# Revision 1.10  2001/01/07 22:26:43  root
# #
#
# Revision 1.9  2001/01/07 17:34:54  root
# #
#
# Revision 1.8  2001/01/07 04:49:58  root
# #
#
# Revision 1.7  2001/01/07 03:48:47  root
# #
#
#
#####################################################################
#
# Makefile:
#
#
######################################################################

include ../make.inc

PROG=nope
OPT=-g

DEFINES=-DHIFI

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

INCLUDES  = -I../libfiles ${DBINC} 
CFLAGS= $(OPT) $(DEFINES) $(INCLUDES) ${WARN}
LDFLAGS=
LIB=../libfiles/libfiles.a  
LIBS=${LIB} ${DBLIB} 

PSRCS = ieee1284.c util.c yepplib.c  yepp.c
SRCS=${PSRCS} 
HS= project.h yepplib.h

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

all: ${PROG}

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

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

ieee1284.o:ieee1284.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} ${DEFINES} ${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

