# Copyright 1992-1996 by Jutta Degener and Carsten Bormann, Technische # Machine- or installation dependent flags you should configure to port SASR = -DSASR # MULHACK = -DUSE_FLOAT_MUL # FAST = -DFAST # LTP_CUT = -DLTP_CUT WAV49 = -DWAV49 # Choose a compiler. The code works both with ANSI and K&R-C. # CC = cc # CC = /usr/lang/acc LD = $(CC) # LD = gcc
# CCINC = -I/usr/gnu/lib/gcc-2.1/gcc-lib/sparc-sun-sunos4.1.2/2.1/include # LDINC = -L/usr/gnu/lib/gcc-2.1/gcc-lib/sparc-sun-sunos4.1.2/2.1 # LDLIB = -lgcc
INSTALL_ROOT = $(PWD)/../output/arm-linux # Where do you want to install the gsm library, header file, and manpages? GSM_INSTALL_ROOT = $(INSTALL_ROOT)
TOAST_INSTALL_ROOT = $(INSTALL_ROOT) # Other tools SHELL = /bin/sh #
ROOT = . # Flags # DEBUG = -DNDEBUG CFLAGS = $(CCFLAGS) $(SASR) $(DEBUG) $(MULHACK) $(FAST) $(LTP_CUT) \ LFLAGS = $(LDFLAGS) $(LDINC)
LIBEXT = so TOAST = $(BIN)/toast # Headers GSM_HEADERS = $(INC)/gsm.h HEADERS = $(INC)/proto.h \ # Sources GSM_SOURCES = $(SRC)/add.c \ TOAST_SOURCES = $(SRC)/toast.c \ SOURCES = $(GSM_SOURCES) \ # Object files GSM_OBJECTS = $(SRC)/add.o \ TOAST_OBJECTS = $(SRC)/toast.o \ OBJECTS = $(GSM_OBJECTS) $(TOAST_OBJECTS) # Manuals GSM_MANUALS = $(MAN)/gsm.3 \ TOAST_MANUALS = $(MAN)/toast.1 MANUALS = $(GSM_MANUALS) $(TOAST_MANUALS) $(MAN)/bitter.1 # Other stuff in the distribution STUFF = ChangeLog \
GSM_INSTALL_TARGETS = \ TOAST_INSTALL_TARGETS = \
.c.o: # Target rules all: $(LIBGSM) $(TOAST) $(TCAT) $(UNTOAST) tst: $(TST)/lin2cod $(TST)/cod2lin $(TOAST) $(TST)/test-result addtst: $(ADDTST)/add $(ADDTST)/add_test.dta misc: $(TLS)/sweet $(TLS)/bitter $(TLS)/sour $(TLS)/ginger \
cp -f inc/* $(GSM_INSTALL_ROOT)/inc
$(LIBGSM): $(LIB) $(GSM_OBJECTS)
$(TOAST): $(BIN) $(TOAST_OBJECTS) $(LIBGSM) $(UNTOAST): $(BIN) $(TOAST) $(TCAT): $(BIN) $(TOAST)
$(BIN): $(LIB):
gsminstall: toastinstall: gsmuninstall: toastuninstall: $(TOAST_INSTALL_BIN)/toast: $(TOAST) $(TOAST_INSTALL_BIN)/untoast: $(TOAST_INSTALL_BIN)/toast $(TOAST_INSTALL_BIN)/tcat: $(TOAST_INSTALL_BIN)/toast $(TOAST_INSTALL_MAN)/toast.1: $(MAN)/toast.1 $(GSM_INSTALL_MAN)/gsm.3: $(MAN)/gsm.3 $(GSM_INSTALL_MAN)/gsm_option.3: $(MAN)/gsm_option.3 $(GSM_INSTALL_MAN)/gsm_explode.3: $(MAN)/gsm_explode.3 $(GSM_INSTALL_MAN)/gsm_print.3: $(MAN)/gsm_print.3 $(GSM_INSTALL_INC)/gsm.h: $(INC)/gsm.h $(GSM_INSTALL_LIB)/libgsm.a: $(LIBGSM)
dist: gsm-1.0.tar.Z gsm-1.0.tar.Z: $(STUFF) $(SOURCES) $(HEADERS) $(MANUALS) # Clean uninstall: toastuninstall gsmuninstall semi-clean: clean: semi-clean
$(TLS)/sweet: $(TLS)/sweet.o $(TLS)/taste.o $(TLS)/bitter: $(TLS)/bitter.o $(TLS)/taste.o # A version of the same family that Jeff Chilton used to implement $(TLS)/ginger: $(TLS)/ginger.o $(TLS)/taste.o $(TLS)/sour: $(TLS)/sour.o $(TLS)/taste.o # Run $(ADDTST)/add < $(ADDTST)/add_test.dta to make sure the $(ADDTST)/add: $(ADDTST)/add_test.o
$(TST)/lin2txt: $(TST)/lin2txt.o $(LIBGSM) $(TST)/lin2cod: $(TST)/lin2cod.o $(LIBGSM) $(TST)/gsm2cod: $(TST)/gsm2cod.o $(LIBGSM) $(TST)/cod2txt: $(TST)/cod2txt.o $(LIBGSM) $(TST)/cod2lin: $(TST)/cod2lin.o $(LIBGSM)
|
gsm库(libgsm)在ARM-Linux下的移植
原创protheschildren ©著作权
文章分类 运维
©著作权归作者所有:来自51CTO博客作者protheschildren的原创作品,请联系作者获取转载授权,否则将追究法律责任
Andrew Huang <bluedrum@163.com> 转载请注明作者及网址。
GSM是常见的VOIP的语音编解码库,在Linux下用libgsm来实现。在项目中需要用到libgsm库。因此试着直接编译GSM库来编译.官网已经停止服务了,因此在这个网址下了最新版来编译
http://libgsm.sourcearchive.com/downloads/1.0.13-3/libgsm_1.0.13.orig.tar.gz
解压后发现,这个Makefile是一个手写而非 Autoconf生成的Makefile,并且只有编译静态库,而没有常见的动态库的Makefile.
因此将其修改一下,使用其能在ARM编译并且成动态库。这也是一个典型的Makefile的修改练习,如果想编译成静态库,简单把 LIBEXT 改成 a即可
下一篇:alsa 音频库的移植
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
Linux 下 LVM 的基础使用
Linux LVM 基础使用方法
逻辑卷 元数据 自动备份 -
Linux下的开发工具
经过前面的学习,我们了解vim这个编辑器,学会了如何使用它来写代码。今天,我们先解决前面遗留下的问题,再来认识gcc/g++编辑器。
编译器gcc make/makefile 可执行程序形成的过程 sudo白名单 -
Cubieboard arm-linux 移植
Cubieboard arm-linux 移植1、u-boot 移植获取Cubieboard的u-boot源代码git clone https://
嵌入式 操作系统 git linux github