don't install miniswig
[supertux.git] / mk / jam / unix.jam
index 6a28423..6b4df54 100644 (file)
@@ -33,7 +33,20 @@ rule SystemLinkApplication
     local target = $($(<)_TARGET) ;
   
     Depends $(target) : $(>) ;
-    LinkApplication $(target) : $(>) ;
+
+    if [ IsElem linkerfile : $(3) ]
+    {
+        RemoveLinkerInputFile $(target) ;
+        local i ;
+        for i in $(>) { AppendLinkerInputFile $(target) : $(i) ; }
+        LinkApplicationFromFile $(target) : $(target) ;
+        RemoveLinkerInputFile $(target) ;
+    }
+    else
+    {
+        LinkApplication $(target) : $(>) ;
+    }
+
     LIBS on $(target) = $(LIBS) ;
     # setup clean rules
     Clean clean : $(target) ;
@@ -45,4 +58,19 @@ actions LinkApplication bind NEEDLIBS bind EXTRAOBJECTS
     $(LINK) -o $(<) $(>) $(EXTRAOBJECTS) $(NEEDLIBS) $(LIBS)
 }
 
+actions quietly RemoveLinkerInputFile
+{
+    $(RM) $(<).opt
+}
+
+actions quietly together piecemeal AppendLinkerInputFile
+{
+    echo $(>) >> $(<).opt
+}
+
+actions LinkApplicationFromFile bind NEEDLIBS bind EXTRAOBJECTS
+{
+    $(LINK) -o $(<) `cat $(>).opt` $(EXTRAOBJECTS) $(NEEDLIBS) $(LIBS)
+#    $(LINK) -o $(<) -Xlinker @$(>).opt $(EXTRAOBJECTS) $(NEEDLIBS) $(LIBS)
+}