#-----------------------------------------------------------------------------
# $Id: Makefile,v 1.21 90/11/28 13:28:34 dougs Exp $
# Makefile for clib:
#-----------------------------------------------------------------------------

ROOT	= /b/gregs
PIDIR	= ${ROOT}/i960/include	# where to find the .h_v files
PSDIR	= ${ROOT}/i960/libutil	# where to find the .c_v and .s_v files

IDIR	= ../include

.PATH.h_v = ${PIDIR} 
.PATH.h   = ${IDIR} 
.PATH.c_v = ${PSDIR}
.PATH.s_v = ${PSDIR)

.LOGFILE .c_v(.c)
.LOGFILE .s_v(.s)
.LOGFILE .h_v(.h)

GETOPTS	= -q
# Essential under System V, harmless elsewhere
SHELL = /bin/sh

.c_v.c:
	=get $(GETOPTS) $<\($@\)

.h_v.h:
	=get $(GETOPTS) $<\($@\)

.s_v.s:
	=get $(GETOPTS) $<\($@\)

.c.o:
	${COMPILE}

.s.o:
	${AS} ${ASFLAGS} -o $*.o $*.s

CC	= gcc960
SYMDBG	= ####-g -mleaf-procedures -mtail-call
#sammy add "-g" option for source level debugger
CFLAGS	= -g -O3 -I${IDIR}  -mstrict-align
AS	= uhuh
AR	= uhuh
ARFLAGS	= rs


OBJS = menuparse.o askdate.o asklevel.o askunsigned.o askint.o \
	askyesno.o \
	askchar.o askip.o messages.o asknid.o asktimeoff.o \
	askburndate.o askenable.o

libutil.a: FORCE
		make lib \
		LIB=libutil.a \
		COMPILE='${CC} ${CFLAGS} ${SYMDBG} -ACA -c $$<' \
		AS=gas960 \
		ASFLAGS=-ACA \
		AR=gar960

lib:	${OBJS}
	${AR} ${ARFLAGS} ${LIB} ${OBJS}
	cp libutil.a ../lib

FORCE:

menuparse.o:	Makefile ${IDIR}/defines.h ${IDIR}/menuparse.h
askdate.o:	Makefile
asklevel.o:	Makefile
askunsigned.o:	Makefile
askint.o:	Makefile
askyesno.o:	Makefile
askchar.o:	Makefile
askip.o:	Makefile ${IDIR}/types.h
messages.o:	Makefile
asknid.o:	Makefile ${IDIR}/types.h
asktimeoff.o:	Makefile
askburndate.o:	Makefile
askenable.o:	Makefile



