# Normally makefiles should include a *defs file and commonrules,
# but this makefile needs to work when the tree is first created
# before those files have been placed in $ROOT
#
include $(ROOT)/usr/include/make/NGdefs

LATEST = rel_0.6
DEST_ROOT=$(ROOT)/usr/bin/nintendo

INST=$(LATEST)/16instruction.bin
BS1=$(LATEST)/BS1.img
BS2=$(LATEST)/BS2.img

ifeq ($(RVL_MEM), 128)
BOOT=$(LATEST)/bootinfo.128.bin
else
ifeq ($(RVL_MEM), 64)
BOOT=$(LATEST)/bootinfo.64.bin
endif
endif

exports install:
	mkdir -p $(DEST_ROOT)
	$(INSTALL) $(INST) $(DEST_ROOT)
	$(INSTALL) $(BS1) $(DEST_ROOT)
	$(INSTALL) $(BS2) $(DEST_ROOT)
	$(INSTALL) $(BOOT) $(DEST_ROOT)/bootinfo.bin

clobber headers clean all:
