402N/A ########################################################################
402N/A+ XMEMALIGN := -xmemalign=8i
402N/A+ XREGS := -xregs=no%frameptr
402N/A CXXFLAGS += $(WARNFLAGS)
402N/A CCNAME = $(CXX)-$(CCVER)
402N/A # can't use LDOPTS when working with HP aCC, it's used by the linker
402N/A # $(2): executable file name
402N/A # $(3): additional linker flags (optional)
402N/A- command="$(LD) $(1) $(LDFLAGS) $(3) -o $(2)"; \
402N/A+ command="$(CXX) $(CXXFLAGS) $(1) $(LDFLAGS) $(LDOPTS) $(3) -o $(2)"; \
402N/A echo "$$command" >>$(LOGFILE); \
402N/A- $(LD) $(1) $(LDFLAGS) $(3) -o $(2) >>$(LOGFILE) 2>&1
402N/A+ $(CXX) $(CXXFLAGS) $(1) $(LDFLAGS) $(LDOPTS) $(3) -o $(2) >>$(LOGFILE) 2>&1
402N/A # helper function to compile and link a file and log results
402N/A # $(5): additional linker flags (optional)
402N/A define compile_then_link
402N/A command="$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(4) -c $(1) -o $(2)" \
402N/A- "&& $(LD) $(2) $(LDFLAGS) $(5) -o $(3)"; \
402N/A+ "&& $(CXX) $(CXXFLAGS) $(2) $(LDFLAGS) $(LDOPTS) $(5) -o $(3)"; \
402N/A echo "$$command" >>$(LOGFILE); \
402N/A $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(4) -c $(1) -o $(2) >>$(LOGFILE) 2>&1 \
402N/A- && $(LD) $(2) $(LDFLAGS) $(5) -o $(3) >>$(LOGFILE) 2>&1
402N/A+ && $(CXX) $(CXXFLAGS) $(2) $(LDFLAGS) $(LDOPTS) $(5) -o $(3) >>$(LOGFILE) 2>&1
402N/A # helper function to prelink a file and log results
402N/A if [ $$? -eq 0 ] ; then \
402N/A opts=`sed -n "s/^[^A-Z_a-z0-9]*LDOPTS *= *\(.*\)/\1/p" \
402N/A- targets="$$
file.o $$file run RUN=$$file $(LOPT)=$$opts"; \
402N/A+ targets="$$
file.o $$file run RUN=$$file LDOPTS=$$opts $(LOPT)=$$opts"; \
402N/A elif [ `echo $$file | grep "\.lib"` ] ; then \
402N/A targets="$$file$(LIBSUFFIX)" ; \
402N/A elif [ `echo $$file | grep "\.sh"` ] ; then \