#################################################################
# Makefile generated by Xilinx Platform Studio 
# Project:C:\edk_user_repository\lab1\system.xmp
#################################################################

XILINX_EDK_DIR = C:/EDK/

SYSTEM = system

MHSFILE = system.mhs

MSSFILE = system.mss

FPGA_ARCH = spartan3

DEVICE = xc3s400ft256-4

LANGUAGE = vhdl

SEARCHPATHOPT = 

SUBMODULE_OPT = 

PLATGEN_OPTIONS = -p $(DEVICE) -lang $(LANGUAGE) $(SEARCHPATHOPT) $(SUBMODULE_OPT)

LIBGEN_OPTIONS = -mhs $(MHSFILE) -p $(DEVICE) $(SEARCHPATHOPT) \
                   $(MICROBLAZE_0_LIBG_OPT)

TESTAPP_OUTPUT_DIR = TestApp
TESTAPP_OUTPUT = $(TESTAPP_OUTPUT_DIR)/executable.elf

MICROBLAZE_BOOTLOOP = $(XILINX_EDK_DIR)/sw/lib/microblaze/mb_bootloop.elf
PPC405_BOOTLOOP = $(XILINX_EDK_DIR)/sw/lib/ppc405/ppc_bootloop.elf
BOOTLOOP_DIR = bootloops

MICROBLAZE_0_BOOTLOOP = $(BOOTLOOP_DIR)/microblaze_0.elf
MICROBLAZE_0_XMDSTUB = microblaze_0/code/xmdstub.elf

BRAMINIT_ELF_FILES =  $(TESTAPP_OUTPUT) 
BRAMINIT_ELF_FILE_ARGS =   -pe microblaze_0 $(TESTAPP_OUTPUT) 

ALL_USER_ELF_FILES = $(TESTAPP_OUTPUT) 

SIM_CMD = vsim

BEHAVIORAL_SIM_SCRIPT = simulation/behavioral/$(SYSTEM).do

STRUCTURAL_SIM_SCRIPT = simulation/structural/$(SYSTEM).do

TIMING_SIM_SCRIPT = simulation/timing/$(SYSTEM).do

DEFAULT_SIM_SCRIPT = $(BEHAVIORAL_SIM_SCRIPT)

MIX_LANG_SIM_OPT = -mixed yes

SIMGEN_OPTIONS = -p $(DEVICE) -lang $(LANGUAGE) $(SEARCHPATHOPT) $(SUBMODULE_OPT) $(BRAMINIT_ELF_FILE_ARGS) $(MIX_LANG_SIM_OPT) -s mti

MICROBLAZE_0_XMDSTUB = microblaze_0/code/xmdstub.elf

LIBRARIES =  \
       microblaze_0/lib/libxil.a 

LIBSCLEAN_TARGETS = microblaze_0_libsclean 

PROGRAMCLEAN_TARGETS = TestApp_programclean 

CORE_STATE_DEVELOPMENT_FILES = 

WRAPPER_NGC_FILES = implementation/opb_intc_0_wrapper.ngc \
implementation/opb_bram_if_cntlr_1_bram_wrapper.ngc \
implementation/opb_bram_if_cntlr_1_wrapper.ngc \
implementation/microblaze_0_wrapper.ngc \
implementation/mb_opb_wrapper.ngc \
implementation/lmb_bram_wrapper.ngc \
implementation/ilmb_cntlr_wrapper.ngc \
implementation/ilmb_wrapper.ngc \
implementation/dlmb_cntlr_wrapper.ngc \
implementation/dlmb_wrapper.ngc \
implementation/debug_module_wrapper.ngc \
implementation/sram_256kx32_util_bus_split_0_wrapper.ngc \
implementation/sram_256kx32_wrapper.ngc \
implementation/rs232_wrapper.ngc \
implementation/push_buttons_3bit_wrapper.ngc \
implementation/leds_8bit_wrapper.ngc \
implementation/led_cathodes_wrapper.ngc \
implementation/led_anodes_wrapper.ngc

POSTSYN_NETLIST = implementation/$(SYSTEM).ngc

SYSTEM_BIT = implementation/$(SYSTEM).bit

DOWNLOAD_BIT = implementation/download.bit

SYSTEM_ACE = implementation/$(SYSTEM).ace

UCF_FILE = data/$(SYSTEM).ucf

BMM_FILE = implementation/$(SYSTEM).bmm

FASTRUNTIME_OPT_FILE = etc/fast_runtime.opt
BITGEN_UT_FILE = etc/bitgen_spartan3.ut

#################################################################
# SOFTWARE APPLICATION TESTAPP
#################################################################

TESTAPP_SOURCES = TestApp/src/TestApp.c 

TESTAPP_HEADERS = 

TESTAPP_CC = mb-gcc
TESTAPP_CC_SIZE = mb-size
TESTAPP_CC_OPT = -O2
TESTAPP_CFLAGS = 
TESTAPP_CC_SEARCH = # -B
TESTAPP_LIBPATH = -L./microblaze_0/lib/ # -L
TESTAPP_INCLUDES = -I./microblaze_0/include/ # -I
TESTAPP_LFLAGS = # -l
TESTAPP_CC_PREPROC_FLAG = # -Wp,
TESTAPP_CC_ASM_FLAG = # -Wa,
TESTAPP_CC_LINKER_FLAG = # -Wl,
TESTAPP_LINKER_SCRIPT = TestApp/src/TestAppLinkScr
TESTAPP_LINKER_SCRIPT_FLAG = -Wl,-T -Wl,$(TESTAPP_LINKER_SCRIPT) 
TESTAPP_CC_DEBUG_FLAG =  -g 
TESTAPP_CC_PROFILE_FLAG = # -pg
TESTAPP_CC_GLOBPTR_FLAG= # -mxl-gp-opt
TESTAPP_MODE = executable
TESTAPP_LIBG_OPT = -$(TESTAPP_MODE) microblaze_0
TESTAPP_CC_SOFTMUL_FLAG= -mno-xl-soft-mul 
TESTAPP_CC_START_ADDR_FLAG=  # -Wl,-defsym -Wl,_TEXT_START_ADDR=
TESTAPP_CC_STACK_SIZE_FLAG=  # -Wl,-defsym -Wl,_STACK_SIZE=
TESTAPP_OTHER_CC_FLAGS= $(TESTAPP_CC_GLOBPTR_FLAG)  \
                  $(TESTAPP_CC_START_ADDR_FLAG) $(TESTAPP_CC_STACK_SIZE_FLAG)  \
                  $(TESTAPP_CC_SOFTMUL_FLAG)  \
                  $(TESTAPP_CC_PREPROC_FLAG) $(TESTAPP_CC_ASM_FLAG) $(TESTAPP_CC_LINKER_FLAG)  \
                  $(TESTAPP_LINKER_SCRIPT_FLAG) $(TESTAPP_CC_DEBUG_FLAG) $(TESTAPP_CC_PROFILE_FLAG) 
