source: svn/newcon3bcm2_21bu/nexus/lib/ipc/build/Makefile

Last change on this file was 76, checked in by megakiss, 10 years ago

1W 대기전력을 만족시키기 위하여 POWEROFF시 튜너를 Standby 상태로 함

  • Property svn:executable set to *
File size: 5.2 KB
Line 
1############################################################################
2#     (c)2011-2011 Broadcom Corporation
3
4#  This program is the proprietary software of Broadcom Corporation and/or its licensors,
5#  and may only be used, duplicated, modified or distributed pursuant to the terms and
6#  conditions of a separate, written license agreement executed between you and Broadcom
7#  (an "Authorized License").  Except as set forth in an Authorized License, Broadcom grants
8#  no license (express or implied), right to use, or waiver of any kind with respect to the
9#  Software, and Broadcom expressly reserves all rights in and to the Software and all
10#  intellectual property rights therein.  IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU
11#  HAVE NO RIGHT TO USE THIS SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY
12#  NOTIFY BROADCOM AND DISCONTINUE ALL USE OF THE SOFTWARE. 
13#   
14#  Except as expressly set forth in the Authorized License,
15#   
16#  1.     This program, including its structure, sequence and organization, constitutes the valuable trade
17#  secrets of Broadcom, and you shall use all reasonable efforts to protect the confidentiality thereof,
18#  and to use this information only in connection with your use of Broadcom integrated circuit products.
19#   
20#  2.     TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS"
21#  AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, REPRESENTATIONS OR
22#  WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH RESPECT TO
23#  THE SOFTWARE.  BROADCOM SPECIFICALLY DISCLAIMS ANY AND ALL IMPLIED WARRANTIES
24#  OF TITLE, MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE,
25#  LACK OF VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION
26#  OR CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT OF
27#  USE OR PERFORMANCE OF THE SOFTWARE.
28
29#  3.     TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR ITS
30#  LICENSORS BE LIABLE FOR (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR
31#  EXEMPLARY DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO YOUR
32#  USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM HAS BEEN ADVISED OF
33#  THE POSSIBILITY OF SUCH DAMAGES; OR (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT
34#  ACTUALLY PAID FOR THE SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE
35#  LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF ESSENTIAL PURPOSE OF
36#  ANY LIMITED REMEDY.
37#
38# $brcm_Workfile: Makefile $
39# $brcm_Revision: 1 $
40# $brcm_Date: 10/4/11 5:44p $
41#
42# Module Description:
43#
44# Revision History:
45#
46# $brcm_Log: /nexus/lib/ipc/build/Makefile $
47#
48# 1   10/4/11 5:44p vsilyaev
49# SW7425-1364: Reference applicaion IPC and reference server
50#
51###########################################################################
52
53ifdef COMSPEC
54# Any DOS environment
55NEXUS_TOP := $(shell cd ../../.. && cd)
56else
57NEXUS_TOP := $(shell cd ../../..; pwd)
58endif
59BSEAV := ${NEXUS_TOP}/../BSEAV
60MAGNUM := ${NEXUS_TOP}/../magnum
61ifdef B_REFSW_ARCH
62CUSTOM_FLAGS := 1
63endif
64
65# include cross-compiler definitions
66ifeq ($(NEXUS_PREBUILT_BINARY),y)
67# do "make api" and "make nexus_headers" first, then "make NEXUS_PREBUILT_BINARY=y"
68include $(NEXUS_TOP)/bin/include/platform_app.inc
69Q_ ?= @
70else
71NEXUS_PLATFORM ?= $(PLATFORM)
72ifeq ($(NEXUS_PLATFORM),)
73$(error NEXUS_PLATFORM is not defined)
74endif
75include $(NEXUS_TOP)/platforms/$(NEXUS_PLATFORM)/build/platform_app.inc
76endif
77
78
79
80# need this for CHIP definitions
81include $(BSEAV)/api/build/tools.mak
82
83ifndef CUSTOM_FLAGS
84CFLAGS += $(NEXUS_CFLAGS) 
85else
86CFLAGS += -DBSTD_CPU_ENDIAN=BSTD_ENDIAN_LITTLE -DBDBG_DEBUG_BUILD=1  -g -O
87endif
88CFLAGS += $(addprefix -I,$(NEXUS_APP_INCLUDE_PATHS)) $(addprefix -D,$(NEXUS_APP_DEFINES))
89   
90   
91
92
93include $(BSEAV)/build/refsw_inc.mak
94
95ODIR = $(B_REFSW_ARCH).$(DEBUG_SUFFIX)
96OS = ${B_REFSW_OS}
97
98include $(MAGNUM)/basemodules/kni/bkni.inc
99include $(MAGNUM)/basemodules/dbg/bdbg.inc
100
101#CFLAGS += $(addprefix -I, $(foreach module, $(MAGNUM_MODULES), $($(module)_INCLUDES)))
102#CFLAGS += $(addprefix -D, $(foreach module, $(MAGNUM_MODULES), $($(module)_DEFINES)))
103SRCS += $(notdir $(foreach module, $(MAGNUM_MODULES), $($(module)_SOURCES)))
104vpath %.c $(dir $(foreach module, $(MAGNUM_MODULES), $($(module)_SOURCES)))
105
106CFLAGS += -I.. -I${ODIR}
107vpath %.c ..
108
109SERVER_SRCS := bipc_server.c bipc_util.c bipc_server_test.c ${SRCS} 
110CLIENT_SRCS := bipc_client.c bipc_util.c bipc_client_test.c ${SRCS} 
111
112INTERFACES =  bsspk_decoder.h bsac_session.h
113CLIENT_IPC = ${ODIR}/ipc_client.h
114SERVER_IPC = ${ODIR}/ipc_server.h
115
116SERVER = ${ODIR}/server
117CLIENT = ${ODIR}/client
118
119ifeq (${OS},linuxuser)
120LDFLAGS += -lpthread
121endif
122
123all: ${ODIR}/flag apps
124
125.NOTPARALLEL:
126
127apps: ${SERVER} ${CLIENT}
128
129${ODIR}/flag:
130        @${MKDIR} ${ODIR}
131        @${TOUCH} $@
132
133${SERVER_IPC} ${CLIENT_IPC}: ${INTERFACES} ${bipc_build.pl}
134        perl -I ${NEXUS_TOP}/build/tools/common bipc_build.pl ${SERVER_IPC} ${CLIENT_IPC} ${INTERFACES}
135
136${SERVER}: ${SERVER_SRCS} ${SERVER_IPC}
137        @echo $(CC) -o $@
138        $(Q_)$(CC) -o $@ $(filter-out %.h, $^) $(CFLAGS) $(LDFLAGS)
139
140${CLIENT}: ${CLIENT_SRCS} ${CLIENT_IPC}
141        @echo $(CC) -o $@
142        $(Q_)$(CC) -o $@ $(filter-out %.h, $^) $(CFLAGS) $(LDFLAGS)
143
144debug: apps
145        echo "set args ${CLIENT}" >.gdbinit
146        echo "r" >>.gdbinit
147        gdb ${SERVER}
148        rm .gdbinit
149
150test: apps
151        ${SERVER} ${CLIENT}
152
153clean:
154        ${RM} -rf ${ODIR}
155
156
157
Note: See TracBrowser for help on using the repository browser.