#Copyright (c) 1997, by Sun Microsystems, Inc.
#All Rights Reserved

#ident	"@(#)Makefile	1.8	97/04/04 SMI"

TOP= ../..

include $(TOP)/Makefile.master

CFILES=cgsix.c
CFLAGS += -D$(INST) $(ENVCPPFLAGS1) $(ENVCPPFLAGS2) -D_KERNEL
HEADERS=cg6reg.h cg6var.h cg6io.h
OBJS= cgsix.o

.KEEP_STATE:

deflt:	cgsix

cgsix:	cgsix.o
	ld -r -o cgsix cgsix.o

cgsix.o:	cgsix.c $(HEADERS)
	${CC} -c ${CFLAGS} -I. cgsix.c

clean:
	-@rm -f *% *.BAK $(OBJS)

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

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