当前时区为 UTC + 8 小时



发表新帖 回复这个主题  [ 6 篇帖子 ] 
作者 内容
1 楼 
 文章标题 : 异步串口库函数libcssl-0.9.4的编译安装
帖子发表于 : 2010-05-27 13:09 

注册: 2009-11-29 15:03
帖子: 4
送出感谢: 0 次
接收感谢: 0 次
这个库函数死活编译通不过,其中的文档又看不太明白, 请教大牛,如何使用,可移植与ARM中。


附件:
libcssl-0.9.4.rar [18.89 KiB]
被下载 151 次
页首
 用户资料  
 
2 楼 
 文章标题 : Re: 异步串口库函数libcssl-0.9.4的编译安装
帖子发表于 : 2010-05-29 0:06 

注册: 2009-02-03 15:13
帖子: 41
送出感谢: 0 次
接收感谢: 0 次
Makefile 有问题,已改过
代码:
# Copyright 2003 Marcin Siennicki <m.siennicki@cloos.pl>
# see COPYING file for details

VERSION = 0
REVISION = 9
MINOR = 4
AGE = 0

FULLVERSION = $(VERSION).$(REVISION).$(MINOR)

DISTNAME = libcssl-$(FULLVERSION)

SOURCEFILES = Makefile README INSTALL COPYING \
   test.c cssl.c cssl.h libcssl.spec libcssl.spec.in

SRPMPATH = /usr/src/redhat/SRPMS

RPMPATH = /usr/src/redhat/RPMS/i386

SRPMNAME = $(DISTNAME)-1.src.rpm

RPMNAME = $(DISTNAME)-1.i386.rpm

ifndef PREFIX
PREFIX = /usr
endif

LIBPATH = $(PREFIX)/lib
INCLUDEPATH = $(PREFIX)/include
PKGCONFIGPATH = $(PREFIX)/lib/pkgconfig

all: libcssl.la test libcssl.pc

cssl.lo: cssl.c Makefile
   libtool compile gcc -Wall -D_GNU_SOURCE -g -O -c cssl.c

libcssl.la: cssl.lo
   libtool link gcc -g -O -o libcssl.la -rpath $(LIBPATH)\
   -version-info $(VERSION):$(REVISION):$(AGE)\
    cssl.lo

test.o:   test.c
   libtool compile gcc -Wall -D_GNU_SOURCE -g -O -c test.c

test:   test.o libcssl.la
   libtool link gcc -g -O -o test test.o libcssl.la

test.shared: test.c
   gcc -g -O -o test.shared test.c -lcssl

install: libcssl.la cssl.h libcssl.pc
   install -d $(LIBPATH) $(INCLUDEPATH) $(PKGCONFIGPATH)
   libtool install -c libcssl.la $(LIBPATH)
   install -c cssl.h $(INCLUDEPATH)
   install -c libcssl.pc $(PKGCONFIGPATH)

dist:   libcssl.spec
   rm -rf $(DISTNAME)
   mkdir $(DISTNAME)
   for i in $(SOURCEFILES) ; { ln $$i $(DISTNAME)/$$i ; }
   tar -czf $(DISTNAME).tar.gz $(DISTNAME)

libcssl.spec: Makefile libcssl.spec.in
   m4 -D____CSSL_VERSION____=$(FULLVERSION) libcssl.spec.in > libcssl.spec

libcssl.pc: Makefile
   echo "prefix=$(PREFIX)" > $@
   echo "exec_prefix=$(PREFIX)" >> $@
   echo "libdir=$(LIBPATH)">> $@
   echo "includedir=$(INCLUDEPATH)" >> $@
   echo "" >> $@
   echo "Name: libcssl-$(VERSION).$(REVISION)" >> $@
   echo "Description: a serial port communication library" >> $@
   echo "Version: $(VERSION).$(REVISION).$(MINOR)" >> $@
   echo "Libs: -L\$${libdir} -lcssl" >> $@
   echo "Cflags: -I\$${includedir}" >> $@

rpm:   dist
   rpmbuild -ta $(DISTNAME).tar.gz
   mv $(SRPMPATH)/$(SRPMNAME) .
   mv $(RPMPATH)/$(RPMNAME) .

clean:
   rm -fr .libs test test.shared *.la *.lo *.o *~ $(DISTNAME) *.gz *.rpm libcssl.spec


页首
 用户资料  
 
3 楼 
 文章标题 : Re: 异步串口库函数libcssl-0.9.4的编译安装
帖子发表于 : 2010-06-24 20:52 

