comparison intercom/g711/makefile.tcc @ 2:13be24d74cd2

import intercom-0.4.1
author Peter Meerwald <pmeerw@cosy.sbg.ac.at>
date Fri, 25 Jun 2010 09:57:52 +0200
parents
children
comparison
equal deleted inserted replaced
1:9cadc470e3da 2:13be24d74cd2
1 # -----------------------------------------------------------------------------
2 # Borland [tb]cc makefile for compiling and testing the UGST G.711
3 # implementation.
4 # Implemented by <simao@cpqd.ansp.br> -- 01.Feb.95
5 # -----------------------------------------------------------------------------
6
7 # ------------------------------------------------
8 # Choose a file comparison utility:
9 # ------------------------------------------------
10 DIFF = cf -q
11
12 # ------------------------------------------------
13 # Choose an archiving utility:
14 # - public domain unzip, or [PC/Unix/VMS]
15 # - shareware pkunzip [PC only]
16 # ------------------------------------------------
17 #UNZIP = -pkunzip
18 UNZIP = unzip -o
19
20 # ------------------------------------------------
21 # Choose an AWK; suggest use GNU version
22 # (available via anonymous ftp)
23 # ------------------------------------------------
24 AWK = gawk
25 ###AWK_CMD = '$$6~/[0-9]+:[0-9][0-9]/ {print "sb -over",$$NF};END{print "exit"}'
26 AWK_CMD = '$6~/[0-9]+:[0-9][0-9]/{{print "sb -over",$NF;print "touch",$NF}}'
27
28 # ------------------------------------------------
29 # Choose compiler. Sun: use cc. HP: gotta use gcc
30 # ------------------------------------------------
31 CC = tcc
32 CC_OPT = -I../utl
33
34 # ------------------------------------------------
35 # General purpose symbols
36 # ------------------------------------------------
37 RM = -rm -f
38 REF_VECTORS= sweep-r.a sweep-r.a-a sweep-r.rea sweep-r.reu \
39 sweep-r.u sweep-r.u-u sweep.src
40 TEST_VECTORS = sweep.a sweep.a-a sweep.rea sweep.reu sweep.u sweep.u-u
41 G711_OBJ = g711.obj g711demo.obj
42 G711DEMO = g711demo
43
44 # ------------------------------------------------
45 # Generic rules
46 # ------------------------------------------------
47 .c.obj:
48 $(CC) $(CC_OPT) -c $<
49
50 # ------------------------------------------------
51 # Targets
52 # ------------------------------------------------
53 all: g711demo
54
55 anyway: clean g711demo
56
57 clean:
58 $(RM) $(G711_OBJ)
59
60 cleantest:
61 $(RM) $(TEST_VECTORS)
62 $(RM) $(REF_VECTORS)
63
64 veryclean: clean cleantest
65 $(RM) g711demo.exe
66
67 # ------------------------------------------------
68 # Specific rules
69 # ------------------------------------------------
70 g711demo: g711demo.exe
71 g711demo.exe: g711demo.obj g711.obj
72 $(CC) $(CC_OPT) -eg711demo g711demo.obj g711.obj
73
74 shiftbit: shiftbit.exe
75 shiftbit.exe: shiftbit.c
76 $(CC) $(CC_OPT) -eshiftbit shiftbit.c
77
78 # ------------------------------------------------
79 # Test portability
80 # Note: there are no compliance test vectors associated with the G711 module
81 # ------------------------------------------------
82 test: proc comp
83
84 # sweep-r.* have been generated from sweep.src in a reference environment
85 # results of the comparisons shall yield 0 different samples!
86 proc: sweep.src
87 $(G711DEMO) A lilo sweep.src sweep.a 256 1 256
88 $(G711DEMO) u lilo sweep.src sweep.u 256 1 256
89 $(G711DEMO) A lili sweep.src sweep.a-a 256 1 256
90 $(G711DEMO) u lili sweep.src sweep.u-u 256 1 256
91 $(G711DEMO) A loli sweep.a sweep.rea 256 1 256
92 $(G711DEMO) u loli sweep.u sweep.reu 256 1 256
93
94 comp: sweep-r.u-u
95 $(DIFF) sweep.a sweep-r.a
96 $(DIFF) sweep.a-a sweep-r.a-a
97 $(DIFF) sweep.rea sweep-r.rea
98 $(DIFF) sweep.reu sweep-r.reu
99 $(DIFF) sweep.u sweep-r.u
100 $(DIFF) sweep.u-u sweep-r.u-u
101
102 # ---------------------------------------------------
103 # Extract from archive and byte-swap -- if necessary
104 # ---------------------------------------------------
105 sweep.src: tst-g711.zip
106 $(UNZIP) tst-g711.zip sweep.src
107 swapover sweep.src
108 # $(UNZIP) -v tst-g711.zip sweep.src > x
109 # $(AWK) $(AWK_CMD) x > y.bat
110 # y
111 # $(RM) x y.bat
112
113 sweep-r.u-u: tst-g711.zip
114 $(UNZIP) tst-g711.zip $(REF_VECTORS)
115 swapover $(REF_VECTORS)
116 # $(UNZIP) -v tst-g711.zip sweep-r.* > x
117 # $(AWK) $(AWK_CMD) x > y.bat
118 # y
119 # $(RM) x y.bat

Repositories maintained by Peter Meerwald, pmeerw@pmeerw.net.