# $Log$
# Revision 2.2  2006/07/30 11:47:00  rich
# Fixes to work with DevkitArm
#
# Revision 2.1.1.1  2004/02/04 21:49:21  Default
# Doomdark's Revenge GBA
#
#

export DEVKITARM := 1
include ../../gbalib/master.mk
OUTPUTDIR = ../o

PROJECT = libdata.a

BINDATA = \
	font.bin title.bin tokendict.bin objectgfx.bin \
	namedicts.bin tables.bin terrainmap.bin terraingfx.bin

OFILES1 = $(BINDATA:%.bin=%.all.rodata.o)

OFILES = $(OFILES1:%.o=$(OUTPUTDIR)/%.o)


all:
	make $(PROJECT)

clean:
	rm -f  $(OFILES)


# final step, create bin file from elf file
$(PROJECT) : $(OFILES)
	@ar rcs $@ $(OFILES)

# make object files from binary data
$(OUTPUTDIR)/%.all.rodata.o : %.bin
	@echo objcopy rodata bin $<
	@$(OBJCOPY) $(OBJCOPYFLAGS) $< $@
