CC      = gcc
CFLAGS  = -O2 -w -DLSB_FIRST -DDEBUG 

BDIR    = /home/jesus/cc65
AS65    = ca65 -l
LD65    = ld65
CC65    = cc65 -I $(BDIR)/include

SRCS	= nrom.s bootload.s dissa.s i2c.s irqbrk.s lcd.s mmc.s spi.s dos.s eth.s ip.s

all:	nrom.bin bootrom.bin

nrom_dfed.bin:	$(SRCS) Makefile nconfigdeb.ld
	$(AS65) -D DEBUG=1 $<
	$(LD65) -C nconfigdeb.ld nrom.o
	
nrom.bin:	$(SRCS) Makefile nconfig.ld
	$(AS65) -D DEBUG=0 $<
	$(LD65) -C nconfig.ld -vm -m nrom.map nrom.o
	grep endtxt nrom.map

bootrom.bin:	nrom.bin
	cat ../../brom.bin nrom.bin > $@
clean:	
	rm -f *.o *.lst *.map a.out *~

