aboutsummaryrefslogtreecommitdiff
path: root/config.mk.dist
diff options
context:
space:
mode:
authorSzabolcs Nagy <szabolcs.nagy@arm.com>2018-04-24 17:10:05 +0100
committerSzabolcs Nagy <szabolcs.nagy@arm.com>2018-05-16 13:52:12 +0100
commit78892282cc73ffaf5ca5ba0986c78e0ea9e271e5 (patch)
tree755040ffba210dff68b0d16a9e09e054646bd26c /config.mk.dist
parent1b94597807caf216b050fcbd7e212a3dc23ab852 (diff)
downloadarm-optimized-routines-78892282cc73ffaf5ca5ba0986c78e0ea9e271e5.tar.gz
Add GNU make based build system
Add a single makefile such that it will rarely need modifications with regular source code changes. The usual configure step for build environment detection is done manually by editing config.mk, it is expected to be simple make variable changes (mostly CFLAGS), later a simple configure script can be added to generate config.mk if necessary. Update the README.
Diffstat (limited to 'config.mk.dist')
-rw-r--r--config.mk.dist40
1 files changed, 40 insertions, 0 deletions
diff --git a/config.mk.dist b/config.mk.dist
new file mode 100644
index 0000000..4ecf53d
--- /dev/null
+++ b/config.mk.dist
@@ -0,0 +1,40 @@
+# Example config.mk
+#
+# Copyright (c) 2018, Arm Limited.
+# SPDX-License-Identifier: Apache-2.0
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+HOST_CC = gcc
+CC = $(CROSS_COMPILE)gcc
+CFLAGS = -std=c99 -pipe -O3
+CFLAGS += -Wall -Wno-missing-braces -Wno-strict-aliasing -Wno-unused-function
+
+# Use if the target FPU only supports single precision.
+#CFLAGS += WANT_SINGLEPREC
+
+# Use with gcc.
+CFLAGS += -frounding-math -fexcess-precision=standard -fno-stack-protector
+CFLAGS += -ffp-contract=fast
+CFLAGS += -Wno-maybe-uninitialized
+
+# Use with clang.
+#CFLAGS += -DCLANG_EXCEPTIONS
+#CFLAGS += -ffp-contract=fast
+
+# Use for cross compilation with gcc.
+#CROSS_COMPILE = aarch64-none-linux-gnu-
+
+# Use with cross testing.
+#EMULATOR = qemu-aarch64-static
+#EMULATOR = sh -c 'scp $$1 user@host:/dir && ssh user@host /dir/"$$@"' --