remove version in all files
[dpdk.git] / mk / machine / native / rte.vars.mk
1 #   BSD LICENSE
2
3 #   Copyright(c) 2010-2012 Intel Corporation. All rights reserved.
4 #   All rights reserved.
5
6 #   Redistribution and use in source and binary forms, with or without 
7 #   modification, are permitted provided that the following conditions 
8 #   are met:
9
10 #     * Redistributions of source code must retain the above copyright 
11 #       notice, this list of conditions and the following disclaimer.
12 #     * Redistributions in binary form must reproduce the above copyright 
13 #       notice, this list of conditions and the following disclaimer in 
14 #       the documentation and/or other materials provided with the 
15 #       distribution.
16 #     * Neither the name of Intel Corporation nor the names of its 
17 #       contributors may be used to endorse or promote products derived 
18 #       from this software without specific prior written permission.
19
20 #   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
21 #   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
22 #   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
23 #   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
24 #   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
25 #   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
26 #   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
27 #   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
28 #   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
29 #   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
30 #   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31
32
33 #
34 # machine:
35 #
36 #   - can define ARCH variable (overriden by cmdline value)
37 #   - can define CROSS variable (overriden by cmdline value)
38 #   - define MACHINE_CFLAGS variable (overriden by cmdline value)
39 #   - define MACHINE_LDFLAGS variable (overriden by cmdline value)
40 #   - define MACHINE_ASFLAGS variable (overriden by cmdline value)
41 #   - can define CPU_CFLAGS variable (overriden by cmdline value) that
42 #     overrides the one defined in arch.
43 #   - can define CPU_LDFLAGS variable (overriden by cmdline value) that
44 #     overrides the one defined in arch.
45 #   - can define CPU_ASFLAGS variable (overriden by cmdline value) that
46 #     overrides the one defined in arch.
47 #   - may override any previously defined variable
48 #
49
50 # ARCH =
51 # CROSS =
52 # MACHINE_CFLAGS =
53 # MACHINE_LDFLAGS =
54 # MACHINE_ASFLAGS =
55 # CPU_CFLAGS =
56 # CPU_LDFLAGS =
57 # CPU_ASFLAGS =
58
59 MACHINE_CFLAGS = -march=native
60 AUTO_CPUFLAGS = $(shell cat /proc/cpuinfo | grep flags -m 1)
61
62 # adding flags to CPUFLAGS
63
64 ifneq ($(filter $(AUTO_CPUFLAGS),sse),)
65  CPUFLAGS += SSE
66 endif
67
68 ifneq ($(filter $(AUTO_CPUFLAGS),sse2),)
69  CPUFLAGS += SSE2
70 endif
71
72 ifneq ($(filter $(AUTO_CPUFLAGS),sse3),)
73  CPUFLAGS += SSE3
74 endif
75
76 ifneq ($(filter $(AUTO_CPUFLAGS),ssse3),)
77  CPUFLAGS += SSSE3
78 endif
79
80 ifneq ($(filter $(AUTO_CPUFLAGS),sse4_1),)
81  CPUFLAGS += SSE4_1
82 endif
83
84 ifneq ($(filter $(AUTO_CPUFLAGS),sse4_2),)
85  CPUFLAGS += SSE4_2
86 endif
87
88 ifneq ($(filter $(AUTO_CPUFLAGS),aes),)
89  CPUFLAGS += AES
90 endif
91
92 ifneq ($(filter $(AUTO_CPUFLAGS),pclmulqdq),)
93  CPUFLAGS += PCLMULQDQ
94 endif
95
96 ifneq ($(filter $(AUTO_CPUFLAGS),avx),)
97  CPUFLAGS += AVX
98 endif
99
100 ifneq ($(filter $(AUTO_CPUFLAGS),rdrnd),)
101  CPUFLAGS += RDRAND
102 endif
103
104 ifneq ($(filter $(AUTO_CPUFLAGS),fsgsbase),)
105  CPUFLAGS += FSGSBASE
106 endif
107
108 ifneq ($(filter $(AUTO_CPUFLAGS),f16c),)
109  CPUFLAGS += F16C
110 endif