#
# COPYRIGHT NOTICE
# Copyright (c) Alteon Networks, Inc. 1996
# All rights reserved
#

# Local configuration stuff
# Need to set TOOLS_BASE and SOURCEBASE manually.

TOOLS_BASE=/usr/groups/gige/linux-tools/mips-gnu
SOURCEBASE=/usr/groups/gige/build/acenic-fw-12.3.10

include ../common/alt.tg1.gnu

OFILES		= start.o disp.o fwmain.o timer.o command.o mcast.o \
		dma.o trace.o mem.o mac.o \
		com_link.o com_np.o com_mii.o com_zconf.o com_link_if.o \
		com_led.o ctxt.o tx2.o rx2.o event.o

CFILES		= fwmain.c timer.c command.c mcast.c \
		dma.c trace.c mem.c mac.c \
		com_link.c com_np.c com_mii.c com_zconf.c com_link_if.c \
		com_led.c ctxt.c tx2.c rx2.c event.c

#
# override the defaults for clean and clobber
#
CLEANFILES	= *.list *.ss alt_fw2.map alt_fw2.h alt_fw2 ${OFILES}

all: ${PROGRAMS} ${INCLUDES}

${PROGRAMS}: ${_OFILES_}
	${_LD_} -nostdlib -Ttext 0x4000 -N ${_LDFLAGS_} -o $@.X ${_OFILES_} ${_LIBS_}
	${MV} $@.X $@
	${SIZE} $@ > $@.map
	${NM} $@ | sort >> $@.map

${INCLUDES}: ${PROGRAMS}
	${GENFW} ${GENFWFLAGS} $< $@

vpath %.c ../common
.c.o:
	${_CC_} -o `basename $@ .o`.ss ${_CCFLAGS_} $<
	${AS} ${AFLAGS} -APIC -o $@ -L -a=`basename $@ \
		.o`.list `basename $@ .o`.ss 
	${RM} `basename $@ .o`.ss

vpath %.s ../common
.s.o:
	${_CC_} -x assembler-with-cpp -E -o `basename $@ .o`.ss \
		$(filter-out -g%, ${_CCFLAGS_}) $<
	${AS} ${AFLAGS} -o $@ -L -a=`basename $@ .o`.list \
		`basename $@ .o`.ss
	${RM} `basename $@ .o`.ss

data.o: ${GENNED_HDRS}

clean:
	rm -f ${CLEANFILES}

