1 2################################################################################ 3# 4# Copyright (c) 2008-2009 MStar Semiconductor, Inc. 5# All rights reserved. 6# 7# Unless otherwise stipulated in writing, any and all information contained 8# herein regardless in any format shall remain the sole proprietary of 9# MStar Semiconductor Inc. and be kept in strict confidence 10# ("MStar Confidential Information") by the recipient. 11# Any unauthorized act including without limitation unauthorized disclosure, 12# copying, use, reproduction, sale, distribution, modification, disassembling, 13# reverse engineering and compiling of the contents of MStar Confidential 14# Information is unlawful and strictly prohibited. MStar hereby reserves the 15# rights to any and all damages, losses, costs and expenses resulting therefrom. 16# 17# 18# Makefile used for building DDI 19# 20# 21################################################################################ 22 23ROOT = . 24TRUNK = . 25PRJ ?= t3_nos 26TARGET ?= t3_nos 27 28ADD ?= 29PROJECT_DIR = $(TRUNK)/../../../../project/$(PRJ) 30LIB_DIR_ = $(PROJECT_DIR)/bsp/lib 31INC_DIR_ = $(PROJECT_DIR)/bsp/include 32 33 34OUT_TRUNK = $(TRUNK)/../../../../../SxLib/XDemux/MediaCodec_T3/interface/kernel/drv_bsp 35OUT_LIB_DIR ?= $(OUT_TRUNK)/$(TARGET)/lib 36OUT_INC_DIR ?= $(OUT_TRUNK)/$(TARGET)/include 37 38 39include install.mk 40 41ifeq ($(PRJ),u3_nos) 42all: jpeg 43jpeg: init 44else 45all: jpeg $(ADD) 46jpeg $(ADD): init 47endif 48 49ifneq ($(LINK_TYPE),dynamic) 50 @make -C $(PROJECT_DIR) --no-print-directory MAKE_TYPE=lint $@ > /dev/null 51 @make -C $(PROJECT_DIR) --no-print-directory $@ lint 52else 53 @make -C $(PROJECT_DIR) --no-print-directory $@ 54endif 55 56install: init bsp 57 @for i in $(INSTALL_INC_FILES); do \ 58 if [ $(INC_DIR_)/$$i -nt $(OUT_INC_DIR)/$$i ]; \ 59 then cp -f $(INC_DIR_)/$$i $(OUT_INC_DIR); \ 60 fi \ 61 done; 62 @for i in $(INSTALL_LIB_FILES); do \ 63 if [ $(LIB_DIR_)/$$i -nt $(OUT_LIB_DIR)/$$i ]; \ 64 then cp -f $(LIB_DIR_)/$$i $(OUT_LIB_DIR); \ 65 fi \ 66 done; 67 68 69init: 70 @rm -rfd $(PROJECT_DIR)/bsp 71 72clean: 73 @make -C $(PROJECT_DIR) --no-print-directory $@ 74 @rm -rfd $(PROJECT_DIR)/bsp 75 @rm -f $(PROJECT_DIR)/lint_test.log 76 77bsp: 78 @make -C $(PROJECT_DIR) --no-print-directory $@ 79