#! make -f
#----------------------------------------------------------------------------
# Project:  ZGtFNg
# File:     Makefile
#
# Copyright 2005 GameFreak.inc  All rights reserved.
#
#----------------------------------------------------------------------------
DP_ROOT	=	../..
SUBDIRS		=

SKILLDIRS	= .

PA_SRC =$(wildcard animefile/poke_anm*.s)

TARGET_NARC = poke_anm.narc

include	$(NITROSDK_ROOT)/build/buildtools/commondefs.cctype.CW
include	$(NITROSYSTEM_ROOT)/build/buildtools/commondefs


#MakeŐ*.binmake clean̍폜Ώۂɂ
LDIRT_CLEAN	= $(PA_SRC:.s=.bin) $(TARGET_NARC)

#----------------------------------------------------------------------------

#----------------------------------------------------------------------------
#	c[ւ̃pXw
#----------------------------------------------------------------------------
ELF2BIN		= $(DP_ROOT)/convert/eventdata/elf2bin.exe

include	$(NITROSYSTEM_ROOT)/build/buildtools/modulerules

#-------------------------------
#	s
#		\[XRs[
#		\[XA[JCu
#		ZGtFNgA[JCu
#-------------------------------
do-build: $(TARGET_NARC)

$(TARGET_NARC): $(PA_SRC:.s=.bin)
	nnsarc -i -c -l -n $(TARGET_NARC) animefile/poke_anm*.bin
	touch p_anm_sys.c
		
%.bin: %.s past.h
	$(MWAS) $< -o $*.o
	$(MWLD) -dis -o $*.elf $*.o
	$(ELF2BIN) $*.elf
	rm $*.o
	rm $*.elf
