# $Log: Makefile,v $
# Revision 1.3  2004/01/27 19:39:33  richq
# title.bin added - the title screen data.
#
# Revision 1.2  2004/01/21 19:38:33  Default
# Data files extracted from the speccy version of LoM:
# font.bin - the font, in 1 bit per pixel format
# garrisondata.bin - the 102 garrisons initial values
# lorddata.bin - the 32 lords initial values
# objectgfx.bin - the 1 bpp gfx for the characters and enemies
# regimentdata.bin - initial data for Doomguard
# shieldgfx.bin - the 1 bpp gfx for the shield
# shieldmain.bin - contains shield colour and tile information
# tokendict.bin - contains the tokens in 5 bit bytes compressed together
#
#
#

include ../../gbalib/master.mk
OUTPUTDIR = ../o

PROJECT = libdata.a

BINDATA = \
	terrgfx.bin locations.bin areas.bin font.bin \
	tokendict.bin lorddata.bin shieldgfx.bin shieldmain.bin objectgfx.bin \
	garrisondata.bin regimentdata.bin title.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) $< $@
