# DCSI v0.4 by D. Finck - http://www.finck.net/dcsi/
# KOS 2.X report by Indiket (2013)
# 
# A basic libdream to KOS change :)

# Put the filename of the output binary here
TARGET = dcsi.elf

# List all of your C files here, but change the extension to ".o"
OBJS = main.o cpu8080.o

# If you define this, the Makefile.rules will create a romdisk.o for you
# from the named dir.
# KOS_ROMDISK_DIR = romdisk

all: rm-elf $(TARGET)

include $(KOS_BASE)/Makefile.rules

clean:
	-rm -f $(TARGET) $(OBJS)

rm-elf:
	-rm -f $(TARGET)

$(TARGET): $(OBJS) $(PROBJS)
	$(KOS_CC) $(KOS_CFLAGS) $(KOS_LDFLAGS) -o $(TARGET) $(KOS_START) \
		$(OBJS) $(PROBJS) $(OBJEXTRA) -L$(KOS_BASE)/lib -lgcc -lm $(KOS_LIBS)

run: $(TARGET)
	$(KOS_LOADER) $(TARGET)

bin:
	$(KOS_OBJCOPY) -O binary -R .stack $(TARGET) dcsi.bin
