# The top part of this Makefile is used to define custom options for a number of compilation targets
# To define an additional target simply look at the other defined targets and add a new TARGET entry with a unique number and the custom options required
XILINX_TOOLS_PREFIX=
# Copy update (only when destination is older or missing)
CP= cp -u
# Make directory, no error if already existing
MKDIR= mkdir -p
# Remove recursive, force
RMDIR= rm -rf
# Path to make
MAKE= make
# Custom prefix for build directories, each target is built into its own separate directory name formed by combining the PREFIX and TARGET names.
# This way the source is not polluted with build files and the build directories are left behind after compilation so logs and reports can be
# examined or can be easily deleted with "make clean"
PREFIX= __
# Options to be passed to XST
XST_OPTS_BASE= run
XST_OPTS_BASE+= -ifn xst.prj
XST_OPTS_BASE+= -ifmt mixed
XST_OPTS_BASE+= -ofmt NGC
XST_OPTS_BASE+= -lso xst.lso
XST_OPTS_BASE+= -top fpga_top
XST_OPTS_BASE+= -resource_sharing yes
# Optimizations for speed (default)
XST_OPTS_SPEED= -opt_mode Speed
XST_OPTS_SPEED+= -opt_level 1
XST_OPTS_SPEED+= -fsm_style lut
XST_OPTS_SPEED+= -fsm_encoding auto
# Optimization for reduced space
XST_OPTS_AREA= -opt_mode area
XST_OPTS_AREA+= -opt_level 2
XST_OPTS_AREA+= -fsm_style bram
XST_OPTS_AREA+= -fsm_encoding compact
# Types of selective module compilation:
# WITH_LF Enables selection of LF modules (and disables all HF)
# To enable these modules WITH_LF _MUST_ be defined
# WITH_LF0 enable LF reader (generic)
# WITH_LF1 enable LF edge detect (generic)
# WITH_LF2 enable LF passthrough
# WITH_LF3 enable LF ADC (read/write)
# To enable these modules WITH_LF _MUST_NOT_ be defined
# WITH_HF0 enable HF reader (see also WITH_HF_15 below)
# WITH_HF_15 select "iso15 2sc mode" extensions instead of original
# WITH_HF1 enable HF simulated tag
# WITH_HF2 enable HF ISO14443-A
# WITH_HF3 enable sniff
# WITH_HF4 enable HF ISO18092 FeliCa
# WITH_HF5 enable HF get trace
# RDV40/Generic - Enable LF and all the LF modules