呵呵!刚刚又练了一下用autotools来生成makefile,呵呵,感觉比前一次好多拉。 [root@localhost root]# mkdir -m 777 ./hello //新建一个文件夹放源文件,其实这相当于一个项目工程文件夹 [root@localhost root]# cd hello [root@localhost hello]# vim hello.c //新建一个hello.c的文件,输入如下内容 #include<stdio.h> int main(void) { printf("Hello, Lammy!\n"); return 0; }//呵呵,简单吧 //接下来就开始使用autotools来生成Makefile [root@localhost hello]# ls hello.c [root@localhost hello]# autoscan //利用它来生成configure.in的原型文件configure.scan [root@localhost hello]# ls //发现有什么不一样了没有 autoscan.log configure.scan hello.c //然后修改configure.scan,并保存为configure.in [root@localhost hello]# vim configure.scan
# -*- Autoconf -*- # Process this file with autoconf to produce a configure script. AC_PREREQ(2.57) AC_INIT(FULL-PACKAGE-NAME, VERSION, BUG-REPORT-ADDRESS) AC_CONFIG_SRCDIR([hello.c]) AC_CONFIG_HEADER([config.h]) # Checks for programs. AC_PROG_CC # Checks for libraries. # Checks for header files. # Checks for typedefs, structures, and compiler characteristics. # Checks for library functions. AC_OUTPUT
//把它修改为如下: # -*- Autoconf -*- # Process this file with autoconf to produce a configure script.
文章评论(0条评论)
登录后参与讨论