⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 makefile

📁 5105 AV输出FILTER, 解析源代码
💻
字号:
#----------------------------------------------------------------------
#
#           Makefile for Test application #1 (RODOW)
#
# Build options:
#  DVD_IO              <unset>/NONE | UART | DEBUG
#
# Make options:
#   'gmake'                builds test application lku file.
#   'gmake flashapp1.hex'  builds test application hex file for FLASH programming.
#
#   'gmake run'            runs test application lku file.
#
#   'gmake clean'          remove test application build files.
#
#----------------------------------------------------------------------

APP_NAME := testapp1
HEX_NAME := flashapp1

#----------------------------------------------------------------------

DVD_MAKE_VERSION := 2
SUPPRESS_CLEAN_ALL := 1

ifdef IN_OBJECT_DIR

include $(DVD_MAKE)/generic.mak

TARGETS := $(APP_NAME).lku

#----------------------------------------------------------------------
# This application must use STPTI4
ifeq (,$(findstring "$(DVD_TRANSPORT)","stpti" "stpti4"))
 $(error The environment variable DVD_TRANSPORT must be set to 'stpti' or 'stpti4' rather than '$(DVD_TRANSPORT)' for this test application)
endif

#----------------------------------------------------------------------
# include path for shared objects

INCLUDES += -I$(subst $(BAD_SLASH),$(GOOD_SLASH),../../../shared)
INCLUDES += -I$(subst $(BAD_SLASH),$(GOOD_SLASH),../../../shared/$(DVD_FRONTEND))
INCLUDES += -I$(subst $(BAD_SLASH),$(GOOD_SLASH),../../../shared/debug)
INCLUDES += -I$(subst $(BAD_SLASH),$(GOOD_SLASH),../../../shared/debug/dvb)

#----------------------------------------------------------------------
# set virtual paths to objects (as path from test application ./objs/ST20 subdirectory)

vpath %.c %.h ../../../shared
vpath %.c     ../../../shared/$(DVD_SERVICE_LC)
vpath %.c %.h ../../../shared/$(DVD_FRONTEND)
vpath %.c %.h ../../../shared/debug
vpath %.c %.h ../../../shared/debug/dvb
vpath %.lib   $(DVD_EXPORTS)

#----------------------------------------------------------------------
# objects to be built

# Basic infrastructure.
ST20_OBJS := main.tco boot.tco sections.tco pio.tco tbx.tco evt.tco i2c.tco uart.tco tuner.tco


# Include Scart for DTT5107
ifneq "$(filter $(DVD_PLATFORM),DTT5107 SAT5107)" ""
 ST20_OBJS += scart.tco
endif

ifdef ENABLE_TRACE
 ST20_OBJS += trace.tco
 CFLAGS += -DENABLE_TRACE
endif

# Driver Register Status
ifdef ENABLE_REG_TRACE
 CFLAGS += -DENABLE_REG_TRACE
endif

# AC3 Support
ifdef AC3_DECODE
 CFLAGS += -DAC3_DECODE
endif

ifdef CPU_USAGE_TRACE
 CFLAGS += -DMEASURE_PERFORMANCE
 LKFLAGS += -fp
 DHRY_LIB = dhrystone.lib
endif

# Enable STTUNER MINIDRIVER
ifeq "$(DVD_STTUNER_MINIDRIVER)" "YES"
 CFLAGS += -DSTTUNER_MINIDRIVER
endif

# Application specific selection.
ST20_OBJS += errors.tco clkrv.tco avmem.tco denc.tco layer.tco vmix.tco vtg.tco vid.tco regevent.tco aud.tco

#Device Specific
ST20_OBJS += fdma.tco vout.tco

# Transport specific selection
ST20_OBJS += stpti.tco transport.tco

# Service specific.
ST20_OBJS += service.tco lists.tco

# application objects to be built
ST20_OBJS += $(APP_NAME).tco

ifdef DEBUG_MODE
 ST20_OBJS += tst.tco comdbg.tco ptidbg.tco dvbsect.tco filter.tco apidbg.tco decode.tco tunerdbg.tco
 CFLAGS += -DDEBUG_MODE
endif

#----------------------------------------------------------------------
# Produce a map file

ST20_LKFLAGS = -M $(basename $@).map

#----------------------------------------------------------------------
# Debug reporting to UART, console (unset or NONE) or both (DEBUG: printf's to CONSOLE, STTBX_Print to UART)

CFLAGS += -DSTTBX_PRINT -DSTTBX_REPORT

ifeq "$(DVD_IO)" "UART"
 CFLAGS += -DREPORT_TO_UART
