1#! make -f
2#----------------------------------------------------------------------------
3# Project:  TwlSDK - demos.TWL - ctr-compatible - build
4# File:     Makefile
5#
6# Copyright 2007 Nintendo.  All rights reserved.
7#
8# These coded instructions, statements, and computer programs contain
9# proprietary information of Nintendo of America Inc. and/or Nintendo
10# Company Ltd., and are protected by Federal copyright law.  They may
11# not be disclosed to third parties or copied or duplicated in any form,
12# in whole or in part, without the prior written consent of Nintendo.
13#
14# $Date:: 2007-12-26#$
15# $Rev: 3286 $
16# $Author: hatamoto_minoru $
17#----------------------------------------------------------------------------
18
19SUBDIRS		=
20
21#----------------------------------------------------------------------------
22TARGET_PLATFORM		:= TWL
23
24SRCS		=	main.c
25TARGET_BIN	=	main.srl
26
27MAKEROM_ROMROOT  = ./rom_data
28MAKEROM_ROMFILES = *.*
29
30LDIRT_CLEAN	=	$(MAKEROM_ROMROOT)/counter.bin $(MAKEROM_ROMROOT)/encrypted.bin
31
32include	$(TWLSDK_ROOT)/build/buildtools/commondefs
33
34#----------------------------------------------------------------------------
35
36.PHONY:	rom_data
37
38do-build:		$(TARGETS)
39
40
41$(BINDIR)/main.srl: rom_data
42
43rom_data:
44	$(PERL) aes-128-ctr.pl					\
45		$(MAKEROM_ROMROOT)/sample16.txt		\
46		$(MAKEROM_ROMROOT)/key.bin			\
47		$(MAKEROM_ROMROOT)/counter.bin		\
48		$(MAKEROM_ROMROOT)/encrypted.bin
49
50
51include	$(TWLSDK_ROOT)/build/buildtools/modulerules
52
53
54#===== End of Makefile =====
55