Norwegian Nynorsk translation update
[supertux.git] / mk / jam / win32.jam
index f3e8dbd..a51400a 100644 (file)
@@ -22,9 +22,7 @@ rule CompileResources
 rule Win32Resource
 {
     local target = $($(<)_TARGET) ;
-    local rcobject = [ DoObjectGrist _resource.o ] ;
-    LOCATE on $(rcobject) = $(LOCATE_TARGET) ;
-    SEARCH on $(rcobject) = $(LOCATE_TARGET) ;
+    local rcobject = [ LocateTarget _resource.o ] ;
     
     # only add 1 resource object per target
     if ! $($(<)_HASWIN32RESOURCE)
@@ -60,7 +58,21 @@ 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) ;
   Clean $(<)clean : $(target) ;
@@ -68,6 +80,22 @@ rule SystemLinkApplication
 
 actions LinkApplication bind NEEDLIBS bind EXTRAOBJECTS
 {
-  $(LINK) -o $(<) $(>) $(EXTRAOBJECTS) $(NEEDLIBS) $(LFLAGS)
+  $(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)
 }