Skip to content

Latest commit

 

History

History
46 lines (32 loc) · 782 Bytes

File metadata and controls

46 lines (32 loc) · 782 Bytes

automake备忘

进入目录

autoscan

生成configure.scan

mv configure.scan configure.in

修改configure.in

加上:

AC_INIT(ProjectName, Version, Email)
AM_INIT_AUTOMAKE(ProjectName, Version)
AC_CONFIG_FILES([Makefile
           subdir1/Makefile
           subdir2/Makefile])
AC_OUTPUT

写Makefile.am

AUTOMAKE_OPTIONS = foreign
bin_PROGRAMS = ProgramName
ProgramName_SOURCES = main.cpp other.c

写autogen.sh

#!/bin/sh
aclocal
autoconf			# generate configure
#autoheader
automake --foreign --add-missing --copy # generate Makefile.in

根据项目选择否需要autoheader

sh autogen.sh

./configure; make; make install