成功 makefile main

参考地址: http://blogold.chinaunix.net/u/2260/showart_199482.html

http://www.cnblogs.com/wangkangluo1/archive/2011/06/02/2068788.html

configure.ac

# -*- Autoconf -*-
# Process
this file with autoconf to produce a configure script.

AC_PREREQ([
2.65])
AC_INIT(maintest,
10.32, 304243050@qq.com)
AM_INIT_AUTOMAKE()
#AC_CONFIG_SRCDIR([config.h])
#AC_CONFIG_HEADERS([config.h])

# Checks
for programs.
AC_PROG_CC
AC_PROG_LIBTOOL

# Checks
for libraries.

# Checks
for header files.
AC_CHECK_HEADERS([stdlib.h
string.h])

# Checks
for typedefs, structures, and compiler characteristics.

# Checks
for library functions.
AC_FUNC_MALLOC
AC_CHECK_FUNCS([memset])

AC_OUTPUT(Makefile)

Makefile.am

AUTOMAKE_OPTIONS=foreign
lib_LTLIBRARIES
=libmain.la

libmain_la_SOURCES
= a.c\
b.c\
config.c

nobase_include_HEADERS
= config.h\
a.h\
b.h

sudo ldconfig 加载文件

posted @ 2011-06-17 17:14  wangkangluo1  阅读(361)  评论(0编辑  收藏  举报