www.pudn.com > SMV_Code.rar > make_dec


##################################################################### 
#=================================================================== 
# MAKEFILE: make_dec 
#------------------------------------------------------------------- 
# PURPOSE: Compile the SMV (Selectable Mode Vocoder) on the Linux OS  
#=================================================================== 
##################################################################### 
 
 
############################################## 
# Mandatory flags, SHOULD ALWAYS BE DEFINED! # 
############################################## 
# ENC_CMP     : Compile the encoder functions. 
# DEC_CMP     : Compile the decoder functions. 
 
MF = \ 
	-DDEC_CMP 
 
################## 
# Optional flags # 
################## 
# VERBOSE                   : Enables program print-out. 
# WMOPS                     : Enables the count of WMOPS for the evaluation  
#                             of the complexity. 
# DRAM_ROM_TEST		    : Estimation of the DRAM and SPRAM. 
# VAD_A			    : Compile using the VAD option A.  
# VAD_B			    : Compile using the VAD option B. 
# NS_A			    : Compile using the NS option A. 
# NS_B			    : Compile using the NS option B. 
# DATA                      : Compile the TTY/TTD code (data or speech + data 
#                             transmission). 
 
OF = \ 
 
#	-DVAD_A \ 
#	-DNS_A \ 
#	-DDATA\ 
 
#	-DVAD_B\ 
#	-DNS_B\ 
#	-DDATA\ 
 
#	-DVERBOSE\ 
#	-DWMOPS \ 
#	-DDRAM_ROM_TEST\ 
 
################## 
# Platform flags # 
################## 
# BYTE_SWAP_INPUT : Enables byte-wapping of the input. 
# BYTE_SWAP_OUTPUT: Enables byte-wapping of the output. 
 
PF = \ 
#     -DBYTE_SWAP_INPUT \ 
#     -DBYTE_SWAP_OUTPUT 
 
OBJ = ../../obj/linux/ 
SRC = ../../src/ 
EXE = ../../exe/linux/ 
TTYDIR  = ../../tty 
DTMFDIR = ../../dtmf 
DSP_FX  = ../../dsp_fx 
 
TAB = ../../tab/ 
 
CC = gcc 
 
ADD_DIR = -I ${TAB}  -I${TTYDIR} -I${DTMFDIR} -I${DSP_FX} 
 
CFLAGS = -Wall -O3 -static -ffloat-store $(MF) $(OF) $(PF) $(ADD_DIR) 
 
WMPS = ${OBJ}lib_wmp.o 
 
DEC_LIB = ${OBJ}mcutil.o ${OBJ}gputil.o \ 
	${OBJ}lib_cpr.o ${OBJ}lib_ini.o ${OBJ}lib_io.o\ 
	${OBJ}lib_qlsf.o ${OBJ}lib_lpc.o ${OBJ}lib_flt.o \ 
	${OBJ}lib_swb.o ${OBJ}lib_geq.o \ 
	${OBJ}lib_ppr.o ${OBJ}lib_cla.o ${OBJ}lib_snr.o \ 
	${OBJ}lib_bit.o ${OBJ}lib_pit.o \ 
	${OBJ}lib_ltp.o ${OBJ}lib_ppp.o \ 
	${OBJ}lib_fcs.o ${OBJ}lib_gcb.o \ 
	${OBJ}uvgq.o ${OBJ}nelp.o \ 
 
DECODE = ${OBJ}main_dec.o ${OBJ}decoder.o 
 
LIBDIR= -L$(TTYDIR) -L$(DTMFDIR) -L$(DSP_FX)  
LIBFILES=$(TTYDIR)/libtty.a $(DTMFDIR)/libdtmf.a $(DSP_FX)/libdsp40.a 
 
LIBS =  -ldtmf -ltty -ldsp40 -lm  
 
all:    ${EXE}decoder_fl 
 
 
${EXE}decoder_fl: $(DECODE) ${DEC_LIB} ${WMPS} ${LIBFILES} 
	$(CC) $(CFLAGS) $(DECODE) ${DEC_LIB} ${LIBDIR} ${WMPS} $(LIBS) -o ${EXE}decoder_fl 
 
$(OBJ)%.o:$(SRC)%.c 
	$(CC) $(CFLAGS) -c $< -o $@ 
 
$(DECODE):	${SRC}decoder.h \ 
	 	${SRC}ext_var.h ${SRC}glb_var.h \ 
		${SRC}const.h ${SRC}typedef.h ${SRC}main.h \ 
		${SRC}mcutil.h ${SRC}gputil.h \ 
		${SRC}lib_cpr.h ${SRC}lib_ini.h ${SRC}lib_io.h ${SRC}lib_qlsf.h \ 
		${SRC}lib_lpc.h ${SRC}lib_flt.h\ 
		${SRC}lib_swb.h ${SRC}lib_geq.h ${SRC}lib_ppr.h ${SRC}lib_bit.h \ 
		${SRC}lib_ltp.h ${SRC}lib_fcs.h ${SRC}lib_gcb.h\ 
		${SRC}uvgq.h ${SRC}nelp.h  \ 
		${TAB}lib_qlsf.tab ${TAB}lib_geq.tab ${TAB}lib_gcb.tab \ 
                ${TAB}lib_lpc.tab ${TAB}lib_fcs.tab ${TAB}lib_bit.tab \ 
		${TAB}lib_ppr.tab ${TAB}lib_ltp.tab 
 
clean: 
	rm -rf ${OBJ}*.o  ${EXE}decoder_fl