فهرست منبع

Fixed dll generation. Fixes #5.

woollybah 7 سال پیش
والد
کامیت
0e76a5a4ae
3فایلهای تغییر یافته به همراه20 افزوده شده و 11 حذف شده
  1. 4 4
      bmk.bmx
  2. 1 1
      bmk_make.bmx
  3. 15 6
      bmk_util.bmx

+ 4 - 4
bmk.bmx

@@ -157,7 +157,7 @@ Function MakeModules( args$[] )
 	Local buildManager:TBuildManager = New TBuildManager
 
 	buildManager.MakeMods(mods, opt_all)
-	buildManager.DoBuild()
+	buildManager.DoBuild(False)
 	
 End Function
 
@@ -382,9 +382,9 @@ Function MakeApplication( args$[],makelib:Int,compileOnly:Int = False )
 	If processor.Platform() = "android" And Not compileOnly Then
 		DeployAndroidProject()
 	End If
-
+	
 	buildManager.MakeApp(Main, makelib, compileOnly)
-	buildManager.DoBuild(Not compileOnly)
+	buildManager.DoBuild(makelib, Not compileOnly)
 
 	If opt_universal And processor.Platform() = "ios" Then
 
@@ -395,7 +395,7 @@ Function MakeApplication( args$[],makelib:Int,compileOnly:Int = False )
 
 		Local buildManager:TBuildManager = New TBuildManager
 		buildManager.MakeApp(Main, makelib, compileOnly)
-		buildManager.DoBuild(True)
+		buildManager.DoBuild(False, True)
 
 		processor.ToggleCPU()
 		LoadOptions(True)

+ 1 - 1
bmk_make.bmx

@@ -436,7 +436,7 @@ Type TBuildManager Extends TCallback
 		End If
 	End Method
 	
-	Method DoBuild(app_build:Int = False)
+	Method DoBuild(makelib:Int, app_build:Int = False)
 		Local arc_order:TList = New TList
 	
 		Local files:TList = New TList

+ 15 - 6
bmk_util.bmx

@@ -328,13 +328,22 @@ Function LinkApp( path$,lnk_files:TList,makelib,opts$ )
 		End If
 	
 		If makelib
-			Local imp$=StripExt(path)+".a"
 			Local def$=StripExt(path)+".def"
-			If FileType( def )<>FILETYPE_FILE Throw "Cannot locate .def file"
-			sb.Append(" ").Append(def)
-			sb.Append(" --out-implib ").Append(imp)
-			If usingLD Then
-				fb.Append(" ").Append(CQuote( RealPath(processor.Option("path_to_mingw_lib", processor.MinGWDLLCrtPath()) + "/dllcrt2.o" ) ))
+			Local imp$=StripExt(path)+".a"
+
+			If FileType( def )<>FILETYPE_FILE Then
+				Print "Cannot locate .def file. Exporting ALL symbols"
+			Else
+				sb.Append(" ").Append(def)
+			End If
+			
+			If version < 60000 Then
+				sb.Append(" --out-implib ").Append(imp)
+				If usingLD Then
+					fb.Append(" ").Append(CQuote( RealPath(processor.Option("path_to_mingw_lib", processor.MinGWDLLCrtPath()) + "/dllcrt2.o" ) ))
+				End If
+			Else
+				sb.Append(" -Wl,--out-implib,").Append(imp)
 			End If
 		Else
 			If usingLD