这是从1996年开始的旧的GSM标准的制作文件。我需要使它在我的MacBook上运行OSX 10.11.6或者在Windows 7的大学计算机上工作。窗口没有安装nmake,问题似乎是一个解决scheme。
有没有办法使用makefile?
另外,在我的Mac上,将CDIR和UTILSDIR更改为完整path是不够的。
make -f makefile.mak
仍然返回
TCC -A -I/Users/Henrik/Desktop/GSMHR2/DISK/c -Fc -ml -c /Users/Henrik/Desktop/GSMHR2/DISK/c/gsm_hr.c make: TCC: No such file or directory make: *** [gsm_hr.obj] Error 1
我认为TCDIR会出现类似的问题这是完整的makefile.mak内容:
# # makefile for GSM Half-Rate Speech Codec # Version 5.0.0 # November 8, 1996 # .SUFFIXES: .out .obj .c .e .r .f .y .l .s .p .os CC=TCC CDIR=..\c UTILSDIR=..\utils TCDIR=c:/turboc/lib CAlsoDef=-A -I$(CDIR) -Fc -ml CDefault=$(CAlsoDef) CDefaultExec=$(CAlsoDef) # installation install: gsm_hr reid swapbin tosnwild topcwild # EXACT files globdefs.obj: $(CDIR)/globdefs.c $(CC) $(CDefault) -c $? mathdp31.obj: $(CDIR)/mathdp31.c $(CC) $(CDefault) -c $? mathhalf.obj: $(CDIR)/mathhalf.c $(CC) $(CDefault) -c $? # # speech coder: analysis and synthesis # object files # dtx.obj: $(CDIR)/dtx.c $(CC) $(CDefault) -c $? err_conc.obj: $(CDIR)/err_conc.c $(CC) $(CDefault) -c $? homing.obj: $(CDIR)/homing.c $(CC) $(CDefault) -c $? sp_dec.obj: $(CDIR)/sp_dec.c $(CC) $(CDefault) -c $? sp_enc.obj: $(CDIR)/sp_enc.c $(CC) $(CDefault) -c $? sp_rom.obj: $(CDIR)/sp_rom.c $(CC) $(CDefault) -c $? sp_sfrm.obj: $(CDIR)/sp_sfrm.c $(CC) $(CDefault) -c $? sp_frm.obj: $(CDIR)/sp_frm.c $(CC) $(CDefault) -c $? vad.obj: $(CDIR)/vad.c $(CC) $(CDefault) -c $? # Host files host.obj: $(CDIR)/host.c $(CC) $(CDefault) -c $? # main program gsm_hr.obj: $(CDIR)/gsm_hr.c $(CC) $(CDefault) -c $? # utility programs reid.obj: $(UTILSDIR)/reid.c $(CC) $(CDefault) -c $? swapbin.obj: $(UTILSDIR)/swapbin.c $(CC) $(CDefault) -c $? topcwild.obj: $(UTILSDIR)/topcwild.c $(CC) $(CDefault) -c $? tosnwild.obj: $(UTILSDIR)/tosnwild.c $(CC) $(CDefault) -c $? # *********************** symbols ****************************************** EXACT3 = globdefs.obj mathdp31.obj mathhalf.obj SPEECH = sp_dec.obj sp_enc.obj sp_frm.obj sp_rom.obj sp_sfrm.obj GSM_HR = $(EXACT3) $(SPEECH) dtx.obj err_conc.obj host.obj homing.obj vad.obj #*********************** executables ************************************** # main program gsm_hr: gsm_hr.obj $(GSM_HR) $(CC) $(CDefaultExec) -egsm_hr.exe @gsm_hr.rsp # utility programs reid: reid.obj $(CC) $(CDefaultExec) -ereid.exe reid.obj swapbin: swapbin.obj $(CC) $(CDefaultExec) -eswapbin.exe swapbin.obj tosnwild: tosnwild.obj $(CC) $(CDefaultExec) -etosnwild.exe tosnwild.obj topcwild: topcwild.obj $(CC) $(CDefaultExec) -etopcwild.exe topcwild.obj
完整的文件可以在这里findhttps://portal.3gpp.org/desktopmodules/Specifications/SpecificationDetails.aspx?specificationId=281
删除CC=TCC
。 这是一个古老的DOS C编译器(Turbo C)的参考。
用正斜杠替换CDIR
和UTILSDIR
反斜杠。 路径中的反斜杠是一个MS-DOS主题。
将CAlsoDef=-A -I$(CDIR) -Fc -ml
替换为CAlsoDef=-I$(CDIR)
。 其他选项是特定于TCC。
希望源代码不需要太多的改变。 祝你好运。