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)
28APP_FOLDERS += $(INV_ROOT)/simple_apps/playback/linux/build/$(TARGET)
29APP_FOLDERS += $(INV_ROOT)/simple_apps/devnode_parser/build/$(TARGET)
30
31INSTALL_DIR = $(CURDIR)
32
33################################################################################
34## macros
35
36define echo_in_colors
37	echo -ne "\e[1;34m"$(1)"\e[0m"
38endef
39
40################################################################################
41## rules
42
43.PHONY : all mllite mpl clean
44
45all:
46	for DIR in $(LIB_FOLDERS); do (				\
47		cd $$DIR && $(MAKE) -f shared.mk $@ ); 	\
48	done
49	for DIR in $(APP_FOLDERS); do (				\
50		cd $$DIR && $(MAKE) -f shared.mk $@ ); 	\
51	done
52
53clean: 
54	for DIR in $(LIB_FOLDERS); do (				\
55		cd $$DIR && $(MAKE) -f shared.mk $@ ); 	\
56	done
57	for DIR in $(APP_FOLDERS); do (				\
58		cd $$DIR && $(MAKE) -f shared.mk $@ ); 	\
59	done
60
61cleanall:
62	for DIR in $(LIB_FOLDERS); do (				\
63		cd $$DIR && $(MAKE) -f shared.mk $@ ); 	\
64	done
65	for DIR in $(APP_FOLDERS); do (				\
66		cd $$DIR && $(MAKE) -f shared.mk $@ ); 	\
67	done
68
69install:
70	for DIR in $(LIB_FOLDERS); do (				\
71		cd $$DIR && $(MAKE) -f shared.mk $@ ); 	\
72	done
73	for DIR in $(APP_FOLDERS); do (				\
74		cd $$DIR && $(MAKE) -f shared.mk $@ ); 	\
75	done
76
77