1#! make -f
2#---------------------------------------------------------------------------
3# Project:  TwlSDK - tools - defval - test
4# File:     Makefile
5#
6# Copyright 2005-2008 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:: 2008-09-18#$
15#  $Rev: 8573 $
16#  $Author: okubata_ryoma $
17#---------------------------------------------------------------------------
18
19
20TARGET_PLATFORM	= NITRO
21
22include	$(TWLSDK_ROOT)/build/buildtools/commondefs
23
24TARGET			= result1.txt result2.txt result3.txt
25
26DEFVAL			= $(NITRO_TOOLSDIR)/bin/defval.exe
27
28result1.txt:	test.txt
29			$(DEFVAL) -DOUTPUT=$@ -DFILENAME=d:/home/test/filename.txt $< $@
30
31result2.txt:	test.txt local.def
32			$(DEFVAL) -Mlocal.def $< $@
33
34result3.txt:	test.txt local.def
35			$(DEFVAL) -Mlocal.def -DOUTPUT=$@ -DFILENAME=d:/home/test/filename.txt $< $@
36
37.PHONY:			build install do-autotest clean clobber
38
39define ECHO_CURDIR
40			echo "==== $(CURDIR)";
41endef
42
43build:
44			@$(ECHO_CURDIR)
45			+@$(REMAKE) do-test
46
47do-test:		$(TARGET) goodresult1.txt goodresult2.txt goodresult3.txt
48			@diff result1.txt goodresult1.txt || echo "Error: result1.txt unmatched."
49			@diff result2.txt goodresult2.txt || echo "Error: result2.txt unmatched."
50			@diff result3.txt goodresult3.txt || echo "Error: result3.txt unmatched."
51
52install do-autotest:
53			@$(ECHO_CURDIR)
54
55clean clobber super-clobber:
56			@$(ECHO_CURDIR)
57			-rm -f $(TARGET) *~
58
59#===== End of Makefile =====
60