# Copyright (c) 1997 by Sun Microsystems, Inc.
# All rights reserved.

#ident	"@(#)Makefile	1.5	97/04/07 SMI"

TOP= ../..

include $(TOP)/Makefile.master

CFILES=p9000.c
CFLAGS += -D$(INST) $(ENVCPPFLAGS1) $(ENVCPPFLAGS2) -D_KERNEL
HEADERS=p9000reg.h viperio.h viperreg.h
INLINE=p9000.il
OBJS= p9000.o

.KEEP_STATE:

deflt:	p9000

p9000:	p9000.o
	ld -r -o p9000 p9000.o

p9000.o:	p9000.c $(HEADERS) $(INLINE)
	${CC} -c ${CFLAGS} -I. p9000.il p9000.c

clean:
	-@rm -f $(OBJS)

DDICT_FILES= ${OBJS:%.o=%.ddict}
DDICTFLAGS += -q -DP9000_NOT_INLINE $(K_CFLAGS) -r2.5.1


ddict: $(DDICT_FILES)
 
${DDICT_FILES}:
	@($(LHEAD) $(DDICT) $(DDICTFLAGS) $(@:%.ddict=%.c)))
 
lint:
	lint ${CFLAGS} -x -u $(CFILES)
