host Executable: acp (out/host/linux-x86/obj/EXECUTABLES/acp_intermediates/acp)
host SharedLib: libneo_cs (out/host/linux-x86/obj/lib/libneo_cs.so)
host C++: libutils <= frameworks/base/libs/utils/RefBase.cpp
frameworks/base/libs/utils/RefBase.cpp: In member function ‘void android::RefBase::weakref_type::trackMe(bool, bool)’:
frameworks/base/libs/utils/RefBase.cpp:483:67: error: passing ‘const android::RefBase::weakref_impl’ as ‘this’ argument of ‘void android::RefBase::weakref_impl::trackMe(bool, bool)’ discards qualifiers [-fpermissive]
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libutils_intermediates/RefBase.o] Error 1
make: *** Waiting for unfinished jobs....
diff frameworks/base/libs/utils/Android.mk - LOCAL_CFLAGS += -DLIBUTILS_NATIVE=1 $(TOOL_CFLAGS) + LOCAL_CFLAGS += -DLIBUTILS_NATIVE=1 $(TOOL_CFLAGS) -fpermissive
host Executable: aapt (out/host/linux-x86/obj/EXECUTABLES/aapt_intermediates/aapt) out/host/linux-x86/obj/STATIC_LIBRARIES/libcutils_intermediates/libcutils.a(threads.o): In function `thread_store_get': android/bin/system/core/libcutils/threads.c:27: undefined reference to `pthread_getspecific' out/host/linux-x86/obj/STATIC_LIBRARIES/libcutils_intermediates/libcutils.a(threads.o): In function `thread_store_set': android/bin/system/core/libcutils/threads.c:36: undefined reference to `pthread_key_create' android/bin/system/core/libcutils/threads.c:44: undefined reference to `pthread_setspecific' collect2: ld returned 1 exit status make: *** [out/host/linux-x86/obj/EXECUTABLES/aapt_intermediates/aapt] error 1
diff frameworks/base/tools/appt/Android.mk ifeq ($(HOST_OS),linux) -LOCAL_LDLIBS += -lrt +LOCAL_LDLIBS += -lrt -lpthread endif
out/host/linux-x86/obj/STATIC_LIBRARIES/libcutils_intermediates/libcutils.a(threads.o): In function `thread_store_get': android/bin/system/core/libcutils/threads.c:27: undefined reference to `pthread_getspecific' out/host/linux-x86/obj/STATIC_LIBRARIES/libcutils_intermediates/libcutils.a(threads.o): In function `thread_store_set': android/bin/system/core/libcutils/threads.c:36: undefined reference to `pthread_key_create' android/bin/system/core/libcutils/threads.c:44: undefined reference to `pthread_setspecific' collect2: ld returned 1 exit status make: *** [out/host/linux-x86/obj/EXECUTABLES/localize_intermediates/localize] error 1
diff frameworks/base/tools/localize/Android.mk ifeq ($(HOST_OS),linux) -LOCAL_LDLIBS += -lrt +LOCAL_LDLIBS += -lrt -lpthread endif
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
# our own branch needs these headers
LOCAL_C_INCLUDES += \
vendor/mokoid/hardware/modules/include/
編譯此 project 時所使用的 include 檔位置
Android build system 會指名自己的 includes files path, 而各個 project 可自行指名所使用的 include path
#include "a.h"
編譯系統會到 LOCAL_C_INCLUDES 找這個 header file.
LOCAL_PRELINK_MODULE := false
LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw
LOCAL_SHARED_LIBRARIES := liblog
編譯本 modules 所需使用的其他 modules
Android build system 會以所有 Android.mk 中的 LOCAL_MODULE 的名字命名.
並依該 modules 所使用的 SHARED_LIBRARIES 去建立 building tree
以這個例子來說, 要編 led.goldfish 需先編譯 liblog 這個 modules
LOCAL_SRC_FILES := led.c
本 modules 的 c code
LOCAL_MODULE := led.goldfish
#LOCAL_MODULE := led.dma6410xp
上述的此 modules name
include $(BUILD_SHARED_LIBRARY)
# hardware/libaudio-alsa/Android.mk
# Copyright 2008 Wind River Systems
#
ifeq ($(strip $(BOARD_USES_ALSA_AUDIO)),true)
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_ARM_MODE := arm
LOCAL_CFLAGS := -D_POSIX_SOURCE
LOCAL_WHOLE_STATIC_LIBRARIES := libasound
ifneq ($(ALSA_DEFAULT_SAMPLE_RATE),)
LOCAL_CFLAGS += -DALSA_DEFAULT_SAMPLE_RATE=$(ALSA_DEFAULT_SAMPLE_RATE)
endif
ifeq ($(strip $(BOARD_HAVE_FM_ROUTING)),true)
LOCAL_CFLAGS += -DFM_ROUTE_SUPPORT
endif
LOCAL_C_INCLUDES += external/alsa-lib/include
LOCAL_SRC_FILES := AudioHardwareALSA.cpp
LOCAL_MODULE := libaudio
LOCAL_STATIC_LIBRARIES += libaudiointerface
LOCAL_SHARED_LIBRARIES := \
libcutils \
libutils \
libmedia \
libhardware \
libhardware_legacy \
libdl \
libc
include $(BUILD_SHARED_LIBRARY)
include $(CLEAR_VARS)
LOCAL_PRELINK_MODULE := false
LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw
LOCAL_CFLAGS := -D_POSIX_SOURCE -Wno-multichar
給 gcc 用的 flag, 這部份詳細下法必須參考 gcc manual
這跟 pkg-config 沒有關係
LOCAL_C_INCLUDES += external/alsa-lib/include
LOCAL_SRC_FILES:= acoustics_default.cpp
LOCAL_SHARED_LIBRARIES := liblog
LOCAL_MODULE:= acoustics.default
include $(BUILD_SHARED_LIBRARY)
endif
repo init -u git://android.git.kernel.org/platform/manifest.gitrepo init -u git://gitorious.org/0xdroid/manifest.git -b beagle-cupcakerepo init -u git://labs.embinux.org/repo/android/platform/beaglemanifest.git/ repo init -u git://labs.embinux.org/omap3donut/repo/android/platform/omap3donutmanifest.git/ repo init -u git://github.com/abstrakraft/android-manifest.gitrepo init -u git://public.mipsandroid.com/mips/platform/manifest.git -b mips-cupcakerepo init -u git://git.android-x86.org/platform/manifest.gitrepo init -u ssh://140.92.60.250//opt/repos/staffs/kywk/android/m.git -b nmi-arm-v7 -m nmi-arm-v7.xmlrepo init -u ssh://140.92.60.250//opt/repos/staffs/kywk/android/m.git -b nmi-x86-atom -m nmi-x86-atom.xml