| BUILD_ROOT = $(shell pwd) |
| include Make.defines |
| |
| DIRS = liblynq_lib libql_lib_v2 libgsw_lib test helloworld |
| |
| all: |
| @echo $(ROOT) |
| @echo $(CC) |
| @echo $(OUT_DIR) |
| @rm -rf $(OUT_DIR) |
| @ [ ! -d out/bin ] && mkdir -p out/bin |
| @ [ ! -d out/lib ] && mkdir -p out/lib |
| @for i in $(DIRS); do \ |
| if [ -d $$i ];then \ |
| (cd $$i && echo "making $$i" && $(MAKE) ) || exit 1; \ |
| fi \ |
| done |
| @ if [ -e $(ROOT)/../marvell/linux/drivers/net/wireless/aic8800/aic8800_bsp/aic8800_bsp.ko ]; then \ |
| cp $(ROOT)/../marvell/linux/drivers/net/wireless/aic8800/aic8800_bsp/aic8800_bsp.ko $(ROOT)/rootfs/etc/wifi/; \ |
| fi |
| @ if [ -e $(ROOT)/../marvell/linux/drivers/net/wireless/aic8800/aic8800_fdrv/aic8800_fdrv.ko ]; then \ |
| cp $(ROOT)/../marvell/linux/drivers/net/wireless/aic8800/aic8800_fdrv/aic8800_fdrv.ko $(ROOT)/rootfs/etc/wifi/; \ |
| fi |
| @mkdir -p $(ROOT)/rootfs/etc/imu/ |
| @ if [ -e $(ROOT)/../marvell/linux/drivers/iio/imu/st_asm330lhhx/st_asm330lhhx_i2c.ko ]; then \ |
| cp $(ROOT)/../marvell/linux/drivers/iio/imu/st_asm330lhhx/st_asm330lhhx_i2c.ko $(ROOT)/rootfs/etc/imu/; \ |
| fi |
| @ if [ -e $(ROOT)/../marvell/linux/drivers/iio/imu/st_asm330lhhx/st_asm330lhhx.ko ]; then \ |
| cp $(ROOT)/../marvell/linux/drivers/iio/imu/st_asm330lhhx/st_asm330lhhx.ko $(ROOT)/rootfs/etc/imu/; \ |
| fi |
| @ if [ -e $(ROOT)/../marvell/linux/drivers/iio/buffer/industrialio-triggered-buffer.ko ]; then \ |
| cp $(ROOT)/../marvell/linux/drivers/iio/buffer/industrialio-triggered-buffer.ko $(ROOT)/rootfs/etc/imu/; \ |
| fi |
| @echo "Success" |
| |
| clean: |
| @for i in $(DIRS); do \ |
| if [ -d $$i ];then \ |
| (cd $$i && echo "Cleaning $$i" && $(MAKE) clean) || exit 1; \ |
| fi \ |
| done |
| rm -rf $(OUT_DIR) |