WEB开发网
开发学院手机开发iPhone 开发 iPhone 开发进阶 使用 Makefile 自动编译 iPhone ... 阅读

iPhone 开发进阶 使用 Makefile 自动编译 iPhone 程序

 2010-02-27 23:28:00 来源:WEB开发网   
核心提示:tar -zxf ldid-1.0.610.tgz# 如果是 PowerPC 下载下面的补丁# wget -qO- http://fink.cvs.sourceforge.net/viewvc/*checkout*/fink/dists/10.4/unstable/crypto/finkinfo/ldid.patch?

tar -zxf ldid-1.0.610.tgz

# 如果是 PowerPC 下载下面的补丁

# wget -qO- http://fink.cvs.sourceforge.net/viewvc/*checkout*/fink/dists/10.4/unstable/crypto/finkinfo/ldid.patch?revision=1.1 | patch -p0

cd ldid-1.0.610

g++ -I . -o util/ldid{,.cpp} -x c util/{lookup2,sha1}.c

sudo cp -a util/ldid /usr/bin

最后,让我们看看Makefile中都有什么

项目中的文件如下所示:

Classes : source code (.m .c .cpp etc)

Resources : png file and other support files

Project folder : *.xib Info.plist

Makefile: Select all

PREFIX = arm-apple-darwin9-

###/////////////////////////////////////////////////////////////

### Executable files

###/////////////////////////////////////////////////////////////

CC = $(PREFIX)gcc

CXX = $(PREFIX)g++

LD = $(CC)

AR = $(PREFIX)ar

STRIP = $(PREFIX)strip

OBJCOPY = $(PREFIX)objcopy

####################################################################################

## debug/release

DEBUG ?= n

DEVEL ?= n

## SDK版本

SDKVER = 3.1.2

## iPhone的IP地址

IPHONE_IP = 10.0.2.2

## iPhone SDK路径

IPHONESDK = /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS$(SDKVER).sdk

## include 路径

INCPATH += -I"$(IPHONESDK)/usr/include"

INCPATH += -I"/Developer/Platforms/iPhoneOS.platform/Developer/usr/lib/gcc/arm-apple-darwin9/4.2/include/"

INCPATH += -I"/Developer/Platforms/iPhoneOS.platform/Developer/usr/include/"

INCPATH += -I"/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator$(SDKVER).sdk/usr/include"

## 标准库或者框架的设置

LDFLAGS= -lobjc

-bind_at_load

-multiply_defined suppress

上一页  1 2 3 4  下一页

Tags:iPhone 开发 进阶

编辑录入:coldstar [复制链接] [打 印]
赞助商链接