`
luckfox
  • 浏览: 64419 次
  • 性别: Icon_minigender_1
  • 来自: 台灣
社区版块
存档分类
最新评论

含有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
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics