#
# COPYRIGHT NOTICE
# Copyright (c) Alteon Networks, Inc. 1996
# All rights reserved
#
# HISTORY
# $Log: Makefile,v $
# Revision 1.5.5.12  1998/06/02  22:17:06  ted
# 	Change LIBFLAGS to LIBDIRS for new build stuff
# 	[1998/06/02  22:13:15  ted]
#
# Revision 1.5.5.11  1998/04/14  22:44:23  ted
# 	Fix compile error left from change of tg.h to pub_tg.h
# 	[1998/04/14  22:44:16  ted]
# 
# Revision 1.5.5.10  1997/11/19  19:23:58  ted
# 	Support Tigon and Tigon2 in the same driver
# 	[1997/11/19  19:21:07  ted]
# 
# Revision 1.5.5.9  1997/08/01  21:07:30  ted
# 	Change ALT_OP1 to OEM_OP1 so we get the right release identifier
# 	[1997/08/01  21:05:22  ted]
# 
# Revision 1.5.5.8  1997/07/05  21:17:48  ted
# 	Fix naming issues as reported in bug 317
# 	[1997/07/05  21:15:22  ted]
# 
# Revision 1.5.5.7  1997/06/17  00:36:48  ted
# 	Cleanse ndd code with new, Alteon developed code
# 	[1997/06/13  02:28:33  ted]
# 
# 	Fix dependencies so everything rebuilds when it should
# 	[1997/06/12  18:09:38  ted]
# 
# Revision 1.5.5.6  1997/06/03  18:55:14  ted
# 	Changes to support Sun naming of drivers (vge vs. alt)
# 	[1997/06/03  18:54:14  ted]
# 
# Revision 1.5.5.5  1997/04/12  00:11:46  ted
# 	Merged Sbus code, some performance enhancements
# 	[1997/04/12  00:08:10  ted]
# 
# Revision 1.5.5.4  1997/02/11  04:08:14  ted
# 	Add dependencies on the libraries so we rebuild properly
# 	[1997/02/11  04:03:26  ted]
# 
# Revision 1.5.5.3  1997/02/09  00:19:02  ted
# 	add make depend stuff
# 	[1997/02/09  00:18:52  ted]
# 
# Revision 1.5.5.2  1997/02/08  23:53:48  ted
# 	Testing make depend stuff
# 	[1997/02/08  23:53:35  ted]
# 
# Revision 1.5.5.1  1997/02/07  21:58:35  ted
# 	Updates for AIX/NT/new Solaris options (fast DMA)
# 	[1997/02/07  21:50:10  ted]
# 
# Revision 1.5.2.5  1996/11/24  04:02:38  ted
# 	Fix makedepend problems left over from pre-bsubmit file structure
# 	[1996/11/24  04:01:20  ted]
# 
# Revision 1.5.2.4  1996/11/21  18:02:03  ted
# 	Rework for files moved from host/unix/common to host/common
# 	[1996/11/21  17:48:32  ted]
# 
# Revision 1.5.2.3  1996/11/20  20:04:47  ted
# 	Change INCFLAGS for new tg.h (makedepend too)
# 	[1996/11/20  19:57:29  ted]
# 
# Revision 1.5.2.2  1996/11/03  23:13:05  ted
# 	Remove -O2 from CFLAGS line and put it on the OPT_LEVEL line
# 	[1996/11/03  23:09:41  ted]
# 
# Revision 1.5.2.1  1996/11/01  18:25:41  ted
# 	buildify Makefile
# 	[1996/10/30  22:59:41  ted]
# 
# $EndLog$
#

ANSI_CC=/opt/SUNWspro/bin/cc
ANSI_LD=/usr/ucb/ld

PROGRAMS	= vge alt

# would normally put this in OPT_LEVEL, but this gets passed to ld
# which causes a failure, so it has to go in CFLAGS
#OPT_LEVEL=	-O2
CFLAGS=	-D_KERNEL -v -Xa -DALT_STREAM -DALT_SYSV -DSBUS=0 -O2 -DTIGON_REV=3
LDFLAGS		= -r

INCFLAGS	= -I${SOURCEBASE}${MAKEDIR}/../common \
		-I${SOURCEBASE}${MAKEDIR}/../../../common \
		-I${SOURCEBASE}${MAKEDIR}/../../../../../common \
		-I${SOURCEBASE}${MAKEDIR}/../../../../common 
LIBDIRS	= -L../common -L../../../common
LIBS		= -laltcommon -laltstrcommon

OFILES=	../common/libaltstrcommon.a \
	../../../common/libaltcommon.a \
	alt_nd.o
CFILES=	altinit.c alt_nd.c

CLEANFILES= vgeinit.o altinit.o alt_nd.o

vgeinit.o:	altinit.c altinit.o
	${_CC_} ${_CCFLAGS_} ${INCFLAGS} -c -DOEM_OP1 -DALTNAME='"vge"' -DALTIDENT='"Sun Vector Gigabit Ethernet"' ${SOURCEBASE}${MAKEDIR}/altinit.c
	${MV} altinit.o vgeinit.o
	${MV} tmp.o altinit.o

altinit.o:	altinit.c
	${_CC_} ${_CCFLAGS_} ${INCFLAGS} -c -DALTNAME='"alt"' -DALTIDENT='"Alteon"' ${SOURCEBASE}${MAKEDIR}/altinit.c
	${CP} altinit.o tmp.o

.if defined(PROGRAMS)

alt:	altinit.o ${_OFILES_}
	${_LD_} ${_LDFLAGS_} -o ${.TARGET}.X altinit.o alt_nd.o ${_LIBS_}
	${MV} ${.TARGET}.X ${.TARGET}

vge:	vgeinit.o ${_OFILES_}
	${_LD_} ${_LDFLAGS_} -o ${.TARGET}.X vgeinit.o alt_nd.o ${_LIBS_}
	${MV} ${.TARGET}.X ${.TARGET}

.endif

.include <${RULES_MK}>

.include <alt.depend.mk>



