xref: /utopia/UTPA2-700.0.x/modules/mvop/drv/mvop/utl/Makefile (revision 53ee8cc121a030b8d368113ac3e966b4705770ef)
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      ?= t2_nos
26TARGET   ?= s4le_nos
27
28
29PROJECT_DIR = $(TRUNK)/../../../../project/$(PRJ)
30LIB_DIR_  = $(PROJECT_DIR)/bsp/lib
31INC_DIR_  = $(PROJECT_DIR)/bsp/include
32
33OUT_TRUNK = $(TRUNK)/../../../../../../DAILEO/Yoga/Chakra2
34OUT_LIB_DIR ?= $(OUT_TRUNK)/core/drv_bsp/$(TARGET)/lib
35OUT_INC_DIR ?= $(OUT_TRUNK)/core/drv_bsp/$(TARGET)/include
36
37include install.mk
38
39
40all: mvop
41mvop: init
42
43
44ifneq ($(LINK_TYPE),dynamic)
45	@make -C $(PROJECT_DIR) --no-print-directory MAKE_TYPE=lint $@ > /dev/null
46	@make -C $(PROJECT_DIR) --no-print-directory $@ lint
47else
48	@make -C $(PROJECT_DIR) --no-print-directory $@
49endif
50
51install: init bsp
52	@for i in $(INSTALL_INC_FILES); do	\
53	    if [ $(INC_DIR_)/$$i -nt $(OUT_INC_DIR)/$$i ]; \
54		then cp -f $(INC_DIR_)/$$i $(OUT_INC_DIR); \
55	    fi 						\
56	done;
57	@for i in $(INSTALL_LIB_FILES); do	\
58	    if [ $(LIB_DIR_)/$$i -nt $(OUT_LIB_DIR)/$$i ]; \
59		then cp -f $(LIB_DIR_)/$$i $(OUT_LIB_DIR); \
60	    fi 						\
61	done;
62
63init:
64	@rm -rfd $(PROJECT_DIR)/bsp
65
66clean:
67	@make -C $(PROJECT_DIR) --no-print-directory $@
68	@rm -rfd $(PROJECT_DIR)/bsp
69	@rm -f $(PROJECT_DIR)/lint_test.log
70
71bsp:
72	@make -C $(PROJECT_DIR) --no-print-directory $@
73