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