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

📄 makefile

📁 ESS3890+SL原代码(1*16内存)
💻
📖 第 1 页 / 共 2 页
字号:
# Copyright 1996-1997, ESS Technology, Inc.
# SCCSID @(#)makefile	4.62.1.12 03/16/05

#
# $LOG$
#

#
# ESS COMPILER/TOOLS main path.
#
ESSVIDEO        = /home/fsc/soft/src/tools

# If you are going to use the OLD SUN UNIX compiler,
# Five lines should be used. Must use emake script
#
ifeq ($(OSNAME),UNIX_OLD)
TOOLS           = $(ESSVIDEO)/bin
BIN             = $(ESSVIDEO)/bin
LIBC            = $(ESSVIDEO)/lib
ASVOPT          = $(TOOLS)/asvopt
UNIX2DOS        = unix2dos
CPP		= $(TOOLS)/cpp
MAKE_EXT	= make.unx
endif

ifeq ($(OSNAME),UNIX)
TOOLS           = $(ESSVIDEO)/bin
BIN             = $(ESSVIDEO)/newbin
LIBC            = $(ESSVIDEO)/lib
ASVOPT          = echo
UNIX2DOS        = unix2dos
CPP		= $(TOOLS)/cpp
MAKE_EXT	= make.unx
endif

#
# Some GCCs
#
AX              = $(BIN)/ax_vcd
ESSGCC          = $(BIN)/gcc
GCC             = gcc -ldl
COMPILE         = $(ESSVIDEO)/compiler
INCLUDES        = -I$(COMPILE)/h -I$(PLG) -I.


#
# Other tools
#
RUNRLD		= runrld
LD              = $(TOOLS)/ld
RLD             = $(TOOLS)/dvdrld2
ROM             = $(TOOLS)/mp3rom
CRC             = $(TOOLS)/crc
BIND            = $(TOOLS)/bind
RM              = rm -f
SED             = sed
AWK             = awk
COFF2EXE        = echo                                          # Dummy
SCCSCMD         = sccs get
ECHO            = echo
CAT             = cat
MKDIR           = mkdir
MOVE            = mv
TAR             = tar
MOVE1           = mv
COPY            = cp -f
PLG             = prologic
CP              = cp -f
ECHO_FLAG       = >
MKROMBAT	= mkrombat

#
# DOS setting
#
ifeq ($(OSNAME),DOS)
ENV             = c:/essvideo
COMPILE         = $(ENV)/compiler
BIN             = $(COMPILE)/hedbin
TOOLS           = $(ENV)/tools
PCTOOLS         = $(ENV)/bin
CPP		= $(BIN)/cpp
AX              = $(BIN)/ax_vcd
LD              = $(TOOLS)/ld
RLD             = $(TOOLS)/dvdrld2 $(RLDFLAG)
ROM             = $(TOOLS)/mp3rom
BIND            = $(TOOLS)/bind
CRC             = echo
RM              = $(PCTOOLS)/rm -f
COPY            = copy
CP              = cp
CD              = cd
MOVE            = move
SED             = $(PCTOOLS)/sed
SCCSCMD         = echo
ECHO            = echo
CAT             = echo
INCLUDES        = -I$(COMPILE)/h -I$(PLG)
LIBC            = $(COMPILE)/lib
GCC_ROOT        = $(ENV)/djgpp
GCC_BIN         = $(GCC_ROOT)/bin
GCC             = $(GCC_BIN)/gcc
COFF2EXE        = $(GCC_BIN)/coff2exe
MAKE_EXT        = make.dos
UNIX2DOS        = echo
endif


#
# Flags for ESS' C compile (for all targets)
#
#FLAGS= -DVCB -O -S -DDVC -fcall-saved-r27 -muse_store_zero=0 -muse_far=1  \
#       -mcpu=RISCiit $(TRACE)
FLAGS= -DVCB -O2 -S -DDVC -fcall-saved-r27 -muse_store_zero=0 \
       -mcpu=RISCiit -ffixed-r22 -ffixed-r23 -ffixed-r27 $(TRACE)	#Hedley

