Created
February 19, 2015 19:05
-
-
Save newmen/697850bb8aae383bf6cc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/engine/Makefile b/engine/Makefile | |
index 94a1b87..6c3477d 100644 | |
--- a/engine/Makefile | |
+++ b/engine/Makefile | |
@@ -1,11 +1,14 @@ | |
NAME := libengine | |
ARKSFLAGS := -DNDEBUG | |
-STANDART := -std=c++11 | |
GCC_PATH := /usr | |
CXX := $(GCC_PATH)/bin/g++ | |
-CFLAGS := $(STANDART) $(ARKSFLAGS) -O2 | |
+STANDART := -std=c++11 $(ARKSFLAGS) | |
+ | |
+ICC_PATH := /opt/intel/composerxe | |
+ICPC := $(ICC_PATH)/bin/icpc | |
+ICPCFLAGS := $(STANDART) -openmp -O2 -falign-functions=16 -ansi-alias -fstrict-aliasing -w1 -Wcheck -wd654,1572,411,873,1125,2259 | |
SRC_DIR := cpp | |
OBJS_DIR := obj | |
@@ -29,7 +32,7 @@ $(OBJS_DIR)/%.d: $(SRC_DIR)/%.cpp | |
$(CXX) -c $(STANDART) -MM -MF $@ $< | |
$(OBJS_DIR)/%.o: $(SRC_DIR)/%.cpp | |
- $(CXX) -c $(CFLAGS) -o $@ $< | |
+ $(ICPC) -c $(ICPCFLAGS) -o $@ $< | |
clean: | |
rm -rf $(OBJS_DIR) | |
diff --git a/engine/hand-generations/Makefile b/engine/hand-generations/Makefile | |
index f3d0547..0800ee5 100644 | |
--- a/engine/hand-generations/Makefile | |
+++ b/engine/hand-generations/Makefile | |
@@ -7,13 +7,16 @@ ENGINE_OBJECT_DIRS := $(shell find $(ENGINE_OBJS_DIR) -type d) | |
ENGINE_OBJECTS := $(wildcard $(addsuffix /*.o, $(ENGINE_OBJECT_DIRS))) | |
ARKSFLAGS := -DNDEBUG | |
-STANDART := -std=c++11 | |
+ARKSWINC := $(ARKSFLAGS) -I$(ENGINE_SRC_DIR) | |
GCC_PATH := /usr | |
CXX := $(GCC_PATH)/bin/g++ | |
-DFLAGS := $(STANDART) -I$(ENGINE_SRC_DIR) | |
-CFLAGS := $(DFLAGS) -O2 | |
-LFLAGS := $(STANDART) -lyaml-cpp | |
+STANDART := -std=c++11 $(ARKSWINC) | |
+ | |
+ICC_PATH := /opt/intel/composerxe | |
+ICPC := $(ICC_PATH)/bin/icpc | |
+ICPCFLAGS := $(STANDART) -openmp -O2 -falign-functions=16 -ansi-alias -fstrict-aliasing -w1 -Wcheck -wd654,1572,411,873,1125,2259 | |
+LINKFLAGS := -std=c++11 -L$(ICC_PATH)/lib/intel64 -liomp5 -openmp -lyaml-cpp | |
HGEN_SRC_DIR := src | |
HGEN_OBJS_DIR := obj | |
@@ -31,16 +34,16 @@ all: exec | |
$(NAME): dirs $(MD_FILES) $(SOURCE_OBJECTS) | |
exec: $(NAME) | |
- $(CXX) $(LFLAGS) $(ENGINE_OBJECTS) $(SOURCE_OBJECTS) -o $^ | |
+ $(ICPC) $(LINKFLAGS) $(ENGINE_OBJECTS) $(SOURCE_OBJECTS) -o $^ | |
dirs: | |
mkdir -p $(OBJECTS_DIRS) | |
$(HGEN_OBJS_DIR)/%.d: $(HGEN_SRC_DIR)/%.cpp | |
- $(CXX) -c $(DFLAGS) -M -MF $@ $< | |
+ $(CXX) -c $(STANDART) -M -MF $@ $< | |
$(HGEN_OBJS_DIR)/%.o: $(HGEN_SRC_DIR)/%.cpp | |
- $(CXX) -c $(CFLAGS) -o $@ $< | |
+ $(ICPC) -c $(ICPCFLAGS) -o $@ $< | |
clean: | |
rm -rf $(HGEN_OBJS_DIR) | |
diff --git a/engine/tests/spec.rb b/engine/tests/spec.rb | |
index 616a47a..1d29c67 100644 | |
--- a/engine/tests/spec.rb | |
+++ b/engine/tests/spec.rb | |
@@ -9,9 +9,12 @@ HANDG_DIR = '../hand-generations' | |
HANDG_SRC_DIR = "#{HANDG_DIR}/src" | |
HANDG_OBJS_DIR = "#{HANDG_DIR}/obj" | |
-GCC_PATH = '/usr' | |
-CXX = "#{GCC_PATH}/bin/g++" | |
-FLAGS = "-I#{ENGINE_SRC_DIR} -I#{HANDG_SRC_DIR} -std=c++11 -O2 -openmp -lyaml-cpp" | |
+ICC_PATH = '/opt/intel/composerxe' | |
+ICPC = "#{ICC_PATH}/bin/icpc" | |
+ICPCFLAGS = "-falign-functions=16 -ansi-alias -fstrict-aliasing -w1 -Wcheck -wd654,1572,411,873,1125,2259 -L#{ICC_PATH}/lib/intel64 -liomp5" | |
+ | |
+ARKSWINC = "-I#{ENGINE_SRC_DIR} -I#{HANDG_SRC_DIR}" | |
+FLAGS = "#{ICPCFLAGS} #{ARKSWINC} -std=c++11 -O2 -openmp -lyaml-cpp" | |
# Provides string by which compilation will do | |
# @return [String] the compilation string | |
@@ -22,7 +25,7 @@ def compile_line(file_in, file_out, additional_args = '') | |
objs.reject! { |path| path =~ /main\.o$/ } | |
objs_str = objs.join(' ') | |
- "#{CXX} #{FLAGS} #{additional_args} #{objs_str} -o #{file_out} #{file_in}" | |
+ "#{ICPC} #{FLAGS} #{additional_args} #{objs_str} -o #{file_out} #{file_in}" | |
end | |
# Makes random sequence of chars |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment