linux 下C/C++ 生成Configure 和Makefile
前提:
automake
简要步骤
-
编写test.c
-
运行
autoscan -
运行
mv configure.scan configure.ac -
修改
configure.ac中内容# -*- Autoconf -*- # Process this file with autoconf to produce a configure script. AC_PREREQ([2.69]) AC_INIT(test, 1.0, sizaif@mail.com) AC_CONFIG_SRCDIR([test.cpp]) AC_CONFIG_HEADERS([config.h]) AM_INIT_AUTOMAKE # 增加 # Checks for programs. AC_PROG_CXX AC_PROG_CC # Checks for libraries. # Checks for header files. # Checks for typedefs, structures, and compiler characteristics. AC_TYPE_SIZE_T # Checks for library functions. AC_CONFIG_FILES([Makefile]) -
运行
aclocal -
创建
Makefile.amAUTOMAKE_OPTIONS=foreign # 固定写法 bin_PROGRAMS=test # 生成的可执行文件


2639

被折叠的 条评论
为什么被折叠?



