sbsv2/raptor/lib/flm/tools2exe.flm
changeset 713 7b7f0409fc00
parent 674 37ee82a83d43
--- a/sbsv2/raptor/lib/flm/tools2exe.flm	Tue Nov 30 13:59:58 2010 +0800
+++ b/sbsv2/raptor/lib/flm/tools2exe.flm	Tue Nov 30 14:05:41 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)