
# @(#)makefile	1.0	3/29/89
# @(#)Copyright (C) 1988 National Semiconductor Corp.

GNXDIR=
APRG= helper.o  monio.o
CPRG= eload.o ether.o extra.o udp.o eserv.o date.o
HEADERS = packet.h header.h
CPPFLAGS = -DBOARD=SHARK_CCA
CFLAGS = -KCCG160 -KF381 -DBOARD=SHARK_CCA -J1 -c -R -O -KW
ASFLAGS = -KCCG160 -KF381 -KW -c -DBOARD=SHARK_CCA

NBURN = nburn
AS = nasm
CC = nmcc
LD = nmeld
CPP= ncpp
RM = /bin/rm -f
RAM = -DRAM


all : moncg160.hx0 moncg160.hx1


moncg160.hx0 : moncg160
	$(NBURN) -w2 -b0  -n -x0x00c00000 -l64 -i -o moncg160.hx0  moncg160

moncg160.hx1: moncg160
	$(NBURN) -w2 -b1 -n  -x0x00c00000 -l64 -i -o moncg160.hx1  moncg160

.s.o: $(SHEADER)
	$(AS)  $(ASFLAGS) $*.s 

.c.o: $(HEADERS)
	$(CC) $(CFLAGS)   $*.c

moncg160.o:  moncgcor.s def.s
	$(AS) $(ASFLAGS) -c  -o moncg160.o moncgcor.s

moncg160 :  moncg160.o  $(APRG) $(CPRG)
	$(LD) -o moncg160 moncg160.o eload.o -d linkfile.rom -lc -m > moncg160.map

moncg160.ram:  moncgcor.s def.s $(APRG) $(CPRG)
	$(AS) $(ASFLAGS) -c $(RAM) -o moncg160.o moncgcor.s
	$(LD) -o moncg160.ram -e reset -m moncg160.o eload.o -d linkfile.ram -lc > load_moncg160.map

date.o: date.c 
	$(CC)  $(CFLAGS) -Wa,-r   date.c  
	
clean : 
	rm -rf *.o

clobber : clean
	rm -f moncg160.map
	rm -f moncg160
	rm -f moncg160.hex
	rm -f moncg160.hx0
	rm -f moncg160.hx1

.SCCS_GET:
