From 4dba86c9f047b13fb7fb756226a76456174d2f94 Mon Sep 17 00:00:00 2001 From: Fabien Freling Date: Sun, 27 Jul 2014 18:01:41 +0200 Subject: [PATCH] Add configure script. - Deactivate LTO. - Deactivate SIMD. --- .gitignore | 2 ++ Makefile | 9 +++++---- configure | 15 +++++++++++++++ 3 files changed, 22 insertions(+), 4 deletions(-) create mode 100755 configure diff --git a/.gitignore b/.gitignore index dd09683..f5c368e 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,5 @@ rotated*.ppm rotated*.pnm *.png + +Makefile.rules diff --git a/Makefile b/Makefile index 3e0841d..686ad81 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,8 @@ -CXX = clang++ -CXXFLAGS = -std=c++11 -W -Wall -O3 -ffast-math -g -Werror -LFLAGS = -flto -DEFINES = -DSIMD +include Makefile.rules + +CXXFLAGS = -std=c++11 -W -Wall -O3 -ffast-math -g $(CXXFLAGS_PLAFORM) +LFLAGS = #-flto +DEFINES = #-DSIMD BUILD_DIR = /tmp SRC = rotation.cpp \ image.cpp \ diff --git a/configure b/configure new file mode 100755 index 0000000..0b702c7 --- /dev/null +++ b/configure @@ -0,0 +1,15 @@ +#!/bin/sh + +case `uname -s` in + + Darwin) + echo 'CXX = clang++' > Makefile.rules + echo 'CXXFLAGS_PLATFORM = ' > Makefile.rules + ;; + + Linux) + echo 'CXX = g++' > Makefile.rules + echo 'CXXFLAGS_PLATFORM = ' > Makefile.rules + ;; + +esac