1 #
2 # CDDL HEADER START
3 #
4 # The contents of this file are subject to the terms of the
5 # Common Development and Distribution License (the "License").
6 # You may not use this file except in compliance with the License.
7 #
8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 # or http://opensource.org/licenses/CDDL-1.0.
10 # See the License for the specific language governing permissions
11 # and limitations under the License.
12 #
13 # When distributing Covered Code, include this CDDL HEADER in each
14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 # If applicable, add the following below this CDDL HEADER, with the
16 # fields enclosed by brackets "[]" replaced with your own identifying
17 # information: Portions Copyright [yyyy] [name of copyright owner]
18 #
19 # CDDL HEADER END
20 #
21 # Copyright 2013 Saso Kiselkov. All rights reserved.
22 #
23 # This makefile drives the production of the skein test suite.
24 # To run the tests, simply type "make" or "make check".
25
26 include ../../../../Makefile.master
27
28 CFLAGS = -I${SRC}/uts/common -D_KERNEL -fno-builtin -O2 -W -Wall \
29 -Wno-unknown-pragmas -std=c99
30 CPUMHZ:sh = psrinfo -v 0 | awk '/processor operates at/{print $6}'
31 GCC = $(GCC_ROOT)/bin/gcc
32
33 check : skein_test32_check skein_test64_check
34
35 all : skein_test32 skein_test64
36
37 skein_test32 : skein_test.c
38 @ echo Building 32-bit test...
39 @ $(GCC) $(CFLAGS) -o skein_test32 skein_test.c ../skein.c \
40 ../skein_block.c
41
42 skein_test64 : skein_test.c
43 @ echo Building 64-bit test...
44 @ $(GCC) $(CFLAGS) -m64 -o skein_test64 skein_test.c ../skein.c \
45 ../skein_block.c
46
47 skein_test32_check : skein_test32
48 @ echo Running 32-bit test...
49 @ ./skein_test32 $(CPUMHZ)
50
51 skein_test64_check : skein_test64
52 @ echo Running 64-bit test...
53 @ ./skein_test64 $(CPUMHZ)
54
55 clean :
56 rm -f skein_test32 skein_test64