博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

文章分类 -  makefile/gcc

摘要:https://ukabuer.me/blog/manage-deps-with-cmake https://zhuanlan.zhihu.com/p/102050750 add_subdirectory(thirdParty/abc_path ${DEPS_PATH}/libs) #添加第三方被依 阅读全文

posted @ 2021-03-04 14:14 bw_0927 阅读(6709) 评论(0) 推荐(2)

摘要:https://blog.csdn.net/chenj_freedom/article/details/81184296 先来说说回车与换行,后面再谈谈ANSI编码和UTF8编码。 回车与换行由一个问题说起,我在做一个项目的时候,用gdb调试,发现gdb执行和源码的行数不一致,排除了“-g -O0” 阅读全文

posted @ 2019-10-10 11:14 bw_0927 阅读(868) 评论(0) 推荐(0)

摘要:https://www.cnblogs.com/wanqieddy/archive/2011/09/21/2184257.html 在Makefile中我们经常看到 = := ?= +=这几个赋值运算符,那么他们有什么区别呢?我们来做个简单的实验 新建一个Makefile,内容为:ifdef DEF 阅读全文

posted @ 2019-09-30 14:04 bw_0927 阅读(162) 评论(0) 推荐(0)

摘要:链接动态库 如何程序在连接时使用了共享库,就必须在运行的时候能够找到共享库的位置。linux的可执行程序在执行的时候默认是先搜索/lib和/usr/lib这两个目录,然后按照/etc/ld.so.conf里面的配置搜索绝对路径。同时,Linux也提供了环境变量LD_LIBRARY_PATH供用户选择 阅读全文

posted @ 2019-07-02 10:14 bw_0927 阅读(795) 评论(0) 推荐(0)

摘要:https://www.cnblogs.com/my_life/articles/10619949.html Host vs Target A compiler is a program that turns source code into executable code. Like all pr 阅读全文

posted @ 2019-04-09 10:40 bw_0927 阅读(533) 评论(0) 推荐(0)

摘要:首先要修改Makefile,把gdbserver做成静态链接,避免出现库问题。 CFLAGS = -g -O2 -static ./configure --target=arm-linux --prefix=/opt/gdbserver/ --host=arm-linux 或者 ./configur 阅读全文

posted @ 2019-04-09 09:57 bw_0927 阅读(2503) 评论(0) 推荐(0)

摘要:https://www.cnblogs.com/pysery/archive/2012/06/17/2552680.html 一、必要性 作为源代码发行的软件,希望在尽可能多的环境上可以运行,这些环境包括了操作系统的类型,硬件系统、开发环境的不同的方面;另一方面,在Linux系统中没有一种统一的位置 阅读全文

posted @ 2019-04-01 14:10 bw_0927 阅读(1872) 评论(0) 推荐(1)

摘要:automake,autoconf使用详解 三.从helloworld入手 我们从大家最常使用的 例子程序helloworld开始. 下面的 过程如果简单地说来就是 : 新建三个文件: 然后执行: 就可以看到Makefile被产生出来,而且可以将helloworld.c编译通过. 很简单吧,几条命令 阅读全文

posted @ 2019-04-01 11:00 bw_0927 阅读(696) 评论(0) 推荐(0)

摘要:最近遇到一个要编译的源码居然没有configure文件,网上找到一个编译的方法,只有命令,没有说明,适合救急使用。 aclocal autoconf autoheader automake --add-missing ./configure make sudo make install 用自动生成M 阅读全文

posted @ 2019-03-29 18:31 bw_0927 阅读(2469) 评论(0) 推荐(0)

摘要:https://blog.csdn.net/kongshuai19900505/article/details/79104442 之前介绍的automake貌似工序过于复杂,在这里其实是没有必要做这么复杂的工作的,完全可以将其抽象成一个模板性质的脚本将各个工序都集中到脚本里面,使用者只需要稍微修改自 阅读全文

posted @ 2019-03-29 14:06 bw_0927 阅读(967) 评论(0) 推荐(0)

摘要:https://www.ibm.com/developerworks/cn/aix/library/1007_wuxh_libtool/index.html ./configure 执行完成后,会生产libtool工具 介绍 在不同的系统中建立动态链接库的方法有很大的差别,这主要是因为每个系统对动态 阅读全文

