📄 makefile.cl
字号:
# -----------------------------------------------------------------------------# MS Visual C makefile for compiling and testing the G.722 implementation# The executable must be defined by variable DEMO below. # 31.Jan.2000 - Makefile implemented by <simao.campos@labs.comsat.com># -----------------------------------------------------------------------------# This makefile can test the implementation of the G.722 with# the test sequences in binary form when they are provided by# the user and are stored in directory bin under this# module. The presumed file names are:# bt1c1.xmt bt2r2.cod bt3l1.rc1 bt3l2.rc2 bt3l3.rc3 # bt1c2.xmt bt3h1.rc0 bt3l1.rc2 bt3l2.rc3 # bt1d3.cod bt3h2.rc0 bt3l1.rc3 bt3l3.rc1 # bt2r1.cod bt3h3.rc0 bt3l2.rc1 bt3l3.rc2 # These files are not provided in the UGST# distribution. This testing option can be exercised by the makefile# using the target "test-tv". ## Provided is though a speech file that must yield# identical results to the reference files provided. Please make# sure that all the binary speech files have the proper byte# ordering for your system. The ZIP file provided will contain# big endian (workstation format, high byte first) data# files. This testing option can be exercised by the makefile# using the target "test" (make test).# <simao># NOTE: you need to get (purchase) the G.722 test vectors from the ITU in # order to perform the (optional) compliance test.# -----------------------------------------------------------------------------#*************************************************************************# FRANCE TELECOM/CNET ITU-T ANSI C G.722 program to be included in # ITU-T UGST software package Tool #*************************************************************************# Version 2.00 du 07/01/90 ; Compatible C ANSI ; TURBO C V2 # Copyright CNET Lannion A TSS/CMC J-P PETIT Tel 33 96 05 39 41 # Fax 33 96 05 13 16 # Email petitjp@lannion.cnet.fr # Last revision 14/03/95 ; use ITU-T ANSI C basic fixed point operators # Software tested on PC/MS DOS and Borland C/C++ 3.1 # on DEC Alpha WS, UNIX, cc compiler #*************************************************************************# ------------------------------------------------# Choose compiler. Sun: use cc. HP: gotta use cl# ------------------------------------------------CC = clCC_OPT = -W1 -I../utl # For cc# ------------------------------------# Lists of files# ------------------------------------G722_OBJ = operg722.obj funcg722.obj g722.objREF_FILES = bin/codsp.cod bin/codspw.cod bin/inpsp.bin bin/outsp1.bin \ bin/outsp2.bin bin/outsp3.binPRC_FILES = prc/inpsp.bs prc/outsp.e-d prc/outsp.md1 prc/outsp.md2 \ prc/outsp.md3 prc/temp.cod prc/temp1.out prc/temp2.out \ prc/temp3.out# ------------------------------------------------# Choose an archiving utility: # - public domain unzip, or [PC/MS Visual C/VMS]# - shareware pkunzip [PC only]# ------------------------------------------------#UNZIP = -pkunzip -dUNZIP = unzip -o# ------------------------------------------------# Choose an AWK; suggest use GNU version # (available via anonymous ftp) # ------------------------------------------------AWK = gawkAWK_CMD = '$$6~/[0-9]+:[0-9][0-9]/ {print "sb -over",$$NF};END{print "exit"}'# ------------------------------------------------# Choose a file comparison utility: # - cf compares, # - sub shows the difference of the different samples# Default is cf.# ------------------------------------------------DIFF = cf -q#DIFF = sub#DIFF_OPT = 256 1 30# ------------------------------------# Demo executables# ------------------------------------TSTCG722=tstcg722 # exercise G.722 encoder digital test sequences TSTDG722=tstdg722 # exercise G.722 decoder digital test sequences ENCG722=encg722 # encode a 16kHz/16 bit linear speech/music file # in a 64 kbit/s G.722 data format DECG722=decg722 # decode a 64 kbit/s G.722 bitstreamDEMO=g722demo -q # run both the encoder and the decoderRM=rm -f# ------------------------------------------------# Generic rules# ------------------------------------------------.c.obj: $(CC) $(CC_OPT) -c $<# ------------------------------------# Targets # ------------------------------------all:: g722demo # tstcg722 tstdg722 encg722 decg722clean: $(RM) *.obj cleantest: $(RM) $(PRC_FILES) $(RM) $(REF_FILES)veryclean: clean cleantest $(RM) g722demo.exe tstcg722.exe tstdg722.exe encg722.exe decg722.exe # ------------------------------------# Dependencies and rules # ------------------------------------g722demo: g722demo.exeg722demo.exe: g722demo.obj $(G722_OBJ) $(CC) $(CC_OPT) -o g722demo g722demo.obj $(G722_OBJ) encg722: encg722.exeencg722.exe: encg722.obj $(G722_OBJ) $(CC) $(CC_OPT) -o encg722 encg722.obj $(G722_OBJ)decg722: decg722.exedecg722.exe: decg722.obj $(G722_OBJ) $(CC) $(CC_OPT) -o decg722 decg722.obj $(G722_OBJ)tstcg722: tstcg722.exetstcg722.exe: tstcg722.obj operg722.obj funcg722.obj $(CC) $(CC_OPT) -o tstcg722 tstcg722.obj operg722.obj funcg722.objtstdg722: tstdg722.exetstdg722.exe: tstdg722.obj operg722.obj funcg722.obj $(CC) $(CC_OPT) -o tstdg722 tstdg722.obj operg722.obj funcg722.objg722demo.obj: g722demo.ctstcg722.obj: tstcg722.c operg722.obj: operg722.c funcg722.obj: funcg722.c tstdg722.obj: tstdg722.c encg722.obj: encg722.cdecg722.obj: decg722.cg722.obj: g722.c# -------------------------------------# Test codec with provided speech file# -------------------------------------#test: run-demo comp-demotest: proc-test comp-testproc-test: run-democomp-test: comp-demobin/outsp3.bin: bin/codspw.codbin/codspw.cod: tst-g722.zip $(UNZIP) tst-g722.zip $(REF_FILES) swapover $(REF_FILES)# $(UNZIP) -v tst-g722.zip *.bin *.cod | $(AWK) $(AWK_CMD) | commandrun-demo: bin/codspw.cod $(DEMO) -enc bin/inpsp.bin prc/inpsp.bs $(DEMO) -dec -mode 1 bin/codspw.cod prc/outsp.md1 $(DEMO) -dec -mode 2 bin/codspw.cod prc/outsp.md2 $(DEMO) -dec -mode 3 bin/codspw.cod prc/outsp.md3 $(DEMO) bin/inpsp.bin prc/outsp.e-dcomp-demo: bin/outsp3.bin $(DIFF) prc/inpsp.bs bin/codspw.cod 64 $(DIFF) prc/outsp.md1 bin/outsp1.bin 64 $(DIFF) prc/outsp.md2 bin/outsp2.bin 64 $(DIFF) prc/outsp.md3 bin/outsp3.bin 64 $(DIFF) prc/outsp.md1 prc/outsp.e-d 64# ------------------------------------# Test codec with test sequences# ------------------------------------#test-tv: run-tv comp-tvtest-tv: proc-tv comp-tvproc-tv: tv-step1 tv-step2 tv-step3tv-step1: tstcg722# Should run without any error indication. $(TSTCG722) bin/bt1c1.xmt bin/bt2r1.cod $(TSTCG722) bin/bt1c2.xmt bin/bt2r2.cod tv-step2: tstdg722# Should run without any error indication. # Files .rc0 indicate the codec mode of operation $(TSTDG722) bin/bt2r1.cod bin/bt3l1.rc1 bin/bt3h1.rc0 $(TSTDG722) bin/bt2r1.cod bin/bt3l1.rc2 bin/bt3h1.rc0 $(TSTDG722) bin/bt2r1.cod bin/bt3l1.rc3 bin/bt3h1.rc0 $(TSTDG722) bin/bt2r2.cod bin/bt3l2.rc1 bin/bt3h2.rc0 $(TSTDG722) bin/bt2r2.cod bin/bt3l2.rc2 bin/bt3h2.rc0 $(TSTDG722) bin/bt2r2.cod bin/bt3l2.rc3 bin/bt3h2.rc0 $(TSTDG722) bin/bt1d3.cod bin/bt3l3.rc1 bin/bt3h3.rc0 $(TSTDG722) bin/bt1d3.cod bin/bt3l3.rc2 bin/bt3h3.rc0 $(TSTDG722) bin/bt1d3.cod bin/bt3l3.rc3 bin/bt3h3.rc0 tv-step3: encg722 decg722 $(ENCG722) bin/inpsp.bin prc/temp.cod $(DECG722) bin/codspw.cod prc/temp1.out 1 $(DECG722) bin/codspw.cod prc/temp2.out 2 $(DECG722) bin/codspw.cod prc/temp3.out 3 comp-tv:# Files must be identical. $(DIFF) prc/temp.cod bin/codspw.cod 64 $(DIFF) prc/temp1.out bin/outsp1.bin 64 $(DIFF) prc/temp2.out bin/outsp2.bin 64 $(DIFF) prc/temp3.out bin/outsp3.bin 64
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -