xref: /utopia/UTPA2-700.0.x/modules/ojpd_vdec_v1/api/jpeg/project/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
27CHIPS    ?= s4le
28ADD      ?=
29PROJECT_DIR = $(TRUNK)/../../../../project/$(PRJ)
30LIB_DIR_  = $(PROJECT_DIR)/bsp/lib
31INC_DIR_  = $(PROJECT_DIR)/bsp/include
32FW_DIR_  = $(PROJECT_DIR)/bsp/bin
33
34OUT_TRUNK = $(TRUNK)/../../../../../../DAILEO/Yoga/Chakra2
35OUT_LIB_DIR ?= $(OUT_TRUNK)/core/drv_bsp/$(TARGET)/lib
36OUT_INC_DIR ?= $(OUT_TRUNK)/core/drv_bsp/$(TARGET)/include
37OUT_FW_DIR ?= $(OUT_TRUNK)/core/bin/$(CHIPS)/vdec
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	@for i in $(INSTALL_FW_FILES); do	\
68	    if [ $(FW_DIR_)/$$i -nt $(OUT_FW_DIR)/$$i ]; \
69		then cp -f $(FW_DIR_)/$$i $(OUT_FW_DIR); \
70	    fi 						\
71	done;
72
73init:
74	@rm -rfd $(PROJECT_DIR)/bsp
75
76clean:
77	@make -C $(PROJECT_DIR) --no-print-directory $@
78	@rm -rfd $(PROJECT_DIR)/bsp
79	@rm -f $(PROJECT_DIR)/lint_test.log
80
81bsp:
82	@make -C $(PROJECT_DIR) --no-print-directory $@
83