posted @ 2019-03-29 14:01 bw_0927 阅读(364) 评论(0) 推荐(0)

摘要:find_package( Threads ) calls a CMake module that first, searches the file system for the appropriate threads package for this platform, and then sets 阅读全文

posted @ 2016-05-21 21:17 bw_0927 阅读(2106) 评论(1) 推荐(0)

摘要:https://www.ibm.com/developerworks/cn/linux/l-cn-cmake/ https://www.cnblogs.com/my_life/articles/2130611.html 每一个目录下面都必须有一个CMakeLists.txt CMake 简介 CMa 阅读全文

posted @ 2016-05-20 11:08 bw_0927 阅读(176) 评论(0) 推荐(0)

摘要:https://www.cnblogs.com/my_life/articles/3554314.html GNU Autoconf, Automake and Libtoolhttp://sources.redhat.com/autobook/ GNU Autoconfhttp://www.gnu 阅读全文

posted @ 2015-10-26 15:02 bw_0927 阅读(173) 评论(0) 推荐(0)

摘要:http://www.bubuko.com/infodetail-627127.html首先说说本次嵌套执行makefile文件的目的:只需make根目录下的makefile文件,即可编译所有c文件,包括子目录下的。意义:自动化编译行为,以后编译自己的c文件时可把这些makefile文件直接复制到相... 阅读全文

posted @ 2015-09-10 14:20 bw_0927 阅读(901) 评论(1) 推荐(0)

摘要:http://www.ibm.com/developerworks/cn/linux/l-debugmake.html http://www.kuqin.com/aixcmds/aixcmds3/make.htm 如果命令行的第一个或前两个字符是 @ (at 符号)、-(连字符)和 +(加号)这几个 阅读全文

posted @ 2015-07-23 11:08 bw_0927 阅读(762) 评论(0) 推荐(0)

摘要:http://blog.sina.com.cn/s/blog_8fa7dd410100xsxj.html作为自由软件的旗舰项目,Richard Stallman 在十多年前刚开始写作 GCC 的时候,还只是把它当作仅仅一个 C 程序语言的编译器;GCC 的意思也只是 GNU C Compiler 而... 阅读全文

posted @ 2014-04-23 12:44 bw_0927 阅读(243) 评论(0) 推荐(0)

摘要:GNU Autoconf, Automake and Libtoolhttp://sources.redhat.com/autobook/ GNU Autoconfhttp://www.gnu.org/manual/autoconf/ GNU Automakehttp://www.gnu.org/m 阅读全文

posted @ 2014-02-18 15:16 bw_0927 阅读(127) 评论(0) 推荐(0)

摘要:http://blog.csdn.net/coofucoo/article/details/5113460一下摘录Makefile中调用shell的一段install: -if [ ! -e xxx ]; then sudo mkdir xxx; fi注意,将上面的if语句写到一行的话,必须在fi前面加上分号,否则会出现下面错误unexpected end of file下面转一个相关文章Makefile与Shell的问题大概只要知道Makefile的人,都知道Makefile可以调用Shell脚本。但是在实际使用时,并不那么简单,一些模棱两可的地方可能会让你抓狂。你若不信,可以先看几个例子, 阅读全文

posted @ 2013-05-29 14:27 bw_0927 阅读(413) 评论(0) 推荐(0)

摘要:http://hi.baidu.com/hcq11/blog/item/9f5bfc6e696209d680cb4a25.htmlhttp://bigwhite.blogbus.com/logs/1801699.html一直对GDB多线程调试接触不多,最近因为工作有了一些接触,简单作点记录吧。 先介绍一下GDB多线程调试的基本命令。 info threads 显示当前可调试的所有线程,每个线程会有一个GDB为其分配的ID,后面操作线程的时候会用到这个ID。 前面有*的是当前调试的线程。 thread ID 切换当前调试的线程为指定ID的线程。 break thread_test.c:123 t 阅读全文

posted @ 2012-03-14 10:06 bw_0927 阅读(280) 评论(0) 推荐(0)