Permalink
Browse files

Make Android.mk integrate properly

  • Loading branch information...
1 parent 131a27d commit 7dc8052a09ea684200e86e0c340be80854521bdf @michaelwu michaelwu committed Mar 16, 2012
Showing with 10 additions and 9 deletions.
  1. +10 −9 Android.mk
View
@@ -1,3 +1,5 @@
+LOCAL_PATH := $(call my-dir)
+
include $(CLEAR_VARS)
BB_TC_DIR := $(shell dirname $(TARGET_TOOLS_PREFIX))
@@ -10,17 +12,16 @@ ifneq ($(strip $(SHOW_COMMANDS)),)
BB_VERBOSE="V=1"
endif
-.PHONY: busybox
-
-droid: busybox
+LOCAL_MODULE := busybox
+LOCAL_MODULE_CLASS := EXECUTABLES
+LOCAL_MODULE_TAGS := optional
+LOCAL_SRC_FILES := busybox
-systemtarball: busybox
+include $(BUILD_PREBUILT)
-busybox: $(TARGET_CRTBEGIN_DYNAMIC_O) $(TARGET_CRTEND_O) $(TARGET_OUT_STATIC_LIBRARIES)/libm.so $(TARGET_OUT_STATIC_LIBRARIES)/libc.so $(TARGET_OUT_STATIC_LIBRARIES)/libdl.so
+$(LOCAL_PATH)/busybox: $(TARGET_CRTBEGIN_DYNAMIC_O) $(TARGET_CRTEND_O) $(TARGET_OUT_STATIC_LIBRARIES)/libm.so $(TARGET_OUT_STATIC_LIBRARIES)/libc.so $(TARGET_OUT_STATIC_LIBRARIES)/libdl.so
cd external/busybox && \
sed -e "s|^CONFIG_CROSS_COMPILER_PREFIX=.*|CONFIG_CROSS_COMPILER_PREFIX=\"$(BB_TC_PREFIX)\"|;s|^CONFIG_EXTRA_CFLAGS=.*|CONFIG_EXTRA_CFLAGS=\"$(BB_COMPILER_FLAGS)\"|" configs/android_defconfig >.config && \
export PATH=$(BB_TC_DIR):$(PATH) && \
- $(MAKE) oldconfig && \
- $(MAKE) $(BB_VERBOSE) EXTRA_LDFLAGS="$(BB_LDFLAGS)" LDLIBS="$(BB_LDLIBS)" && \
- mkdir -p ../../$(PRODUCT_OUT)/system/bin && \
- cp busybox ../../$(PRODUCT_OUT)/system/bin/
+ $(MAKE) oldconfig > /dev/null && \
+ $(MAKE) $(BB_VERBOSE) EXTRA_LDFLAGS="$(BB_LDFLAGS)" LDLIBS="$(BB_LDLIBS)"

0 comments on commit 7dc8052

Please sign in to comment.