else
  ifeq "$(DVD_IO)" "DEBUG"
   CFLAGS += -DREPORT_TO_UART -DREPORT_TO_CONSOLE
  else
   CFLAGS += -DREPORT_TO_CONSOLE
  endif
endif

#----------------------------------------------------------------------
#               Defaults for  **packet injector**
#
# See also: $(DVD_SERVICE_LC)/lists.c

#stream pids
ifndef TESTAPP_VPID
 ifeq "$(DVD_SERVICE)" "DVB"
  TESTAPP_VPID := 0x200
 else
  TESTAPP_VPID := 20
 endif
endif

ifndef TESTAPP_APID
 ifeq "$(DVD_SERVICE)" "DVB"
  TESTAPP_APID := 0x280
 else
  TESTAPP_APID := 21
 endif
endif

ifndef TESTAPP_PCR
 ifeq "$(DVD_SERVICE)" "DVB"
  TESTAPP_PCR := 0x1FFE
 else
  #if pcr not defined the make it the same as the video pid.
  TESTAPP_PCR := $(TESTAPP_VPID)
 endif
endif

ifndef TESTAPP_TPID
 TESTAPP_TPID := 0
endif

ifndef TESTAPP_SUBPID
 TESTAPP_SUBPID := 0
endif

#audio format
ifndef TESTAPP_AUD
 TESTAPP_AUD := MP1A
endif

#video format
ifndef TESTAPP_VID
 ifeq "$(DVD_SERVICE)" "DVB"
  TESTAPP_VID := DISP_PAL
 else
  TESTAPP_VID := DISP_NTSC
 endif
endif

CFLAGS += -DTESTAPP_APID=$(TESTAPP_APID) -DTESTAPP_VPID=$(TESTAPP_VPID) -DTESTAPP_PCR=$(TESTAPP_PCR)
CFLAGS += -DTESTAPP_TPID=$(TESTAPP_TPID) -DTESTAPP_SUBPID=$(TESTAPP_SUBPID)
CFLAGS += -DTESTAPP_AUD=$(TESTAPP_AUD) -DTESTAPP_VID=$(TESTAPP_VID)
CFLAGS += -D$(DVD_PLATFORM)

#Back buffering mode supporting variable
CFLAGS += $(BACK_BUFFERING)

ifeq "$(LNBH_21)" "YES"
 CFLAGS += -DLNBH_21
endif

ifeq "$(TUNER_TYPE_MAX2116)" "YES"
 CFLAGS += -DTUNER_TYPE_MAX2116
endif


#----------------------------------------------------------------------

CFLAGS += $(OPTIONAL_CFLAGS)
CFLAGS += -DDEFAULT_INSTANCE=0


#----------------------------------------------------------------------
# Build targets

include $(DVD_MAKE)/defrules.mak

#make lku file (debugging)
$(APP_NAME)_INIT := board_init
$(ST20_TARGETS): $(ST20_OBJS) stapi_$(DVD_TRANSPORT)$(LIB_SUFFIX) $(DHRY_LIB)
	$(ECHO) Building $@
	$(LINK_EXECUTABLE) testtool.lib

#make hex file
$(HEX_NAME)_INIT := board_init_hex
$(HEX_NAME)_LKFLAGS := -romimage -o $(HEX_NAME).hex
$(HEX_NAME).hex: initfuncs.tco $(ST20_OBJS) stapi_$(DVD_TRANSPORT)$(LIB_SUFFIX) $(DHRY_LIB)
	$(ECHO) Building $@
	$(LINK_EXECUTABLE)

dhrystone.lib: FORCE
	$(MAKE) -C ../../../shared/debug/dhrystone

FORCE:

#----------------------------------------------------------------------

clean:
ifeq "$(ARCHITECTURE)" "ST20"
	-$(RM) *$(OBJ_SUFFIX)
	-$(RM) *$(LIB_SUFFIX)
	-$(RM) *$(EXE_SUFFIX)
	-$(RM) *.dbg
	-$(RM) *.map
	-$(RM) *.hex
	-$(RM) *.bin
	-$(RM) *.log
endif

	$(MAKE) -C ../../../shared/debug/dhrystone clean

#----------------------------------------------------------------------

else

include $(DVD_MAKE)/builddir.mak

#test with output logged to a file
runlog:
	$(MAKE) run DVD_RUNARGS="-log $(APP_NAME).log"

%.hex: check_object_dir
	$(MAKE_AT_TARGET)

endif


#EOF ------------------------------------------------------------------

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -