WEB开发网
开发学院手机开发Android 开发 Android 开发基础知识 阅读

Android 开发基础知识

 2010-05-28 15:50:00 来源:WEB开发网   
核心提示:choices 的值为:build/target/board/emulator/BoardConfig.mkbuild/target/board/generic/BoardConfig.mkbuild/target/board/sim/BoardConfig.mkvendor/marvell/littleton/Boa

choices 的值为:

build/target/board/emulator/BoardConfig.mk

build/target/board/generic/BoardConfig.mk

build/target/board/sim/BoardConfig.mk

vendor/marvell/littleton/BoardConfig.mk

经过:

for choice in ${choices[@]}

do

# The product name is the name of the directory containing

# the makefile we found, above.

prodlist=(${prodlist[@]} `dirname ${choice} | xargs basename`)

done

的处理,prodlist的值为:

emulator generic sim littleton

所以选择菜单为:

Product choices are:

1. emulator

2. generic

3. sim

4. littleton

如果选择 4,那么 TARGET_PRODUCT 被赋值为: littleton。

board_config_mk :=

$(strip $(wildcard

$(SRC_TARGET_DIR)/board/$(TARGET_DEVICE)/BoardConfig.mk

vendor/*/$(TARGET_DEVICE)/BoardConfig.mk

))

怎样添加一个模块

LOCAL_PATH:= $(call my-dir)

#编译静态库

include $(CLEAR_VARS)

LOCAL_MODULE = libhellos

LOCAL_CFLAGS = $(L_CFLAGS)

LOCAL_SRC_FILES = hellos.c

LOCAL_C_INCLUDES = $(INCLUDES)

LOCAL_SHARED_LIBRARIES := libcutils

LOCAL_COPY_HEADERS_TO := libhellos

LOCAL_COPY_HEADERS := hellos.h

include $(BUILD_STATIC_LIBRARY)

#编译动态库

include $(CLEAR_VARS)

LOCAL_MODULE = libhellod

LOCAL_CFLAGS = $(L_CFLAGS)

LOCAL_SRC_FILES = hellod.c

LOCAL_C_INCLUDES = $(INCLUDES)

LOCAL_SHARED_LIBRARIES := libcutils

LOCAL_COPY_HEADERS_TO := libhellod

LOCAL_COPY_HEADERS := hellod.h

include $(BUILD_SHARED_LIBRARY)

BUILD_TEST=true

ifeq ($(BUILD_TEST),true)

#使用静态库

include $(CLEAR_VARS)

上一页  4 5 6 7 8 9 10 11 12 13 14  下一页

Tags:Android 开发 基础知识

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