diff -r ccd52fece6ff -r 0757c2976f96 sbsv2/raptor/lib/flm/tools2exe.flm --- a/sbsv2/raptor/lib/flm/tools2exe.flm Mon Nov 29 15:29:25 2010 +0800 +++ b/sbsv2/raptor/lib/flm/tools2exe.flm Mon Nov 29 15:37:06 2010 +0800 @@ -44,14 +44,19 @@ include $(FLMHOME)/tools2common.flm ## Static libraries +STATICLIBS:= ifneq ($(STATICLIBRARY),) STATICLIBS:=$(patsubst %,$(RELEASEPATH)/lib%.a,$(STATICLIBRARY)) -LLIBS:=$(OPT.L)"$(RELEASEPATH)" $(patsubst %,$(OPT.l)%,$(STATICLIBRARY)) -# +endif + +ifneq ($(STLPORTLIBRARY),) +STATICLIBS:=$(STATICLIBS) $(STLPORTBINDIR)/lib$(STLPORTLIBRARY).a +endif + +# System dynamic libraries (e.g. pthreads) +LLIBS:= ifneq ($(SYSTEMLIBS),) -LLIBS:=$(LLIBS) $(patsubst %,$(OPT.l)%,$(SYSTEMLIBS)) -endif -# +LLIBS:=$(patsubst %,$(OPT.l)%,$(SYSTEMLIBS)) endif ## Link executable @@ -59,7 +64,7 @@ define tools2linkexe $(EXETARGET): $(OBJECTFILES) $(STATICLIBS) $(call startrule,tools2linkexe) \ - $(LINKER) $(CFLAGS) $(LFLAGS) $(OPT.O)"$(EXETARGET)" $(call dblquote,$(OBJECTFILES)) $(LLIBS) $(LINKER_OPTIONS) \ + $(LINKER) $(CFLAGS) $(LFLAGS) $(OPT.O)"$(EXETARGET)" $(call dblquote,$(OBJECTFILES)) $(STATICLIBS) $(LLIBS) $(LINKER_OPTIONS) \ $(if $(SAVESPACE),; $(GNURM) -rf $(OUTPUTPATH); true,) \ $(call endrule,tools2linkexe)