##################################
#### MACRO DEFINTIONS AVAILABLE
##################################

#
# -U to disable
# -D to enable
#

ifdef ALLIANCE
ALLIANCE_OK = $(shell (test -d ${ALLIANCE}) ; echo $$?)
ifneq (${ALLIANCE_OK},0)
$(warning "ALLIANCE directory is not valid. So, PAT file format is not supported.")
ALLIANCE=
endif
endif

ALLIANCE_DEF=$(if ${ALLIANCE},-DPAT_TRACE_FORMAT,-UPAT_TRACE_FORMAT)


# ### FOR LIBRARY (OPT)
#
# netlist debugging
#

NETLIST_DEBUGGING = \
  -UDUMP_NETLIST_INFO                \
  -UDUMP_SIGNAL_STATS                \
  -UDUMP_FUNCLIST_INFO               \
  ${ALLIANCE_DEF}                    \
#

#
# scheduling options
#

SCHEDULING_OPTIONS = \
  -UUSE_PORT_DEPENDENCY  \
  -UDUMP_PORT_DEPENDENCY \
  -UDUMP_SCHEDULE_STATS  \
  -UNO_STATIC_SCHEDULE   \
  -UKEEP_GENERATED_CODE  \
  -UDUMP_COMBINATIONAL_LIST2DOT \
  -UPRINT_SCHEDULE       \

#
# others
#

OTHERS = \
  -UDUMP_STAGE            \
  -UCHECK_FSM_RULES       \
  -UCOMPIL_DEBUG          \
  -UDEBUG                 \
  -UUINT64                \
  -DINIT_SIGNALS_TO_ZERO  \
#  -UCHECK_MULTIWRITING2PORT      \
#  -UCHECK_MULTIWRITING2REGISTER  \

#
# ### FOR LIBRARY (DEBUG)
#

NETLIST_DEBUGGING-d = \
  -UDUMP_NETLIST_INFO                \
  -UDUMP_SIGNAL_STATS                \
  -UDUMP_FUNCLIST_INFO               \
  ${ALLIANCE_DEF}                    \
#

SCHEDULING_OPTIONS-d= \
  -UUSE_PORT_DEPENDENCY  \
  -DDUMP_PORT_DEPENDENCY \
  -UDUMP_SCHEDULE_STATS  \
  -UNO_STATIC_SCHEDULE   \
  -DKEEP_GENERATED_CODE  \
  -UDUMP_COMBINATIONAL_LIST2DOT \
  -UPRINT_SCHEDULE       \

OTHERS-d = \
  -UDUMP_STAGE            \
  -DCHECK_FSM_RULES       \
  -DCOMPIL_DEBUG          \
  -DDEBUG                 \
  -UUINT64                \
  -DINIT_SIGNALS_TO_ZERO  \
  -DCHECK_MULTIWRITING2PORT     \
  -DCHECK_MULTIWRITING2REGISTER \

# bug in UINT64 to fix

#
# ### FOR USERS
#

USERS_OPTIONS = \
  -UCHECK_FSM_RULES        \
  -UDUMP_READ -UDUMP_WRITE \