#
# VP microcode related macros.
#
# (Since some dependency stuff depends on these guys, they have to
# appear before the included files)
#
UCODE_H 	= uc3208.h			# MPEG1 + MUSICAM
VPH		= vp.h
VPUCODEH	= vpucode.h $(UCODE_H)

# memmap related
MEMMAP_MISC	= memmap.c memmap mkrombat

#source location
JPG		= jpglib
GAME		= gameboy
LCGAME		= nes
WMA		= wma

# Original startup.
STARTUP_S	= startup.s

# What is the boot code of the application target
BOOT		  	= boot


TEXT_START	= -40000

#
# System Options;
# Please make sure you customize for your target.
#
# Current options:
# 1) Specify VFD controller:
#	One of $(VFDCTL16312), $(VFDCTL12510), or $(VFDCTL2872)
# 2) Remote control type:
#	One of -DIR_NEC, -DIR_SANYO, -DIR_PHILIPS
# 3) Remote control
#	Default is the original remote controller. Can also be
#	-DNEW_ESS_REMOTE -DESS_REMOTE -DSAST_REMOTE or -DBAOAN49_REMOTE
#
#       IR_SYSCODE is in microvfd.c (2.0) or po4tact.c (1.1) or
#	custvfd.c(customer)
# 4) NEW_EMULATOR
#	Specify NEW_EMULATOR if you are using the new emulator that allows
#	debugging of 256K code (i.e. use A2, A3, and CS1 for ROM emulator
#	access)
# 5) VFD display:
#       Default is VFD_ZEC901. Other VFD's currently supported: VFD_FUT166,
#       VFD_FUT267 VFD_FUT297, VFD_FUT106, VFD_FUT33, VFD_ZEC702,
#       VFD_ZEC703, VFD_ZEC704, VFD_SVV0708, VFD_FUT155, VFD_FUT213
#
# 6) OSD font
#	- compressed OSD by default
#	- Use FOUR_LINE_OSD by default
#
# 7) ENABLE_MP3
#	For MP3 royalty reasons, we leave customers to enable this at
#	their site(makefile.pc). It is enabled by default for UNIX make.
#
# 8) ID3
#	For ID3 v2.x (prepended tags), enabled to skip prepended ID3 data.
#	There is an option to "USE_ID3_INFO" if resources are available.
#
# 9) MULTI_SESSION
#	Enable handling of multi-session discs.
#
# 10) UDF
#	Enable handling of discs using UDF file-system.
#
# 11) MIC_RECORD
#	Enable Mic Recording for "sing-along", language learning, etc...
#
# 12) TWO_FIELDS_OSD
#	Enable nicer 2-fields OSD. (should always be used)
#
# 13) EQUALIZER
#	- Enable equalization controls and spectrum analyzer.
#	- Companion option DAE_SPATIAL uses EQ and ECHO for
#	  surround effects.
#
# 14) FLASH_UPDATE
#	Enable option to update flash from CD with:
#	    - new logo (companion option needed: UPDATE_FLASH_LOGO)
#	    - entirely new rom file (companion option: UPDATE_FLASH_ALL)
#
# 15) GAMMA
#	Enable Gamma correction function. (protected)
#
# 16) FLESHTONE
#	Enable fleshtone adjustment function. (protected)
#
# 17) KARASC
#	Enable Karaoke scoring and mic-spectrum. (protected)
#
# 18) ANTI_SHOCK
#	Enable shock protection(ESP)..currently for CDDA & MP3.
#	NOTE: can only be used with C2PO enabled (ENABLE_C2PO) boards.
#
# 19) DSC_AUDIOCLK
#       3207 drives audio clock
#       NOTE:
#       	- Don't define DSC_AUDIOCLK if we use MCLK from CD loader.
#		- We need always define DSC_AUDIOCLK if FS384 defined.
#		- define MCLK_FOR_SERVO if MCLK is used to drive servo clk.
#
#       MCLK        256FS              384FS
#
#       3890        Enable/Disable     Enable
#
#       External    Disable/Enable     Disable
#
# 20) FREEZE_MODE
#	Enable mode that pauses video but continues to play audio.
#
# 21) SKIP_AGT / SKIP_AGF / SKIP_EF_BALANCE
#	Enable to skip AGT/AGF/EF_Balance servo adjustments.
#
# 22) PRODUCTION_ROM
#	Enable to save ROM space(~900B) from VCXI routines. It's intended
#	for cases when other options to reduce ROM space has been exhausted.
#	Normally, one would enable "NOLOGO" to save ROM for debugging.
#	When the code is finalized, remove the "NOLOGO" flag and enable the
#	"PRODUCTION_ROM" flag for the final build.
#
# 23) ABNORMAL_VCD
#	Enable to support VCD's with non-standard bitrates.
#
# 24) I2C_E2PROM
#	Enable to Save play time to E2PROM.
#
# 25) BAOAN49_REMOTE
#	Enable to support Bao An 49 keys remot.
#
# 26) PLUS5_KEY, COMMON_LCD_PLUS5
#	Enable to support 5+ key.
#
# 27) HT1621,  LCD_DISC
#	Enable to support LCD of HT1621.  note  must remove the VFDCTL16312
#
# 28) INDIAN_OSD_LANG
#	Enable to support INDIAN OSD and disable CHINA OSD.
#
# 29) MP3_PROGRAM
#	Enable to support MP3_PROGRAM.
#
# 30) MP3_INTRO
#	Enable to support MP3_INTRO.
#
# NOTE: "protected" options cannot be enabled/disabled in the field..
#	they must be enabled/disabled during initial release.
#
SYSOPTIONS	= $(VFDCTL16312) $(SERVOFLAGS) $(BOARD) $(NEW_EMULATOR) \
		  $(PLAYER_FLAGS) -DDSC_AUDIOCLK -DIR_NEC -DUSE_CN_HEADER \
		  -DUSE_VWCOMP -DIGNORE_POWERDOWN \
		  -DBAOAN49_REMOTE -DVFD_FUT213 -DDEAL_MP3_DOWN\
#		  -DDOOR_HALF_SPEED 
# -DDEAL_MP3_DOWN			
#-DI2C_E2PROM  -DFIVE_DISC_POWERRESUME
#  -DHT1621 -DLCD_DISC -DCOMMON_LCD_PLUS5 -DPLUS5_KEY -DLOAD_213C \
#  -DMP3_INTRO -DMP3_PROGRAM -DI2C_E2PROM  -DFIVE_DISC_POWERRESUME\
#
# -DVFD_FUT58 -DBAOAN49_REMOTE
#-DPRODUCTION_ROM
# -DNOLOGO -DDEBUG_OSD

#
# Include common make stuff for UNIX and PC
#
include make.sh

#
# Player specific flags..default full-featured (need 2MB dram)
#
PLAYER_FLAGS	= -DCOMPRESS_MKTBL_DATA -DCOMPRESS_ALL_UCODE \
		  -DUCODE_IN_DRAM -DTWO_FIELDS_OSD -DUSE_DGS_FONT \
		  -DDAE_SPATIAL -DEQUALIZER -DKARASC \
		  -DGAMMA -DFLESHTONE -DID3 -DUSE_ID3_INFO -DUDF -DMIC_RECORD \
		  -DBILINGUAL_OSD -DGB_TWO_PAD -DFREEZE_MODE \
		  -DENABLE_MP3 -DMULTI_SESSION
#-DABNORMAL_VCD  

ifeq ($(GOAL),$(findstring $(GOAL),$(VCDLC_GRP)))
PLAYER_FLAGS	= -DVCDLC -DCOMPRESS_MKTBL_DATA -DCOMPRESS_MP3_UCODE \
		  -DNO_ZERO_MUTE -DSPATIAL -DEQUALIZER -DKARASC \
		  -DID3 -DMIC_REC_STUD -DLESS_DISP_MEM \
		  -DGB_TWO_PAD -DFREEZE_MODE \
		  -DENABLE_MP3 ##-DBILINGUAL_OSD
