ITeye博客

含有ObjectC的Automake操作

luckfox · 2012-01-20 11:50 · 编程语言 · Markdown

@寫完基本的程式後

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(, 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

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。