读书人

带有ObjectC的Automake操作

发布时间: 2012-12-24 10:43:13 作者: rapoo

含有ObjectC的Automake操作
@完基本的程式後

hello.m

#import <stdio.h>int main(int argc,const char *argv[]){printf("hello world\n");return 0;}

step 1.
>>autoscan
生 configure.scan

step 2.
>>mv configure.scan configure.in
修改configure.in的容,且加入(修改)下面四行
AM_INIT_AUTOMAKE(jeffrey,1.0)
AC_PROG_OBJC
AM_CONDITIONAL([am__fastdepOBJC], false)
AC_OUTPUT(Makefile)

step 3.
行下面行
>>aclocal
>>autoconf
分生aclocal.m4 以及configure

step 4.
始Makefile.am例如下

AUTOMAKE_OPTIONS=foreign
bin_PROGRAMS=demo0
demo0_SOURCES= hello.m

step 5.
>>autoheader
生 config.h.in

step 6.
>>automake --add-missing
automake 根 Makefile.am ,同 scan configure.in ,生的Makefile.in
且生下面三案
configure.in:6: installing `./install-sh'
configure.in:6: installing `./missing'
Makefile.am: installing `./depcomp'

step 7.
>>./configure
生Makefile

step 8.
>>make
生demo0

读书人网 >编程

热点推荐