# (C) Copyright David Abrahams 2001. Permission to copy, use # modify, sell and distribute this software is granted provided this # copyright notice appears in all copies. This software is provided # "as is" without express or implied warranty, and with no claim as # to its suitability for any purpose. # Adapted from gcc-tools.jam by Joerg Walter # Intel root directory set? if ! $(IA32ROOT) { # Compiler version INTEL_LINUX_VERSION ?= "50" ; } # Root directory INTEL_LINUX_ROOT = "/opt/intel/compiler"$(INTEL_LINUX_VERSION) ; # Setup script INTEL_LINUX_SETUP = ". "$(INTEL_LINUX_ROOT)"/ia32/bin/iccvars.sh" ; # Additional DLL directory INTEL_LINUX_RUN_LD_LIBRARY_PATH = $(INTEL_LINUX_ROOT)"/ia32/lib" ; #### compiler and linker switches #### # debugging flags intel-linux CFLAGS on : -g ; flags intel-linux LINKFLAGS on : -g ; # optimizations flags intel-linux CFLAGS off : -O0 ; flags intel-linux CFLAGS space : -O2 ; flags intel-linux CFLAGS speed : -O3 ; # inlining # results using -ip are worse than without? # flags intel-linux CFLAGS full : -ip ; # threading flags intel-linux CFLAGS multi : -openmp ; flags intel-linux LINKFLAGS multi : -openmp ; # profiling flags intel-linux CFLAGS on : -p ; flags intel-linux LINKFLAGS on : -p ; # position independent code flags intel-linux CFLAGS true : -KPIC ; flags intel-linux LINKFLAGS true : -KPIC ; # dynamic link library flags intel-linux LINKFLAGS $(SHARED_TYPES) : -shared ; # library linking flags intel-linux LINKFLAGS static : -static ; #### standard settings #### flags intel-linux UNDEFS ; flags intel-linux DEFINES ; flags intel-linux CFLAGS ; flags intel-linux C++FLAGS ; flags intel-linux HDRS ; flags intel-linux LIBPATH ; flags intel-linux NEEDLIBS ; flags intel-linux FINDLIBS ; #### Cc #### rule Cc-action { intel-linux-Cc-action $(<) : $(>) ; } actions intel-linux-Cc-action { $(INTEL_LINUX_SETUP) icc -c -w1 -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -o "$(<)" "$(>)" } #### C++ #### rule C++-action { intel-linux-C++-action $(<) : $(>) ; } actions intel-linux-C++-action { $(INTEL_LINUX_SETUP) icc -c -w1 -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) $(C++FLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -o "$(<)" "$(>)" } #### Archive #### rule Archive-action { intel-linux-Archive-action $(<) : $(>) ; } actions updated together piecemeal intel-linux-Archive-action { ar ru "$(<)" "$(>)" } #### Link #### rule Link-action { gRUN_LD_LIBRARY_PATH($(<)) += $(INTEL_LINUX_RUN_LD_LIBRARY_PATH) ; intel-linux-Link-action $(<) : $(>) ; } # for icc, we repeat all libraries so that dependencies are always resolved actions intel-linux-Link-action bind NEEDLIBS { $(INTEL_LINUX_SETUP) icc $(LINKFLAGS) -o "$(<[1])" -L$(LIBPATH) -L$(STDLIBPATH) "$(>)" -l$(FINDLIBS) "$(NEEDLIBS)" "$(NEEDLIBS)" }