注册: 2009-11-29 15:03
帖子: 4
送出感谢: 0 次
接收感谢: 0 次
root@vibing-desktop:/opt/libcssl-0.9.4# make
libtool link gcc -g -O -o libcssl.la -rpath /usr/lib\
-version-info 0:9:0\
cssl.lo
libtool: link: `0:9:0cssl.lo' is not a valid libtool object
make: *** [libcssl.la] 错误 1


页首
 用户资料  
 
4 楼 
 文章标题 : Re: 异步串口库函数libcssl-0.9.4的编译安装
帖子发表于 : 2010-06-25 10:31 

注册: 2009-11-29 15:03
帖子: 4
送出感谢: 0 次
接收感谢: 0 次
现在的MAKEFILE为
代码:
# Copyright 2003 Marcin Siennicki <m.siennicki@cloos.pl>

# see COPYING file for details



VERSION = 0

REVISION = 9

MINOR = 4

AGE = 0



FULLVERSION = $(VERSION).$(REVISION).$(MINOR)



DISTNAME = libcssl-$(FULLVERSION)



SOURCEFILES = Makefile README INSTALL COPYING \

   test.c cssl.c cssl.h libcssl.spec libcssl.spec.in



SRPMPATH = /usr/src/redhat/SRPMS



RPMPATH = /usr/src/redhat/RPMS/i386



SRPMNAME = $(DISTNAME)-1.src.rpm



RPMNAME = $(DISTNAME)-1.i386.rpm



ifndef PREFIX

PREFIX = /usr

endif



LIBPATH = $(PREFIX)/lib

INCLUDEPATH = $(PREFIX)/include

PKGCONFIGPATH = $(PREFIX)/lib/pkgconfig



all: libcssl.la test libcssl.pc



cssl.lo: cssl.c Makefile

   libtool compile gcc -Wall -D_GNU_SOURCE -g -O -c cssl.c



libcssl.la: cssl.lo

   $(libtool) --mode=link gcc -g -O -o libcssl.la -rpath $(LIBPATH)\

   -version-info $(VERSION):$(REVISION):$(AGE)\

   cssl.lo



test.o:   test.c

   libtool compile gcc -Wall -D_GNU_SOURCE -g -O -c test.c



test:   test.o libcssl.la

   $(libtool) --mode=link gcc -g -O -o test test.o libcssl.la



test.shared: test.c

   gcc -g -O -o test.shared test.c -lcssl



install: libcssl.la cssl.h libcssl.pc

   install -d $(LIBPATH) $(INCLUDEPATH) $(PKGCONFIGPATH)

   libtool install -c libcssl.la $(LIBPATH)

   install -c cssl.h $(INCLUDEPATH)

   install -c libcssl.pc $(PKGCONFIGPATH)



dist:   libcssl.spec

   rm -rf $(DISTNAME)

   mkdir $(DISTNAME)

   for i in $(SOURCEFILES) ; { ln $$i $(DISTNAME)/$$i ; }

   tar -czf $(DISTNAME).tar.gz $(DISTNAME)



libcssl.spec: Makefile libcssl.spec.in

   m4 -D____CSSL_VERSION____=$(FULLVERSION) libcssl.spec.in > libcssl.spec



libcssl.pc: Makefile

   echo "prefix=$(PREFIX)" > $@

   echo "exec_prefix=$(PREFIX)" >> $@

   echo "libdir=$(LIBPATH)">> $@

   echo "includedir=$(INCLUDEPATH)" >> $@

   echo "" >> $@

   echo "Name: libcssl-$(VERSION).$(REVISION)" >> $@

   echo "Description: a serial port communication library" >> $@

   echo "Version: $(VERSION).$(REVISION).$(MINOR)" >> $@

   echo "Libs: -L\$${libdir} -lcssl" >> $@

   echo "Cflags: -I\$${includedir}" >> $@



rpm:   dist

   rpmbuild -ta $(DISTNAME).tar.gz

   mv $(SRPMPATH)/$(SRPMNAME) .

   mv $(RPMPATH)/$(RPMNAME) .



clean:

   rm -fr .libs test test.shared *.la *.lo *.o *~ $(DISTNAME) *.gz *.rpm libcssl.spec

提示错误为:
mode=link gcc -g -O -o libcssl.la -rpath /usr/lib\
-version-info 0:9:0\
cssl.lo
gcc: /usr/lib-version-info: 没有那个文件或目录
gcc: 0:9:0cssl.lo: 没有那个文件或目录
gcc: unrecognized option '-rpath'
gcc: no input files
make: [libcssl.la] 错误 1 (忽略)
mode=link gcc -g -O -o test test.o libcssl.la
gcc: libcssl.la: 没有那个文件或目录
make: [test] 错误 1 (忽略)
echo "prefix=/usr" > libcssl.pc
echo "exec_prefix=/usr" >> libcssl.pc
echo "libdir=/usr/lib">> libcssl.pc
echo "includedir=/usr/include" >> libcssl.pc
echo "" >> libcssl.pc
echo "Name: libcssl-0.9" >> libcssl.pc
echo "Description: a serial port communication library" >> libcssl.pc
echo "Version: 0.9.4" >> libcssl.pc
echo "Libs: -L\${libdir} -lcssl" >> libcssl.pc
echo "Cflags: -I\${includedir}" >> libcssl.pc


页首
 用户资料  
 
5 楼 
 文章标题 : Re: 异步串口库函数libcssl-0.9.4的编译安装
帖子发表于 : 2012-02-25 17:43 

注册: 2010-05-21 18:00
帖子: 1
送出感谢: 0 次
接收感谢: 0 次
//试一下这个。。。
# Copyright 2003 Marcin Siennicki <m.siennicki@cloos.pl>
# see COPYING file for details

VERSION = 0
REVISION = 9
MINOR = 4
AGE = 0

FULLVERSION = $(VERSION).$(REVISION).$(MINOR)

DISTNAME = libcssl-$(FULLVERSION)

SOURCEFILES = Makefile README INSTALL COPYING \
test.c cssl.c cssl.h libcssl.spec libcssl.spec.in

SRPMPATH = /usr/src/redhat/SRPMS

RPMPATH = /usr/src/redhat/RPMS/i386

SRPMNAME = $(DISTNAME)-1.src.rpm

RPMNAME = $(DISTNAME)-1.i386.rpm

ifndef PREFIX
PREFIX = /usr
endif

LIBPATH = $(PREFIX)/lib
INCLUDEPATH = $(PREFIX)/include
PKGCONFIGPATH = $(PREFIX)/lib/pkgconfig

all: libcssl.la test libcssl.pc

cssl.lo: cssl.c Makefile
libtool compile gcc -Wall -D_GNU_SOURCE -g -O -c cssl.c

libcssl.la: cssl.lo
libtool link gcc -g -O -o libcssl.la -rpath $(LIBPATH)\
-version-info cssl.lo

test.o: test.c
libtool compile gcc -Wall -D_GNU_SOURCE -g -O -c test.c

test: test.o libcssl.la
libtool link gcc -g -O -o test test.o libcssl.la

test.shared: test.c
gcc -g -O -o test.shared test.c -lcssl

install: libcssl.la cssl.h libcssl.pc
install -d $(LIBPATH) $(INCLUDEPATH) $(PKGCONFIGPATH)
libtool install -c libcssl.la $(LIBPATH)
install -c cssl.h $(INCLUDEPATH)
install -c libcssl.pc $(PKGCONFIGPATH)

dist: libcssl.spec
rm -rf $(DISTNAME)
mkdir $(DISTNAME)
for i in $(SOURCEFILES) ; { ln $$i $(DISTNAME)/$$i ; }
tar -czf $(DISTNAME).tar.gz $(DISTNAME)

libcssl.spec: Makefile libcssl.spec.in
m4 -D____CSSL_VERSION____=$(FULLVERSION) libcssl.spec.in > libcssl.spec

libcssl.pc: Makefile
echo "prefix=$(PREFIX)" > $@
echo "exec_prefix=$(PREFIX)" >> $@
echo "libdir=$(LIBPATH)">> $@
echo "includedir=$(INCLUDEPATH)" >> $@
echo "" >> $@
echo "Name: libcssl-$(VERSION).$(REVISION)" >> $@
echo "Description: a serial port communication library" >> $@
echo "Version: $(VERSION).$(REVISION).$(MINOR)" >> $@
echo "Libs: -L\$${libdir} -lcssl" >> $@
echo "Cflags: -I\$${includedir}" >> $@

rpm: dist
rpmbuild -ta $(DISTNAME).tar.gz
mv $(SRPMPATH)/$(SRPMNAME) .
mv $(RPMPATH)/$(RPMNAME) .

clean:
rm -fr .libs test test.shared *.la *.lo *.o *~ $(DISTNAME) *.gz *.rpm libcssl.spec


页首
 用户资料  
 
6 楼 
 文章标题 : Re: 异步串口库函数libcssl-0.9.4的编译安装
帖子发表于 : 2015-07-20 11:55 

注册: 2015-07-20 11:52
帖子: 1
系统: ubuntu 12
送出感谢: 0 次
接收感谢: 0 次
感谢5楼的分享,我将52行改了一下,可以正常编译了
代码:
# Copyright 2003 Marcin Siennicki <m.siennicki@cloos.pl>
# see COPYING file for details

VERSION = 0
REVISION = 9
MINOR = 4
AGE = 0

FULLVERSION = $(VERSION).$(REVISION).$(MINOR)

DISTNAME = libcssl-$(FULLVERSION)

SOURCEFILES = Makefile README INSTALL COPYING \
test.c cssl.c cssl.h libcssl.spec libcssl.spec.in

SRPMPATH = /usr/src/redhat/SRPMS

RPMPATH = /usr/src/redhat/RPMS/i386

SRPMNAME = $(DISTNAME)-1.src.rpm

RPMNAME = $(DISTNAME)-1.i386.rpm

ifndef PREFIX
   PREFIX = /usr
endif

LIBPATH = $(PREFIX)/lib
INCLUDEPATH = $(PREFIX)/include
PKGCONFIGPATH = $(PREFIX)/lib/pkgconfig

all: libcssl.la test libcssl.pc

cssl.lo: cssl.c Makefile
   libtool compile gcc -Wall -D_GNU_SOURCE -g -O -c cssl.c

libcssl.la: cssl.lo
   libtool link gcc -g -O -o libcssl.la -rpath $(LIBPATH)\
   -version-info cssl.lo

test.o: test.c
   libtool compile gcc -Wall -D_GNU_SOURCE -g -O -c test.c

test: test.o libcssl.la
   libtool link gcc -g -O -o test test.o libcssl.la

test.shared: test.c
   gcc -g -O -o test.shared test.c -lcssl

install: libcssl.la cssl.h libcssl.pc
   install -d $(LIBPATH) $(INCLUDEPATH) $(PKGCONFIGPATH)
   install -c libcssl.la $(LIBPATH)
   install -c cssl.h $(INCLUDEPATH)
   install -c libcssl.pc $(PKGCONFIGPATH)

dist: libcssl.spec
   rm -rf $(DISTNAME)
   mkdir $(DISTNAME)
   for i in $(SOURCEFILES) ; { ln $$i $(DISTNAME)/$$i ; }
   tar -czf $(DISTNAME).tar.gz $(DISTNAME)

libcssl.spec: Makefile libcssl.spec.in
   m4 -D____CSSL_VERSION____=$(FULLVERSION) libcssl.spec.in > libcssl.spec

libcssl.pc: Makefile
   echo "prefix=$(PREFIX)" > $@
   echo "exec_prefix=$(PREFIX)" >> $@
   echo "libdir=$(LIBPATH)">> $@
   echo "includedir=$(INCLUDEPATH)" >> $@
   echo "" >> $@
   echo "Name: libcssl-$(VERSION).$(REVISION)" >> $@
   echo "Description: a serial port communication library" >> $@
   echo "Version: $(VERSION).$(REVISION).$(MINOR)" >> $@
   echo "Libs: -L\$${libdir} -lcssl" >> $@
   echo "Cflags: -I\$${includedir}" >> $@

rpm: dist
   rpmbuild -ta $(DISTNAME).tar.gz
   mv $(SRPMPATH)/$(SRPMNAME) .
   mv $(RPMPATH)/$(RPMNAME) .

clean:
   rm -fr .libs test test.shared *.la *.lo *.o *~ $(DISTNAME) *.gz *.rpm libcssl.spec


页首
 用户资料  
 
显示帖子 :  排序  
发表新帖 回复这个主题  [ 6 篇帖子 ] 

当前时区为 UTC + 8 小时


在线用户

正在浏览此版面的用户:没有注册用户 和 1 位游客


不能 在这个版面发表主题
不能 在这个版面回复主题
不能 在这个版面编辑帖子
不能 在这个版面删除帖子
不能 在这个版面提交附件

前往 :  
cron
本站点为公益性站点,用于推广开源自由软件,由 DiaHosting VPSBudgetVM VPS 提供服务。
我们认为:软件应可免费取得,软件工具在各种语言环境下皆可使用,且不会有任何功能上的差异;
人们应有定制和修改软件的自由,且方式不受限制,只要他们自认为合适。

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
简体中文语系由 王笑宇 翻译