1#! make -f
2#----------------------------------------------------------------------------
3# Project:  TwlSDK - libraries - math
4# File:     Makefile
5#
6# Copyright 2003-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
19SUBDIRS			 =
20
21
22#----------------------------------------------------------------------------
23override TARGET_PLATFORM = NITRO
24
25# Build ARM & THUMB libraries
26NITRO_CODEGEN	?= ALL
27NITRO_PROC		 = ARM9
28
29# SHA-256 uses the C version
30# override TWLSDK_MATH_NOT_USE_SHA256_ASM = TRUE
31
32LINCLUDES		 = ../common/include
33SRCDIR			 = ../common/src src
34
35SRCS			 = 	math.c 			\
36					dgt_md5.c		\
37					dgt_sha1.c		\
38					dgt_hmac.c		\
39					crc.c			\
40					checksum.c		\
41					qsort.c			\
42					fft.c			\
43
44ifneq	($(TWLSDK_MATH_NOT_USE_SHA1_ASM),TRUE)
45SRCS                    += asm/sha1.s
46MACRO_FLAGS             += -DMATH_SHA1_ASM
47endif
48
49TARGET_LIB		 = libmath$(NITRO_LIBSUFFIX).a
50
51
52include	$(TWLSDK_ROOT)/build/buildtools/commondefs
53
54#SRCS			+=	dgt_sha256.c
55SRCS			+=	net_sha256.c
56
57ifneq	($(TWLSDK_MATH_NOT_USE_SHA256_ASM),TRUE)
58SRCS			+=	asm/sha256.s
59MACRO_FLAGS             +=      -DMATH_SHA256_ASM
60endif
61
62INSTALL_TARGETS	 = $(TARGETS)
63INSTALL_DIR		 = $(NITRO_INSTALL_LIBDIR)
64
65
66#----------------------------------------------------------------------------
67
68do-build:		$(TARGETS)
69
70
71include	$(TWLSDK_ROOT)/build/buildtools/modulerules
72
73
74#===== End of Makefile =====
75