head	1.2;
access;
symbols;
locks; strict;
comment	@# @;


1.2
date	2006.03.24.12.35.40;	author yama;	state Exp;
branches;
next	1.1;

1.1
date	2006.03.13.01.44.58;	author yama;	state Exp;
branches;
next	;


desc
@@


1.2
log
@*** empty log message ***
@
text
@#! make -f
#----------------------------------------------------------------------------
# Project:  C\[X->oCi[
# File:     Makefile
#
# Copyright 2005 GameFreak.inc  All rights reserved.
#
#----------------------------------------------------------------------------
DP_ROOT	=	../../..

SUBDIRS		=

TARGET_ARC	=	enc_data.narc
ENCOUNT_DATA =	PMDPencount.csv


include	sourcefile.lst

#----------------------------------------------------------------------------
#	b\[XoCiϊ\ɂ邽߂̐ݒ
#----------------------------------------------------------------------------
include	$(NITROSDK_ROOT)/build/buildtools/commondefs.cctype.CW
include	$(NITROSYSTEM_ROOT)/build/buildtools/commondefs

#ʕϐ`
include $(DP_ROOT)/commondefs.GF

include	$(NITROSYSTEM_ROOT)/build/buildtools/modulerules

%.bin: %.c
	echo "#include \"$(NITROSDK_ROOT)/include/nitro/types.h\"" > temp.c
	cat dummy.h $< >> temp.c
	$(CC) $(CCFLAGS) $(INCLUDES)  -c temp.c -MD -o $*.o
	$(MWLD) -dis -o $*.elf $*.o
	$(ELF2BIN) $*.elf
	-rm $*.o temp.c temp.d
	-rm $*.elf


#----------------------------------------------------------------------------
#
#----------------------------------------------------------------------------
#MakeŐ*.binmake clean̍폜Ώۂɂ
LDIRT_CLEAN	= $(CONVSRCS:.c=.bin) $(CONVSRCS) $(TARGET_ARC) $(TARGET_ARC:.narc=.naix)

LINCLUDES		= $(NITROSDK_ROOT)/include
LINCLUDES		+= $(DP_ROOT)/src/field

LINCLUDES	+= $(dir $<)

#----------------------------------------------------------------------------
#	c[ւ̃pXw
#----------------------------------------------------------------------------
LISTMK		= $(DP_ROOT)/convert/eventdata/listmk.exe
ELF2BIN		= $(DP_ROOT)/convert/eventdata/celf2bin.exe
CONVERTER	= $(DP_ROOT)/convert/encountdata/EncountConverter


#----------------------------------------------------------------------------
#
#	[`
#
#----------------------------------------------------------------------------
do-build: $(TARGET_ARC)

$(TARGET_ARC): $(ENCOUNT_DATA)
	$(MAKE) convert				#Ro[g
	$(MAKE) mklst				#ꗗ쐬
	$(MAKE) makebin				#b\[XoCiϊ
	$(MAKE) makearc				#A[JCuɂ܂Ƃ߂

#Ro[^Ăяo
convert:
	$(CONVERTER) $(ENCOUNT_DATA)


#Ώۃ\[Xꗗ쐬
mklst:
	ls -1 *enc.c > temp
	$(LISTMK) temp sourcefile.lst CONVSRCS
	rm temp

#b\[XoCiϊ
makebin: $(CONVSRCS:.c=.bin)

#A[JCu쐬
makearc:
	nnsarc -i -c -l -n $(TARGET_ARC) *.bin > arc_result.txt



#----------------------------------------------------------------------------
#----------------------------------------------------------------------------
test:
	echo $(LDIRT_CLEAN)

#echo $(foreach types,$(FILETYPES),$(wildcard *$(types)*))



@


1.1
log
@init
@
text
@d31 2
a32 1
	cat dummy.h $< > temp.c
@

