1 SHELL=/bin/bash 2 3 TARGET ?= android 4 PRODUCT ?= beagleboard 5 ANDROID_ROOT ?= /Android/trunk/0xdroid/beagle-eclair 6 KERNEL_ROOT ?= /Android/trunk/0xdroid/kernel 7 MLSDK_ROOT ?= $(CURDIR) 8 9 ifeq ($(VERBOSE),1) 10 DUMP=1>/dev/stdout 11 else 12 DUMP=1>/dev/null 13 endif 14 15 include common.mk 16 17 ################################################################################ 18 ## targets 19 20 INV_ROOT = ../.. 21 LIB_FOLDERS = $(INV_ROOT)/core/mllite/build/$(TARGET) 22 ifeq ($(BUILD_MPL),1) 23 LIB_FOLDERS += $(INV_ROOT)/core/mpl/build/$(TARGET) 24 endif 25 APP_FOLDERS = $(INV_ROOT)/simple_apps/mpu_iio/build/$(TARGET) 26 APP_FOLDERS += $(INV_ROOT)/simple_apps/self_test/build/$(TARGET) 27 APP_FOLDERS += $(INV_ROOT)/simple_apps/gesture_test/build/$(TARGET) 28 29 INSTALL_DIR = $(CURDIR) 30 31 ################################################################################ 32 ## macros 33 34 define echo_in_colors 35 echo -ne "\e[1;34m"$(1)"\e[0m" 36 endef 37 38 ################################################################################ 39 ## rules 40 41 .PHONY : all mllite mpl clean 42 43 all: 44 for DIR in $(LIB_FOLDERS); do ( \ 45 cd $$DIR && $(MAKE) -f shared.mk $@ ); \ 46 done 47 for DIR in $(APP_FOLDERS); do ( \ 48 cd $$DIR && $(MAKE) -f shared.mk $@ ); \ 49 done 50 51 clean: 52 for DIR in $(LIB_FOLDERS); do ( \ 53 cd $$DIR && $(MAKE) -f shared.mk $@ ); \ 54 done 55 for DIR in $(APP_FOLDERS); do ( \ 56 cd $$DIR && $(MAKE) -f shared.mk $@ ); \ 57 done 58 59 cleanall: 60 for DIR in $(LIB_FOLDERS); do ( \ 61 cd $$DIR && $(MAKE) -f shared.mk $@ ); \ 62 done 63 for DIR in $(APP_FOLDERS); do ( \ 64 cd $$DIR && $(MAKE) -f shared.mk $@ ); \ 65 done 66 67 install: 68 for DIR in $(LIB_FOLDERS); do ( \ 69 cd $$DIR && $(MAKE) -f shared.mk $@ ); \ 70 done 71 for DIR in $(APP_FOLDERS); do ( \ 72 cd $$DIR && $(MAKE) -f shared.mk $@ ); \ 73 done 74 75