endif
ifeq ($(GOAL),$(findstring $(GOAL),$(PLAYONLY_GRP)))
PLAYER_FLAGS	= -DCOMPRESS_MKTBL_DATA -DCOMPRESS_ALL_UCODE \
		  -DUCODE_IN_DRAM -DTWO_FIELDS_OSD -DUSE_DGS_FONT \
		  -DDAE_SPATIAL -DEQUALIZER -DGAMMA -DFLESHTONE \
		  -DMIC_REC_STUD -DNOBILINGUAL_OSD
endif
ifeq ($(GOAL),$(findstring $(GOAL),$(POLC_GRP)))
PLAYER_FLAGS	= -DVCDLC -DNO_ZERO_MUTE -DSPATIAL -DEQUALIZER \
		  -DLESS_DISP_MEM -DMIC_REC_STUD -DBILINGUAL_OSD
endif


#
# Starting location for stack
#
STACKBASE	= 0x4000
ADJUST_STACK	=

ifeq ($(GOAL),$(findstring $(GOAL),$(VCDLC_GRP) $(POLC_GRP)))
STACKBASE	= 0x2824 #0x2780
endif
VCD20STACK	= -DVCD20STACK=$(STACKBASE)


#
# ROMSIZE support
#
ROMTRICK	=
ifeq ($(GOAL),$(findstring $(GOAL),$(ROM_256K_GRP)))
ROMTRICK = -DUSE_256KROM
endif
ifeq ($(GOAL),$(findstring $(GOAL),$(ROM_512K_GRP)))
ROMTRICK = -DUSE_512KROM
endif

#
# DATA_CD support
#
DATA_CD_TRICK	=

#
# SCR_SAVER support
#
SCRSV_FLAGS = -DSCR_SAVER
SCRSV_SRC =
ifeq ($(SCRSV_FLAGS),$(findstring $(SCRSV_FLAGS),$(SYSOPTIONS)))
SCRSV_SRC = scrsaver.c
endif

#
# GAMEBOY support
#
VGB_FLAG	=
VGB_CD_FLAG	=

GBTRICK		=
ifeq ($(GOAL),$(findstring $(GOAL),$(GAMEBOY_GRP)))
GBTRICK = $(GAMEFLAGS) -DXSEG2_ON_FLY
DATA_CD_TRICK	= -DDATA_CD
endif
ifeq ($(GOAL),$(findstring $(GOAL),$(GM_CD_GRP)))
GBTRICK = $(GAMEFLAGS) $(VGB_FLAG) -DCD_GAME -DROM_IN_CD -DINES_CD
endif
ifeq ($(GOAL),$(findstring $(GOAL),$(GM_EM_GRP)))
GBTRICK = $(GAMEFLAGS) $(VGB_FLAG) -DCD_GAME
endif

#
# JPEG file support
#
JPEGTRICK	=
ifeq ($(GOAL),$(findstring $(GOAL),$(JPEG_GRP)))
JPEGTRICK = $(JPEGFLAGS)
DATA_CD_TRICK	= -DDATA_CD
endif

#
# WMA support
#
WMATRICK	=
ifeq ($(GOAL),$(findstring $(GOAL),$(WMA_GRP)))
WMATRICK = $(WMAFLAGS)
DATA_CD_TRICK	= -DDATA_CD
endif


#
# MP3 play support
#
BLK_HUFF_FLAG = -DMP3_BLK_HUFF
ifeq ($(GOAL),$(findstring $(GOAL),$(VCDLC_GRP) $(POLC_GRP)))
BLK_HUFF_FLAG =
endif

MP3TRICK	= $(MP3FLAGS) -DMP3_STUD
ifeq ($(GOAL),$(findstring $(GOAL),$(MP3_GRP)))
MP3TRICK = $(MP3FLAGS) $(BLK_HUFF_FLAG)
DATA_CD_TRICK	= -DDATA_CD
endif
ifeq ($(GOAL),$(findstring $(GOAL),$(MP3_XSEG_GRP)))
MP3TRICK = $(MP3FLAGS) $(BLK_HUFF_FLAG) -DXSEG4_ON_FLY
DATA_CD_TRICK	= -DDATA_CD
endif

#
# default emulator
#
NEW_EMULATOR = -DNEW_EMULATOR


#
# Options for making ROM
#
ROMSIZE = 128
ifeq ($(GOAL),$(findstring $(GOAL),$(ROM_256K_GRP)))
ROMSIZE = 256
endif
ifeq ($(GOAL),$(findstring $(GOAL),$(ROM_512K_GRP)))
ROMSIZE = 512
endif

#
# MEMDELAY
#
MEMDELAYH	= 0x001d		# 3208 + wait state
MEMDELAYL	= 0x6c1e		# 1d6c1e (0x1a, 0x1b, 0, 0x1e)
					# Bank3:  5 wait states
					# Bank2:  4 wait states
					# Bank1: 32 wait states
					# Bank0:  1 wait state
ifeq ($(GOAL),$(findstring $(GOAL),$(CPUCLK_675_GRP)))
MEMDELAYH = 0x001d	# Bank3: 5 WS (89ns)
endif
ifeq ($(GOAL),$(findstring $(GOAL),$(CPUCLK_810_GRP)))
MEMDELAYH = 0x001c	# Bank3: 7 WS (98ns)
endif

#
# Buscon_dram_control. For VCD systems using 0.5MB/2MB EDO DRAM
#
DRAM_CONTROL		= 0x204			# Ref. on; .5MB; 2T3T3T
# Set bit 5 of BUSCON_DMA_SCALE_TYPE to use 1Mx16bits DRAM
BIG_MEM_BIT		= 0			# .5MB
DRAM_FLAGS		=

ifeq ($(GOAL),$(findstring $(GOAL),$(BIG_MEM_GRP)))
DRAM_CONTROL		 = 0x384 		# Ref. on;  2MB; 2T3T3T
BIG_MEM_BIT 		= 0x20			# 2MB
DRAM_FLAGS		= -DBIG_MEM
endif

#
# ROM related defines
#
ROMBANK		 = 3			# Bank3 for everybody

# Bank3 is 4 wait state (54MHz clock)
#					:= MEMDELAYL = 0x801e

# c001d (0x18, 0, 0, 0x1d). Bank3 is 110ns flash.
# Bank3:  7 wait states  Bank2: 32 wait states
# Bank1: 32 wait states  Bank0:  2 wait states
#					:= MEMDELAYH = 0x000c
#					:= MEMDELAYL = 0x001d

#
# ROM Related
#
ROMBASE		 = 40000				# Include emulator
BOOT_START	 = cfffd64


#
# Heap only used in targets with printf()
#
HEAPL = 0x5000
HEAPH = 0x0

#
# B-Frame flags
#
# Original default is with -DBF43 -DBF43PLUS
#
#
BF_FLAGS = -DBF43 -DBF43PLUS


#
# Board type
#
BOARD =	$(DRAM_FLAGS) -DBD_MONDENA
ifeq ($(GOAL),$(findstring $(GOAL),$(DAYTONA_GRP)))
BOARD = $(DRAM_FLAGS) -DBD_DAYTONA
endif
ifeq ($(GOAL),$(findstring $(GOAL),$(DAYTONA2_GRP)))
BOARD = $(DRAM_FLAGS) -DBD_DAYTONA2
endif
ifeq ($(GOAL),$(findstring $(GOAL),$(PHILIPS_GRP)))
BOARD = $(DRAM_FLAGS) -DBD_PHILIPS
endif
ifeq ($(GOAL),$(findstring $(GOAL),$(COUNTACH_GRP)))
BOARD = $(DRAM_FLAGS) -DBD_COUNTACH
endif
ifeq ($(GOAL),$(findstring $(GOAL),$(COUNTAC2_GRP)))
BOARD = $(DRAM_FLAGS) -DBD_COUNTAC2
endif
ifeq ($(GOAL),$(findstring $(GOAL),$(COUNTAC8_GRP)))
BOARD = $(DRAM_FLAGS) -DBD_COUNTAC8
endif
ifeq ($(GOAL),$(findstring $(GOAL),$(MONDENA_GRP)))
BOARD = $(DRAM_FLAGS) -DBD_MONDENA
endif

⌨️ 快捷键说明

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