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 edonr 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 : edonr_test32_check edonr_test64_check
34
35 all : edonr_test32 edonr_test64
36
37 edonr_test32 : edonr_test.c
38 @ echo Building 32-bit test...
39 @ $(GCC) $(CFLAGS) -o edonr_test32 edonr_test.c ../edonr.c
40
41 edonr_test64 : edonr_test.c
42 @ echo Building 64-bit test...
43 @ $(GCC) $(CFLAGS) -m64 -o edonr_test64 edonr_test.c ../edonr.c
44
45 edonr_test32_check : edonr_test32
46 @ echo Running 32-bit test...
47 @ ./edonr_test32 $(CPUMHZ)
48
49 edonr_test64_check : edonr_test64
50 @ echo Running 64-bit test...
51 @ ./edonr_test64 $(CPUMHZ)
52
53 clean :
54 rm -f edonr_test32 edonr_test64