1SHELL=/bin/bash
2
3TARGET       ?= android
4PRODUCT      ?= beagleboard
5ANDROID_ROOT ?= /Android/trunk/0xdroid/beagle-eclair
6KERNEL_ROOT  ?= /Android/trunk/0xdroid/kernel
7MLSDK_ROOT   ?= $(CURDIR)
8
9ifeq ($(VERBOSE),1)
10	DUMP=1>/dev/stdout
11else
12	DUMP=1>/dev/null
13endif
14
15include common.mk
16
17################################################################################
18## targets
19
20INV_ROOT = ../..
21LIB_FOLDERS  = $(INV_ROOT)/core/mllite/build/$(TARGET)
22ifeq ($(BUILD_MPL),1)
23	LIB_FOLDERS += $(INV_ROOT)/core/mpl/build/$(TARGET)
24endif
25APP_FOLDERS  = $(INV_ROOT)/simple_apps/mpu_iio/build/$(TARGET)
26APP_FOLDERS += $(INV_ROOT)/simple_apps/self_test/build/$(TARGET)
27APP_FOLDERS += $(INV_ROOT)/simple_apps/gesture_test/build/$(TARGET)
28
29INSTALL_DIR = $(CURDIR)
30
31################################################################################
32## macros
33
34define echo_in_colors
35	echo -ne "\e[1;34m"$(1)"\e[0m"
36endef
37
38################################################################################
39## rules
40
41.PHONY : all mllite mpl clean
42
43all:
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
51clean: 
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
59cleanall:
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
67install:
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