2017-07-16 16 views
0

我正在嘗試使用GNU-make從Chris Crawford的源代碼Balance of Power 1990運行makefile。坦率地說,我沒有使用makefile的經驗,也不知道我在做什麼。在生成文件看起來是這樣的:試圖修復80年代源代碼的Makefile

GlobDebug=FALSE 
"{BOPO}"BOPSRace1 ト "{BOPO}"BOP2.code "{BOPS}"NewResrc.r 
    rez "{BOPS}"NewResrc.r -o "DataFrame:BOP2_ト:BOP2" 

"{BOPO}"BOP2.code ト "{BOPO}"Globals.p.o カ 
        "{BOPO}"AsmCode.a.o カ 
        "{BOPO}"Init.p.o カ 
        "{BOPO}"Titles.p.o カ 
        "{BOPO}"Background.p.o カ 
        "{BOPO}"StdRoutines.p.o カ 
        "{BOPO}"History.p.o カ 
        "{BOPO}"PlanMove.p.o カ 
        "{BOPO}"CrisisU.p.o カ 
        "{BOPO}"Main.p.o 
    link "{Libraries}"Interface.o カ 
     "{Libraries}"Runtime.o カ 
     "{PLibraries}"Paslib.o カ 
     "{BOPO}"Globals.p.o カ 
     "{BOPO}"AsmCode.a.o カ 
     "{BOPO}"Init.p.o カ 
     "{BOPO}"Titles.p.o カ 
     "{BOPO}"Background.p.o カ 
     "{BOPO}"StdRoutines.p.o カ 
     "{BOPO}"History.p.o カ 
     "{BOPO}"PlanMove.p.o カ 
     "{BOPO}"CrisisU.p.o カ 
     "{BOPO}"Main.p.o カ 
     -o "{BOPO}"BOP2.code 

"{BOPO}"AsmCode.a.o ト "{BOPS}"AsmCode.a  
    Asm -o "{BOPO}" "{BOPS}"AsmCode.a  

"{BOPO}"Globals.p.o ト "{BOPS}"Globals.p  
    Pascal -d DebugFlg={GlobDebug} -o "{BOPO}" "{BOPS}"Globals.p 

"{BOPO}"Init.p.o ト "{BOPS}"Init.p "{BOPS}"Globals.p   
    Pascal -d DebugFlg={GlobDebug} -o "{BOPO}" "{BOPS}"Init.p 

"{BOPO}"Titles.p.o ト "{BOPS}"Titles.p "{BOPS}"Globals.p   
    Pascal -d DebugFlg={GlobDebug} -o "{BOPO}" "{BOPS}"Titles.p 

"{BOPO}"Background.p.o ト "{BOPS}"Background.p "{BOPS}"Globals.p   
    Pascal -d DebugFlg={GlobDebug} -o "{BOPO}" "{BOPS}"Background.p 

"{BOPO}"StdRoutines.p.o ト "{BOPS}"StdRoutines.p "{BOPS}"Globals.p    
    Pascal -d DebugFlg={GlobDebug} -o "{BOPO}" "{BOPS}"StdRoutines.p 

"{BOPO}"History.p.o ト "{BOPS}"History.p "{BOPS}"Globals.p    
    Pascal -d DebugFlg={GlobDebug} -o "{BOPO}" "{BOPS}"History.p 

"{BOPO}"PlanMove.p.o ト "{BOPS}"PlanMove.p "{BOPS}"Globals.p   
    Pascal -d DebugFlg={GlobDebug} -o "{BOPO}" "{BOPS}"PlanMove.p 

"{BOPO}"CrisisU.p.o ト "{BOPS}"CrisisU.p "{BOPS}"Globals.p    
    Pascal -d DebugFlg={GlobDebug} -o "{BOPO}" "{BOPS}"CrisisU.p 

"{BOPO}"Main.p.o ト "{BOPS}"Main.p "{BOPS}"Globals.p 
    Pascal -d DebugFlg={GlobDebug} -o "{BOPO}" "{BOPS}"Main.p 

即使作爲一個總的makefile,小白我可以告訴大家,有一些嚴重的編碼錯誤(トカ和,這表明了作爲元音-A和¶在記事本++)。

我試過

我一直得到「未指定目標」的錯誤,讓我感動,從頂部的「GlobDebug =假」。

然後我得到了「目標模式不包含%」的錯誤。

我認爲(ト)應該是(:),並且在替換它們之後,它產生了「多個目標模式」錯誤。

在這一點上我很無能。

問題

應當如何進行這些(ト)和(カ)能解決嗎?這個makefile還有其他明顯的問題嗎?

在此先感謝。

回答

0

:\該行的最後一個字符。然後,你將不得不檢查食譜的第一個字符是製表符,而不是空格。實施例:

"{BOPO}"BOPSRace1 : "{BOPO}"BOP2.code "{BOPS}"NewResrc.r 
    rez "{BOPS}"NewResrc.r -o "DataFrame:BOP2_ト:BOP2" 

配方是第二行,它必須開始與標籤。

+0

謝謝您的建議。但是,我仍然在第一行「{BOPO}」BOPSRace1:「{BOPO}」BOP2.code「{BOPS}」上收到「多個目標模式」錯誤NewResrc.r –

+0

@PopaPett:什麼是確切的錯誤信息?你知道變量BOPO包含什麼嗎? – Beta

+0

錯誤消息是「Makefile:1:***多個目標模式,停止。」 (這是在把GlobalDebug的東西放下之後。)我真的不知道BOPO和BOPS是什麼,也不知道它應該如何工作。順便說一句,源代碼是[這裏]的第一個文件(http://www.erasmatazz.com/library/source-code/index.html) –