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

GNXDIR=
CFLAGS = -KCfx16 -KF381  -DDRAGON  -J1 -c -R -O
ASFLAGS = -KCfx16 -KF381   -c  -DDRAGON  
DFLAGS = -c -n -v -KCFX16 -KF381  -DDRAGON 

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


all: monfx16f.hx0 monfx16f.hx1


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


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

monfx16f.hx0 : monfx16f
	$(NBURN) -w2 -b0  -n -x0x0040000 -l64 -i -o monfx16f.hx0  monfx16f

monfx16f.hx1: monfx16f
	$(NBURN) -w2 -b1 -n  -x0x0040000 -l64 -i -o monfx16f.hx1  monfx16f

monfx16f :  moncgcor.s def.s date.o
	$(AS) $(DFLAGS) $(RAM) -o monfx16f.o moncgcor.s
	$(LD) -o monfx16f -m -d linkfile.rom  monfx16f.o  date.o > monfx16f.map
	
monfx16f.ram:  moncgcor.s def.s date.o
	$(AS) $(DFLAGS) $(RAM) -o monfx16f.o moncgcor.s
	$(LD) -o monfx16f.ram -e reset -m -d linkfile.ram monfx16f.o date.o




date.o: date.c
	$(CC)  $(CFLAGS) -Wa,-r   date.c  
	

clean : 
	rm -rf *.o

clobber : clean
	rm -f monfx16fax.map
	rm -f monfx16fax
	rm -f monfx16fax.hx0
	rm -f monfx16fax.hx1

.SCCS_GET:
