+clean:
+ $(RM) *.o .depend *~ $(EXE)
+
+
+### Possible targets. You may add your own ones here
+gcc:
+ $(MAKE) \
+ CXX='g++' \
+ CXXFLAGS="$(GCCFLAGS)" \
+ all
+
+icc:
+ $(MAKE) \
+ CXX='icpc' \
+ CXXFLAGS="$(ICCFLAGS)" \
+ all
+
+icc-profile-make:
+ $(MAKE) \
+ CXX='icpc' \
+ CXXFLAGS="$(ICCFLAGS)" \
+ CXXFLAGS+='-prof-gen=srcpos -prof_dir ./profdir' \
+ all
+
+icc-profile-use:
+ $(MAKE) \
+ CXX='icpc' \
+ CXXFLAGS="$(ICCFLAGS)" \
+ CXXFLAGS+='-prof_use -prof_dir ./profdir' \
+ all
+
+icc-profile:
+ @rm -rf profdir
+ @mkdir profdir
+ @touch *.cpp *.h
+ $(MAKE) icc-profile-make
+ @echo ""
+ @echo "Running benchmark for pgo-build ..."
+ @$(PGOBENCH) > /dev/null
+ @echo "Benchmark finished. Build final executable now ..."
+ @echo ""
+ @touch *.cpp *.h
+ $(MAKE) icc-profile-use
+ @rm -rf profdir bench.txt
+
+icc-profile-make-with-popcnt:
+ $(MAKE) \
+ CXX='icpc' \
+ CXXFLAGS="$(ICCFLAGS) -DUSE_POPCNT" \
+ CXXFLAGS+='-prof-gen=srcpos -prof_dir ./profdir' \
+ all
+
+icc-profile-use-with-popcnt:
+ $(MAKE) \
+ CXX='icpc' \
+ CXXFLAGS="$(ICCFLAGS) -DUSE_POPCNT" \
+ CXXFLAGS+='-prof_use -prof_dir ./profdir' \
+ all
+
+icc-profile-popcnt:
+ @rm -rf profdir
+ @mkdir profdir
+ @touch *.cpp *.h
+ $(MAKE) icc-profile-make
+ @echo ""
+ @echo "Running benchmark for pgo-build (popcnt disabled)..."
+ @$(PGOBENCH) > /dev/null
+ @touch *.cpp *.h
+ $(MAKE) icc-profile-make-with-popcnt
+ @echo ""
+ @echo "Running benchmark for pgo-build (popcnt enabled)..."
+ @$(PGOBENCH) > /dev/null
+ @echo "Benchmarks finished. Build final executable now ..."
+ @echo ""
+ @touch *.cpp *.h
+ $(MAKE) icc-profile-use-with-popcnt
+ @rm -rf profdir bench.txt
+
+
+osx-ppc32:
+ $(MAKE) \
+ CXX='g++' \
+ CXXFLAGS="$(GCCFLAGS)" \
+ CXXFLAGS+='-arch ppc' \
+ LDFLAGS+='-arch ppc' \
+ all
+
+osx-ppc64:
+ $(MAKE) \
+ CXX='g++' \
+ CXXFLAGS="$(GCCFLAGS)" \
+ CXXFLAGS+='-arch ppc64' \
+ LDFLAGS+='-arch ppc64' \
+ all
+
+osx-x86:
+ $(MAKE) \
+ CXX='g++' \
+ CXXFLAGS="$(GCCFLAGS)" \
+ CXXFLAGS+='-arch i386' \
+ LDFLAGS+='-arch i386' \
+ all
+
+osx-x86_64:
+ $(MAKE) \
+ CXX='g++' \
+ CXXFLAGS="$(GCCFLAGS)" \
+ CXXFLAGS+='-arch x86_64' \
+ LDFLAGS+='-arch x86_64' \
+ all
+
+osx-icc32:
+ $(MAKE) \
+ CXX='icpc' \
+ CXXFLAGS="$(ICCFLAGS-OSX)" \
+ CXXFLAGS+='-arch i386' \
+ LDFLAGS+='-arch i386' \
+ all
+
+osx-icc64:
+ $(MAKE) \
+ CXX='icpc' \
+ CXXFLAGS="$(ICCFLAGS-OSX)" \
+ CXXFLAGS+='-arch x86_64' \
+ LDFLAGS+='-arch x86_64' \
+ all
+
+osx-icc32-profile-make:
+ $(MAKE) \
+ CXX='icpc' \
+ CXXFLAGS="$(ICCFLAGS-OSX)" \
+ CXXFLAGS+='-arch i386' \
+ CXXFLAGS+='-prof_gen -prof_dir ./profdir' \
+ LDFLAGS+='-arch i386' \
+ all
+
+osx-icc32-profile-use:
+ $(MAKE) \
+ CXX='icpc' \
+ CXXFLAGS="$(ICCFLAGS-OSX)" \
+ CXXFLAGS+='-arch i386' \
+ CXXFLAGS+='-prof_use -prof_dir ./profdir' \
+ LDFLAGS+='-arch i386' \
+ all
+
+osx-icc32-profile:
+ @rm -rf profdir
+ @mkdir profdir
+ @touch *.cpp *.h
+ $(MAKE) osx-icc32-profile-make
+ @echo ""
+ @echo "Running benchmark for pgo-build ..."
+ @$(PGOBENCH) > /dev/null
+ @echo "Benchmark finished. Build final executable now ..."
+ @echo ""
+ @touch *.cpp *.h
+ $(MAKE) osx-icc32-profile-use
+ @rm -rf profdir bench.txt
+
+osx-icc64-profile-make:
+ $(MAKE) \
+ CXX='icpc' \
+ CXXFLAGS="$(ICCFLAGS-OSX)" \
+ CXXFLAGS+='-arch x86_64' \
+ CXXFLAGS+='-prof_gen -prof_dir ./profdir' \
+ LDFLAGS+='-arch x86_64' \
+ all
+
+osx-icc64-profile-use:
+ $(MAKE) \
+ CXX='icpc' \
+ CXXFLAGS="$(ICCFLAGS-OSX)" \
+ CXXFLAGS+='-arch x86_64' \
+ CXXFLAGS+='-prof_use -prof_dir ./profdir' \
+ LDFLAGS+='-arch x86_64' \
+ all
+
+osx-icc64-profile:
+ @rm -rf profdir
+ @mkdir profdir
+ @touch *.cpp *.h
+ $(MAKE) osx-icc64-profile-make
+ @echo ""
+ @echo "Running benchmark for pgo-build ..."
+ @$(PGOBENCH) > /dev/null
+ @echo "Benchmark finished. Build final executable now ..."
+ @echo ""
+ @touch *.cpp *.h
+ $(MAKE) osx-icc64-profile-use
+ @rm -rf profdir bench.txt
+
+
+
+strip:
+ strip $(EXE)
+
+
+### Compilation. Do not change
+$(EXE): $(OBJS)
+ $(CXX) $(LDFLAGS) -o $@ $(OBJS)