source: svn/newcon3bcm2_21bu/nexus/lib/playback_ip/apps/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: 21.7 KB
Line 
1############################################################
2#     (c)2008-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: 56 $
40# $brcm_Date: 12/13/11 7:33p $
41#
42#
43# Module Description:
44#
45# Revision History:
46#
47# $brcm_Log: /nexus/lib/playback_ip/apps/Makefile $
48#
49# 56   12/13/11 7:33p ssood
50# SW7231-516: enabled support for local display while encoding & live
51#  channels encoding & streaming out using raaga dsp
52#
53# 55   12/8/11 7:40p ssood
54# SW7231-516: enhance ip_streamer to stream out raaga encoded TS streams
55#  from live or file sources
56#
57# 54   10/31/11 5:54p ssood
58# SW7425-889: build tshdrbuilder library outside of netaccel
59#
60# 53   10/18/11 7:25a ssood
61# SW7425-889: enabled audio in the live xcoded streams for streaming to
62#  iOS devices
63#
64# 52   10/7/11 11:32a ssood
65# SW7425-1436: Rename DEBUG to B_REFSW_DEBUG
66#
67# 51   9/19/11 1:50p ssood
68# SW7425-1040: added logic to better handle network congestion
69#
70# 50   8/21/11 10:40p ssood
71# SW7425-1040: correct dtcp flags to turn off h/w decryption & encryption
72#
73# 49   8/7/11 7:00p ssood
74# SW7425-1040: more changes to support FCC over IP sessions
75#
76# 48   7/14/11 12:01p ssood
77# SW7346-309: Add support for Streaming from Satellite Source
78#
79# 47   6/6/11 1:35a ssood
80# SW7231-166: refine trickplay rates, account for timeSeekEnd from
81#  ip_client
82#
83# 46   5/12/11 4:21p ssood
84# SW7420-741: change the default B_REFSW_ARCH value to mipsel-linux so
85#  that it matches reference sw value while building ip apps
86#
87# 45   5/3/11 3:49p ssood
88# SW7425-492: dont include netaccel header file for non-netaccel builds
89#
90# 44   3/9/11 7:47p ssood
91# SW7420-1617: use B_REFSW_ARCH instead of ARCH for default arch variable
92#
93# 43   12/31/10 3:25p ssood
94# SW7425-59: add change to support clean stop/stop sequence w/ 7425
95#  xcoder + insert PAT/PMT into outgoing stream
96#
97# 42   12/30/10 12:55p ssood
98# SW7425-59: initial 7425 transcoder support on h/w platform (no PSI, no
99#  PCRs, no Audio in xcoded stream)
100#
101# 41   12/14/10 12:08p ssood
102# SW7420-1217: add support for encryption key parsing, downloading and
103#  receiving encrypted content
104#
105# 40   12/13/10 10:30p ssood
106# SW7420-1257: add compile time option to support streaming out LIVE
107#  channels (mainly for Live IP channels)
108#
109# 39   11/24/10 2:58p ssood
110# SW7420-1257: Video Conferencing Demo: add support for receiving input
111#  camera input and stream it out
112#
113# 38   9/17/10 8:21a ssood
114# SWGERRARD-547: support to expose multiple multiple programs and tracks
115#  within a multi-program stream
116#
117# 37   9/2/10 2:51p garetht
118# SW7420-1046: Add support for sending 6xQAM256 streams to the cablecard
119#
120# 36   8/6/10 11:24a garetht
121# SW7420-919: Add support for DSG CableCARD
122#
123# 35   7/30/10 3:42p garetht
124# SW7420-919: Add CableCARD support to Ip_streamer
125#
126# 34   7/30/10 3:19p ssood
127# SW7420-883: add support to transcode/pass-thru audio to IP Streamer
128#
129# 33   7/27/10 2:08p ssood
130# SW7420-883: add transcoding support to IP Streamer (no audio
131#  transcoding yet)
132#
133# 32   5/18/10 1:31p sgundime
134# SW7420-559: set env. variable EROUTER_SUPPORT=n to build dms stand
135#  alone with out eRouter support.
136#
137# 31   4/26/10 6:00p mward
138# SW7400-2511: don't add B_REFSW_ to ARCH, BSEAV build system uses ARCH.
139#
140# 30   4/23/10 9:19a mward
141# SW7125-325: B_REFSW_ARCH is now used by liveMedia.
142#
143# 29   4/22/10 4:13p mward
144# SW7400-2511: don't add B_REFSW_ to ARCH, BSEAV build system uses ARCH.
145#
146# 28   4/22/10 12:06p mward
147# SW7400-2511: add B_REFSW_ or NEXUS_ prefix to build variables
148# SW7125-325: must link c++ liveMedia lib using c++ when using stbgcc-
149#  4.4.3-1.0
150#
151# 27   4/2/10 5:58p ssood
152# SW7420-561: add support to handle large URLs (HTML5 URLs can be over
153#  256bytes) + Coverity fixes
154#
155# 26   3/16/10 12:46p ssood
156# SW7420-561: fixed an cp syntax error
157#
158# 25   3/15/10 3:13p ssood
159# SW7420-561: suppress the extra prints for default build
160#
161# 24   3/4/10 12:17p ssood
162# SW7420-561: merge from branch to mainline
163#
164# SW7420-561/2   3/1/10 7:51a ssood
165# SW7420-561: compile livemedia library only if LIVEMEDIA_SUPPORT is
166#  defined
167#
168# SW7420-561/1   2/16/10 10:11a ssood
169# SW7420-561: initial cut of new APIs to meet Media Browser, DMR, &
170#  Philips RTSP requirements
171#
172# 23   2/18/10 7:14p jrubio
173# SW7342-159: Do not compile nexus if being built from SETTOP API
174#
175# 22   2/3/10 6:05p ismailk
176# SW7420-570: Add 93380vms support to Makefile.
177#
178# 20   1/29/10 6:12p ismailk
179# SW7420-559: Enable EROUTER_SUPPORT flag to enable the WAN unicast
180#  ioctl.
181#
182# 19   1/28/10 12:14p ssood
183# SW7420-454: define RAD_EA flag is RAD_EA_SUPPORT is enabled
184#
185# 18   1/27/10 10:18a ssood
186# SW7420-454: conditionally compile Live Streaming Code using
187#  LIVE_STREAMING_SUPPORT
188#
189# 17   1/26/10 4:54p ssood
190# SW7420-454: added command to clean nexus build as well
191#
192# 16   1/26/10 4:43p ssood
193# SW7420-454: set defult build mode to DEBUG if not defined
194#
195# 15   1/25/10 6:35p ssood
196# SW7420-454: set default ARCH if not defined
197#
198# 14   1/20/10 5:30p ssood
199# SW7420-454: added option to compile out auto PSI detection via
200#  AUTO_PSI_SUPPORT=n
201#
202# 13   12/10/09 7:29p ssood
203# SW7420-502: Added compile time flags to enable chunk encoding support
204#  on the server
205#
206# 12   11/17/09 2:58p ssood
207# SW7420-454: Enhance IP Streamer to stream files from local disk
208#
209# 11   10/20/09 6:33p ssood
210# SW7420-340: remove nexus playback, audio, video decoder dependencies
211#  for SMS compilation
212#
213# 10   10/13/09 6:19p ssood
214# SW7420-340: add option to enable kernel mode builds
215#
216# 9   10/7/09 3:46p ssood
217# SW7420-340: added STANDL
218#
219# 8   10/6/09 12:18p ssood
220# SW7420-340: Add DTCP/IP support to ip_streamer & IP Applib
221#
222# 7   9/30/09 9:50a ssood
223# SW7420-340: took out extra print statements
224#
225# 6   9/29/09 3:59p ssood
226# SW7420-340: add command to copy binaries for each app build also
227#
228# 5   9/24/09 9:02a ssood
229# SW7420-340: Copy binaries to Nexus bin directory as well
230#
231# 4   9/17/09 4:52p ssood
232# SW7420-340: dont compile settop api by default
233#
234# 3   9/17/09 2:58p ssood
235# SW7420-340: compiling for SMS
236#
237# 2   9/16/09 11:21a ssood
238# SW7420-340: modified binary name to ip_client
239#
240# 1   9/16/09 10:50a ssood
241# SW7420-340: Adding example apps for demonstrating IP Streaming & Client
242#  features of IP Applib
243#
244#
245############################################################
246
247ifdef COMSPEC
248# Any DOS environment
249NEXUS_TOP := $(shell cd ../../../../nexus && cd)
250else
251NEXUS_TOP := $(shell cd ../../../../nexus ; pwd)
252endif
253
254B_PSIP_TOP := $(NEXUS_TOP)/../rockford/lib/psip
255B_MPOD_TOP := $(NEXUS_TOP)/../rockford/lib/ocap/mpod
256
257BSEAV := $(NEXUS_TOP)/../BSEAV
258LIVEMEDIA_DIR := $(BSEAV)/lib/livemedia/live
259ifndef PLATFORM
260$(error PLATFORM is not defined)
261endif
262
263ifeq ($(findstring $(PLATFORM),93380sms), $(PLATFORM))
264CFLAGS += -DB_HAS_SMS_GATEWAY
265export SMS_GATEWAY=y
266ifneq ($(EROUTER_SUPPORT),n)
267export EROUTER_SUPPORT=y
268CFLAGS += -DEROUTER_SUPPORT
269endif
270
271# When compiling for SMS platforms, .inc files of Nexus Playback, Audio, Video modules are not included.
272# Thus, we explictly include their paths for header files.
273CFLAGS += -DNEXUS_HAS_PLAYBACK -I$(NEXUS_TOP)/modules/playback/include -I$(NEXUS_TOP)/modules/video_decoder/${BCHP_CHIP}/include -I$(NEXUS_TOP)/modules/audio/${BCHP_CHIP}/include
274endif
275
276ifeq ($(NEXUS_TRANSCODER_VDEC_97043),y)
277CFLAGS += -DNEXUS_TRANSCODER_VDEC_97043
278endif
279
280# enable IP Streamer in demo mode (default setting): loops around when EOF is reached during trickplays
281ifneq ($(IP_STREAMER_DEMO_MODE),n)
282IP_STREAMER_DEMO_MODE=y
283export IP_STREAMER_DEMO_MODE
284CFLAGS += -DIP_STREAMER_DEMO_MODE
285endif
286
287ifeq ($(findstring $(PLATFORM),93380sms,93380vms,97425), $(PLATFORM))
288LIVE_STREAMING_SUPPORT=y
289export LIVE_STREAMING_SUPPORT
290endif
291
292ifeq ($(DISPLAY_LOCAL_FOR_ENCODE),y)
293CFLAGS += -DB_HAS_DISPLAY_LOCAL_FOR_ENCODE
294endif
295
296ifeq ($(LIVE_STREAMING_SUPPORT),y)
297CFLAGS += -DB_HAS_LIVE_STREAMING
298CFLAGS += -DB_HAS_VMS_GATEWAY
299#When Live Streaming is ON, we turn on auto PSI as well unless it is specifically off
300ifneq ($(AUTO_PSI_SUPPORT),n)
301AUTO_PSI_SUPPORT=y
302export AUTO_PSI_SUPPORT
303CFLAGS += -DB_AUTO_PSI_SUPPORT
304endif
305endif
306
307ifeq ($(AUTO_PSI_SUPPORT),y)
308CFLAGS += -DB_AUTO_PSI_SUPPORT
309endif
310
311ifeq ($(KERNELMODE),y)
312NEXUS_MODE=proxy
313export NEXUS_MODE
314endif
315
316ifeq ($(B_REFSW_ARCH),)
317B_REFSW_ARCH=mipsel-linux
318export B_REFSW_ARCH
319endif
320
321ifneq ($(B_REFSW_DEBUG),n)
322B_REFSW_DEBUG=y
323export B_REFSW_DEBUG
324endif
325
326ifeq ($(USE_HTTP_CHUNK_ENCODING),y)
327export USE_HTTP_CHUNK_ENCODING
328CFLAGS += -DB_USE_HTTP_CHUNK_ENCODING
329endif
330
331ifeq ($(IP_STREAMER_STANDALONE_MODE),y)
332CFLAGS += -DB_RUN_STANDALONE
333endif
334
335OPENSSL_TOP := $(BSEAV)/lib/openssl
336ifeq ($(DTCP_IP_SUPPORT),y)
337SSL_SUPPORT=y
338export SSL_SUPPORT
339
340ifneq ($(DTCP_IP_HARDWARE_DECRYPTION),n)
341DTCP_IP_HARDWARE_DECRYPTION=y
342export DTCP_IP_HARDWARE_DECRYPTION
343endif #DTCP_IP_HARDWARE_DECRYPTION
344
345ifneq ($(DTCP_IP_HARDWARE_ENCRYPTION),n)
346DTCP_IP_HARDWARE_ENCRYPTION=y
347export DTCP_IP_HARDWARE_ENCRYPTION
348endif #DTCP_IP_HARDWARE_ENCRYPTION
349
350export DTCP_IP_SUPPORT
351endif
352
353ifeq ($(RAD_EA_SUPPORT), y)
354CFLAGS += -DB_HAS_RAD_EA
355endif
356
357ifeq ($(findstring $(PLATFORM),97425,97231,97346), $(PLATFORM))
358include $(BSEAV)/lib/tshdrbuilder/tshdrbuilder.inc
359CFLAGS += $(addprefix -I,$(TSHDRBUILDER_INCLUDES))
360endif
361
362# include cross-compiler definitions
363include $(NEXUS_TOP)/platforms/$(PLATFORM)/build/platform_app.inc
364
365# include "LiveMedia extension" library definitions
366include $(BSEAV)/lib/livemedia/blive_ext/include/blive_ext.mak
367
368#include applib definitions
369include $(NEXUS_TOP)/lib/playback_ip/b_playback_ip_lib.inc
370include $(NEXUS_TOP)/lib/os/b_os_lib.inc
371ifeq ($(AUTO_PSI_SUPPORT),y)
372include $(B_PSIP_TOP)/b_psip_lib.inc
373endif
374ifeq ($(STREAMER_CABLECARD_SUPPORT),y)
375ESTB_CFG_SUPPORT=y
376export ESTB_CFG_SUPPORT
377include $(B_MPOD_TOP)/b_mpod_lib.inc
378include $(B_MPOD_TOP)/../estb_cfg/b_estb_cfg_lib.inc
379endif
380
381
382# Enable IPSTB related env variable if PLAYBACK_IP_SUPPORT is on
383ifeq ($(PLAYBACK_IP_SUPPORT),y)
384# Netaccel (previously called Net dma) support is enabled by default in both kernel & user mode
385# Netaccel support provides HTTP/TCP & RTP/UDP Streaming, Accelerated socket i/f
386ifneq ($(NETACCEL_SUPPORT),n)
387NETACCEL_SUPPORT=y
388export NETACCEL_SUPPORT
389CFLAGS += -DB_HAS_NETACCEL_SUPPORT
390endif #NETACCEL_SUPPORT
391ifneq ($(LIVEMEDIA_SUPPORT),n)
392LIVEMEDIA_SUPPORT=y
393export LIVEMEDIA_SUPPORT
394endif #LM
395endif #PB
396
397ifeq ($(HLS_PROTOCOL_SUPPORT), y)
398export HLS_PROTOCOL_SUPPORT=y
399export HTTP_AES_SUPPORT=y
400CFLAGS += -DB_HAS_HTTP_AES_SUPPORT
401endif
402
403
404IP_APPLIB_TEST_SRC_PATH = .
405IP_APPLIB_TEST_INC_PATH = .
406IP_APPLIB_TEST_ODIR = $(PLATFORM).$(B_REFSW_ARCH)
407
408IP_APPLIB_TEST_LIB_FLAGS := -L$(NEXUS_TOP)/bin -lb_playback_ip -lnexus -lb_os
409
410ifeq ($(SSL_SUPPORT),y)
411    IP_APPLIB_TEST_LIB_FLAGS +=  -L$(OPENSSL_DIR) -lssl -lcrypto -ldl
412    CFLAGS += -DB_HAS_SSL
413ifeq ($(DTCP_IP_SUPPORT),y)
414IP_APPLIB_TEST_LIB_FLAGS +=  -lb_dtcp_ip
415CFLAGS += -DB_HAS_DTCP_IP
416ifeq ($(DTCP_IP_HARDWARE_ENCRYPTION),y)
417CFLAGS += -DB_DTCP_IP_HW_ENCRYPTION
418endif
419ifeq ($(DTCP_IP_HARDWARE_DECRYPTION),y)
420CFLAGS += -DB_DTCP_IP_HW_DECRYPTION
421endif
422endif # DTCP_IP_SUPPORT
423endif # SSL_SUPPORT
424
425ifeq ($(STREAMER_CABLECARD_SUPPORT),y)
426CFLAGS += -DSTREAMER_CABLECARD_SUPPORT -DDSG_SUPPORT -DBCM_DSG_DUAL_PROCESSOR_INTERFACE -DMPOD_SUPPORT -DINTEGRATE_BCM_DSG_HOST -DESTB_CFG_SUPPORT
427ifeq ($(MPODXSIX),y)
428CFLAGS += -DMPODXSIX
429endif
430endif
431
432IP_APPLIB_TEST_LIB_FLAGS += -lm -lpthread
433ifeq ($(AUTO_PSI_SUPPORT),y)
434IP_APPLIB_TEST_LIB_FLAGS += -lb_psip
435endif
436
437ifeq ($(VIDEO_CONFERENCING_SUPPORT),y)
438IP_STREAMER_VIDEO_CONFERENCING_LIBS = -lbvc
439IP_APPLIB_TEST_LIB_FLAGS += $(IP_STREAMER_VIDEO_CONFERENCING_LIBS)
440else
441IP_STREAMER_VIDEO_CONFERENCING_LIBS = 
442endif
443
444ifeq ($(STREAMER_CABLECARD_SUPPORT),y)
445IP_APPLIB_TEST_LIB_FLAGS += -lb_mpod -lb_estb_cfg -L$(B_MPOD_TOP)/lib/cp/build -lcp -L$(B_MPOD_TOP)/lib/cp/crypto/linux -lcrypto.0.9.7b_uclibc $(BSEAV)/docsis/StbHostApps/DsgCC/build/dsgcclib.a -lrt
446endif
447
448ifeq ($(LIVEMEDIA_SUPPORT),y)
449    IP_APPLIB_TEST_LIB_FLAGS += -L$(LIVEMEDIA_DIR)/liveMedia -lliveMedia
450    IP_APPLIB_TEST_LIB_FLAGS += -L$(LIVEMEDIA_DIR)/groupsock -lgroupsock
451    IP_APPLIB_TEST_LIB_FLAGS += -L$(LIVEMEDIA_DIR)/UsageEnvironment -lUsageEnvironment
452    IP_APPLIB_TEST_LIB_FLAGS += -L$(LIVEMEDIA_DIR)/BasicUsageEnvironment -lBasicUsageEnvironment
453    IP_APPLIB_TEST_LIB_FLAGS += $(BLIVE_EXT_LDFLAGS)
454    B_LINKER := $(CXX)
455else
456    B_LINKER := $(CC)
457endif
458
459NEXUS_APP_INCLUDE_PATHS += \
460        $(NEXUS_TOP)/lib/playback_ip/include \
461        $(NEXUS_TOP)/lib/os/include/ \
462        $(NEXUS_TOP)/lib/os/include/linuxuser \
463        $(IP_APPLIB_TEST_INC_PATH) \
464    $(BSEAV)/lib/rtp \
465    $(BSEAV)/lib/utils \
466        $(BSEAV)/lib/mpeg2_ts_parse \
467        $(BSEAV)/lib/tspsi \
468        $(B_PSIP_TOP)/include \
469        $(BSEAV)/api/include \
470        $(BSEAV)/lib/netaccel/include \
471        $(BSEAV)/lib/media \
472        $(BSEAV)/lib/bfile \
473        $(NEXUS_TOP)/lib/dtcp_ip/include \
474
475ifeq ($(STREAMER_CABLECARD_SUPPORT),y)
476NEXUS_APP_INCLUDE_PATHS += \
477        $(B_MPOD_TOP)/include \
478        $(B_MPOD_TOP)/src/driver \
479        $(B_MPOD_TOP)/src/app_layer \
480        $(B_MPOD_TOP)/src/session_layer \
481        $(B_MPOD_TOP)/src/link_layer \
482        $(B_MPOD_TOP)/src/util
483
484NEXUS_APP_INCLUDE_PATHS += \
485        $(B_MPOD_TOP)/../estb_cfg/include       
486endif
487
488
489NEXUS_APP_DEFINES += LINUX BCM_DEBUG
490NEXUS_APP_DEFINES += MAJOR_VERSION=0 MINOR_VERSION=0 SUB_VERSION=1
491
492IP_CLIENT_SRCS = \
493        ip_client.c
494
495IP_CLIENT_FCC_SRCS = \
496        ip_client_fcc.c
497
498ifeq ($(AUTO_PSI_SUPPORT),y)
499IP_CLIENT_SRCS += \
500        ip_psi.c
501endif
502
503IP_STREAMER_CPP_SRCS = \
504        ip_http.c \
505        ip_streamer.c
506
507ifeq ($(STREAMER_CABLECARD_SUPPORT),y)
508IP_STREAMER_CPP_SRCS += \
509        ip_strm_cablecard.c
510endif
511
512
513ifeq ($(AUTO_PSI_SUPPORT),y)
514IP_STREAMER_CPP_SRCS += \
515        ip_psi.c
516endif
517
518SRCS =
519
520vpath %.cpp $(IP_APPLIB_TEST_SRC_PATH)
521vpath %.c $(IP_APPLIB_TEST_SRC_PATH)
522
523IP_CLIENT_OBJS := $(addprefix $(IP_APPLIB_TEST_ODIR)/, $(patsubst %.c,%.o,$(notdir $(IP_CLIENT_SRCS))))
524IP_CLIENT_APP = ip_client
525
526IP_CLIENT_FCC_OBJS := $(addprefix $(IP_APPLIB_TEST_ODIR)/, $(patsubst %.c,%.o,$(notdir $(IP_CLIENT_FCC_SRCS))))
527IP_CLIENT_FCC_APP = ip_client_fcc
528
529IP_STREAMER_OBJS := $(addprefix $(IP_APPLIB_TEST_ODIR)/, $(patsubst %.c,%.o,$(notdir $(IP_STREAMER_CPP_SRCS))))
530IP_STREAMER_APP = ip_streamer
531
532ifeq ($(STREAMER_CABLECARD_SUPPORT),y)
533CP_ARCH = mipsel-linux
534CP_TOOLCHAIN_DIR:=$(shell dirname $(shell dirname $(shell which ${CP_ARCH}-gcc 2>/dev/null) 2>/dev/null))
535CP_CROSS_COMPILE ?= ${CP_ARCH}-
536ECM_IF =
537ifeq ($(findstring $(PLATFORM), 97420), $(PLATFORM))
538ECM_IF = eth2
539endif
540CDL_CMDS =
541DSG_SUPPORT = y
542endif
543
544.PHONY: api clean
545
546all: $(IP_CLIENT_APP) $(IP_STREAMER_APP) $(IP_CLIENT_FCC_APP) 
547
548# For linux builds, link to the correct libraries
549ifeq ($(B_REFSW_OS),linuxkernel)
550LDFLAGS := ${NEXUS_LDFLAGS}
551else
552ifneq ($(findstring linux,$(B_REFSW_OS)),)
553LDFLAGS := -lnexus -L${NEXUS_TOP}/bin -lpthread -lm  $(EXTRA_DRM_OBJS)
554endif
555endif
556
557ifeq ($(findstring $(PLATFORM),97425,97231,97346), $(PLATFORM))
558LDFLAGS += -ltshdrbuilder
559endif
560
561# Suppress LiveMedia Output for non VERBOSE builds
562ifeq ($(VERBOSE),)
563REDIR_LIVEMEDIA := &> /dev/null
564else
565REDIR_LIVEMEDIA :=
566endif
567
568# This builds the nexus api and other library dependencies
569api:
570
571ifneq ($(REFSW_BUILD),y)
572        $(Q_)$(MAKE) -C $(NEXUS_TOP)/build
573        $(Q_)$(MAKE) -C $(NEXUS_TOP)/lib/os
574endif
575ifeq ($(LIVEMEDIA_SUPPORT),y)
576        $(Q_)$(MAKE) -C $(LIVEMEDIA_DIR) $(REDIR_LIVEMEDIA) 
577        $(Q_)$(MAKE) -C $(BLIVE_EXT_DIR)/build
578endif
579
580ifeq ($(SSL_SUPPORT),y)
581        $(Q_)$(MAKE) -C $(OPENSSL_TOP) all > /dev/null
582ifeq ($(DTCP_IP_SUPPORT),y)
583        $(Q_)$(MAKE) -C $(NEXUS_TOP)/lib/dtcp_ip install
584endif #DTCP_IP_SUPPORT
585endif #SSL_SUPPORT
586ifeq ($(findstring $(PLATFORM),97425,97231,97346), $(PLATFORM))
587        $(Q)$(MAKE) -C $(BSEAV)/lib/tshdrbuilder
588endif
589        $(Q_)$(MAKE) -C $(NEXUS_TOP)/lib/playback_ip
590ifeq ($(AUTO_PSI_SUPPORT),y)
591        $(Q_)$(MAKE) -C $(B_PSIP_TOP)
592endif
593
594ifeq ($(STREAMER_CABLECARD_SUPPORT),y)
595        $(Q_)$(MAKE) -C $(B_MPOD_TOP) DSG_SUPPORT=$(DSG_SUPPORT)
596        $(Q_)$(MAKE) -C $(B_MPOD_TOP)/lib/cp/build -f makefile.cplib TOOLCHAIN=uclibc TOOLCHAIN_DIR=$(CP_TOOLCHAIN_DIR) CROSS_COMPILE=$(CP_CROSS_COMPILE)
597        $(Q_)$(MAKE) -C $(B_MPOD_TOP)/../estb_cfg
598        $(Q_)$(RM) -f $(BSEAV)/docsis/StbHostApps/DsgCC/build/dsgcclib.a
599        $(Q_)export CROSSDEV_ROOT=$(CP_TOOLCHAIN_DIR);\
600        cd $(BSEAV)/docsis/StbHostApps/DsgCC/build; \
601        ./build dsgcc pvnet $(ECM_IF) applib cablecard  $(CDL_CMDS);\
602        cd $(NEXUS_TOP)/lib/playback_ip/apps;
603endif
604ifeq ($(SETTOP_API_SUPPORT),y)
605        $(Q_)$(MAKE) -C $(BSEAV)/api/build/nexus
606endif
607ifneq ($(wildcard $(BSEAV)/lib/netaccel/module/Makefile),)
608  ifeq ($(NETACCEL_SUPPORT),y)
609        $(Q_)$(MAKE) NETACCEL_BUILD_PRIVATE=y IDLE_STATS=y NETACCEL_STANDALONE=y -C $(BSEAV)/lib/netaccel
610  endif
611       
612endif
613
614
615# This cleans nexus and local apps
616clean:
617ifneq ($(REFSW_BUILD),y)
618        $(Q_)$(MAKE) -C $(NEXUS_TOP)/lib/os clean
619        $(Q_)$(MAKE) -C $(NEXUS_TOP)/build clean
620endif
621        $(Q_)$(MAKE) -C $(NEXUS_TOP)/lib/playback_ip clean
622        $(Q_)$(RM) $(BSEAV)/bin/$(IP_CLIENT_APP) $(IP_CLIENT_FCC_APP) $(IP_APPLIB_TEST_ODIR)/*.d $(IP_APPLIB_TEST_ODIR)/*.o $(IP_APPLIB_TEST_ODIR)/*.out;
623        $(Q_)$(RM) $(IP_APPLIB_TEST_ODIR)/$(IP_CLIENT_APP) $(IP_CLIENT_FCC_APP)
624        $(Q_)$(RM) $(BSEAV)/bin/$(IP_STREAMER_APP)
625ifeq ($(LIVEMEDIA_SUPPORT),y)
626        $(Q_)$(MAKE) -C $(LIVEMEDIA_DIR) clean $(REDIR_LIVEMEDIA)
627        $(Q_)$(MAKE) -C $(BLIVE_EXT_DIR)/build clean
628endif
629ifeq ($(SETTOP_API_SUPPORT),y)
630        $(Q_)$(MAKE) -C $(BSEAV)/api/build/nexus clean
631endif
632ifeq ($(SSL_SUPPORT),y)
633        $(Q_)$(MAKE) -C $(OPENSSL_TOP) clean > /dev/null
634endif
635ifeq ($(findstring $(PLATFORM),97425,97346), $(PLATFORM))
636        $(MAKE) -C $(BSEAV)/lib/tshdrbuilder clean
637endif
638
639ifeq ($(STREAMER_CABLECARD_SUPPORT),y)
640        $(Q_)$(MAKE) -C $(B_MPOD_TOP)/../estb_cfg clean
641        $(Q_)$(MAKE) -C $(B_MPOD_TOP)/lib/cp/build -f makefile.cplib TOOLCHAIN=uclibc clean
642        -$(RM) $(B_MPOD_TOP)/lib/cp/build/cplib.lib $(B_CP_LIB)/build/libcp.a
643        $(Q_)$(RM) -f $(BSEAV)/docsis/StbHostApps/DsgCC/build/dsgcclib.a
644        $(Q_)export CROSSDEV_ROOT=$(CP_TOOLCHAIN_DIR);\
645        cd $(BSEAV)/docsis/StbHostApps/DsgCC/build; \
646        ./build dsgcc clean;\
647        cd $(NEXUS_TOP)/lib/playback_ip/apps;
648
649endif
650
651
652# This is the minimum needed to compile and link with Nexus
653CFLAGS += $(NEXUS_CFLAGS) $(addprefix -I,$(NEXUS_APP_INCLUDE_PATHS)) $(addprefix -D,$(NEXUS_APP_DEFINES))
654
655# Always build with debug
656CFLAGS += -MD -g
657
658C_ONLY_FLAGS := -std=c99 -Wstrict-prototypes
659CPPFLAGS := -fno-rtti -fno-exceptions
660
661
662# Implicit rule for building local app
663$(IP_CLIENT_APP): odir $(IP_CLIENT_OBJS) api
664        @echo [Linking... $<]
665        $(Q_)$(B_LINKER) -o $(IP_APPLIB_TEST_ODIR)/$@ $(IP_CLIENT_OBJS) $(IP_APPLIB_TEST_LIB_FLAGS) $(LDFLAGS)
666        $(Q_)cp -f $(IP_APPLIB_TEST_ODIR)/$(IP_CLIENT_APP) $(NEXUS_TOP)/bin
667        @if [ -d $(BSEAV)/bin ]; then \
668                cp -f $(IP_APPLIB_TEST_ODIR)/$(IP_CLIENT_APP) $(BSEAV)/bin/ ; \
669        fi
670
671# Implicit rule for building local app
672$(IP_CLIENT_FCC_APP): odir $(IP_CLIENT_FCC_OBJS) api
673        @echo [Linking... $<]
674        $(Q_)$(B_LINKER) -o $(IP_APPLIB_TEST_ODIR)/$@ $(IP_CLIENT_FCC_OBJS) $(IP_APPLIB_TEST_LIB_FLAGS) $(LDFLAGS)
675        $(Q_)cp -f $(IP_APPLIB_TEST_ODIR)/$(IP_CLIENT_FCC_APP) $(NEXUS_TOP)/bin
676        @if [ -d $(BSEAV)/bin ]; then \
677                cp -f $(IP_APPLIB_TEST_ODIR)/$(IP_CLIENT_FCC_APP) $(BSEAV)/bin/ ; \
678        fi
679
680$(IP_STREAMER_APP): odir $(IP_STREAMER_OBJS) api
681        @echo [Linking... $<]
682        $(Q_)$(B_LINKER) -o $(IP_APPLIB_TEST_ODIR)/$@ $(IP_STREAMER_OBJS) $(IP_APPLIB_TEST_LIB_FLAGS) $(LDFLAGS) 
683        $(Q_)cp -f $(IP_APPLIB_TEST_ODIR)/$(IP_STREAMER_APP) $(NEXUS_TOP)/bin
684        @if [ -d $(BSEAV)/bin ]; then \
685                cp -f $(IP_APPLIB_TEST_ODIR)/$(IP_STREAMER_APP) $(BSEAV)/bin/ ; \
686        fi
687
688odir:
689        -@if [ ! -d $(IP_APPLIB_TEST_ODIR) ]; then mkdir $(IP_APPLIB_TEST_ODIR); fi
690
691
692$(IP_APPLIB_TEST_ODIR)/%.o: %.c
693        @echo [Compile... $<]
694        $(Q_)$(CC) -c -o $@ $< $(CFLAGS) $(C_ONLY_FLAGS)
695
696$(IP_APPLIB_TEST_ODIR)/%.o: %.cpp
697        @echo [Compile... $<]
698        $(Q_)$(CXX) -c -o $@ $< $(filter-out $(C_ONLY_FLAGS),$(CFLAGS)) $(CPPFLAGS)
699
700install: all
701    ifeq ($(NETACCEL_SUPPORT),y)
702        $(Q_)$(MAKE) -C $(BSEAV)/lib/netaccel install
703    endif
704        @if [ -d $(BSEAV)/bin ]; then \
705            cp -f $(NEXUS_TOP)/bin/* $(BSEAV)/bin; \
706        fi
707
708-include $(IP_APPLIB_TEST_ODIR)/*.d
Note: See TracBrowser for help on using the repository browser.