comparison intercom/gsm/Makefile @ 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 # RPELTP makefile for Unix C compilers
3 #--------------------------------------------------------------------------
4 # Original Copyright message:
5 # Copyright 1992 by Jutta Degener and Carsten Bormann, Technische
6 # Universitaet Berlin. See the accompanying file "COPYRIGHT" for
7 # details. THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.
8 #
9 # File adapted by simao@ctd.comsat.com for the UGST distribution.
10 #--------------------------------------------------------------------------
11
12 # Machine dependent flags you must configure to port
13
14 ######### Define SASR if >> is a signed arithmetic shift (-1 >> 1 == -1)
15 SASR = -DSASR
16
17 ######### MUST Define USE_FLOAT_MUL for bit exact performance to GSM Spec.
18 MULHACK = -DUSE_FLOAT_MUL
19
20 # Choose a compiler. The code works both with ANSI and K&R-C.
21 # Use -DNeedFunctionPrototypes to compile with, -UNeedFunctionPrototypes to
22 # compile without, function prototypes in the header files.
23 #
24 # You can use the -DSTUPID_COMPILER to circumvent some compilers'
25 # static limits regarding the number of subexpressions in a statement.
26
27 CC = cc
28 CCFLAGS = -c -UNeedFunctionPrototypes -I../utl
29 #CCFLAGS = -g -c -UNeedFunctionPrototypes -I../utl
30 #CCFLAGS = -c -DSTUPID_COMPILER -I../utl
31
32 #CC = acc
33 #CCFLAGS = -c -O -I../utl
34
35 #CC = gcc
36 #CCFLAGS = -c -O2 -DNeedFunctionPrototypes=1 -fno-builtin -I../utl
37 #CCFLAGS = -c -g -Wall -DNeedFunctionPrototypes=1 -fno-builtin -I../utl
38
39 #--------------------------------------------------------------------------
40 #
41 # You shouldn't have to configure below this line if you're porting.
42 #
43 #--------------------------------------------------------------------------
44
45 # Tools
46 RM=rm -f
47
48 # Local Directories
49 INC = .
50
51 # Flags
52
53 DEBUG = -DNDEBUG
54 ######### Remove -DNDEBUG to enable assertions.
55
56 CFLAGS = $(CCFLAGS) $(SASR) $(DEBUG) $(MULHACK) $(FAST) -I$(INC) -I../utl
57 ######### It's $(CC) $(CFLAGS)
58
59
60 #--------------------------------------------------------------------------
61 # Headers
62 HEADERS = proto.h unproto.h config.h private.h gsm.h rpeltp.h
63
64 #--------------------------------------------------------------------------
65 # Sources
66 GSM_SOURCES = add.c code.c debug.c decode.c long_ter.c lpc.c \
67 preproce.c rpe.c gsm_dest.c gsm_deco.c gsm_enco.c \
68 gsm_expl.c gsm_impl.c gsm_crea.c gsm_prin.c gsm_opti.c \
69 rpeltp.c short_te.c table.c
70
71 DEMO_SOURCES = rpedemo.c ../g711/g711.c
72
73 SOURCES = $(GSM_SOURCES) $(DEMO_SOURCES)
74
75
76 #--------------------------------------------------------------------------
77 # Object files
78 GSM_OBJECTS = add.o code.o debug.o decode.o long_ter.o lpc.o \
79 preproce.o rpe.o gsm_dest.o gsm_deco.o gsm_enco.o \
80 gsm_expl.o gsm_impl.o gsm_crea.o gsm_prin.o gsm_opti.o \
81 rpeltp.o short_te.o table.o gsm.o
82
83 DEMO_OBJECTS = rpedemo.o g711.o
84
85 OBJECTS = $(GSM_OBJECTS) $(DEMO_OBJECTS)
86
87 # ------------------------------------------------
88 # Implicit rules
89 # ------------------------------------------------
90 .c.o:
91 $(CC) $(CFLAGS) $?
92
93 # ------------------------------------------------
94 # Generic rules
95 # ------------------------------------------------
96 all:: gsm.a rpedemo
97
98 gsm.a: $(GSM_OBJECTS)
99 ar rcs $@ $(GSM_OBJECTS)
100
101 anyway: clean rpedemo
102
103 clean:
104 $(RM) $(OBJECTS) rpedemo *.gsm *.gsm.raw gsm.a
105
106 cleantest:
107 echo No test file processing available in this directory
108
109 veryclean: clean
110 $(RM) rpedemo
111
112 # ------------------------------------------------
113 # Specific rules
114 # ------------------------------------------------
115 g711.o: ../g711/g711.c
116 $(CC) $(CFLAGS) -I../g711 ../g711/g711.c
117
118 rpedemo.o: rpedemo.c ../g711/g711.h
119 $(CC) $(CFLAGS) -I../g711 rpedemo.c
120
121 rpedemo: $(OBJECTS)
122 $(CC) -o rpedemo $(DEMO_OBJECTS) gsm.a
123
124 # ------------------------------------------------
125 # Run add < add_test.dta to make sure the
126 # basic arithmetic functions work as intended.
127 # ------------------------------------------------
128 add: add_test.o
129 $(CC) $(LFLAGS) -o add add_test.o
130
131 addtst: add add_test.dta
132 add < add_test.dta > /dev/null

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