########################################
#  This file was generated by hdlmake  #
#  http://ohwr.org/projects/hdl-make/  #
########################################

PROJECT := spec_gn4124_test.xise
ISE_CRAP := *.bgn *.html *.tcl *.bld *.cmd_log *.drc *.lso *.ncd *.ngc *.ngd *.ngr *.pad *.par *.pcf *.prj *.ptwx *.stx *.syr *.twr *.twx *.gise *.unroutes *.ut *.xpi *.xst *_bitgen.xwbt *_envsettings.html *_guide.ncd *_map.map *_map.mrp *_map.ncd *_map.ngm *_map.xrpt *_ngdbuild.xrpt *_pad.csv *_pad.txt *_par.xrpt *_summary.html *_summary.xml *_usage.xml *_xst.xrpt usage_statistics_webtalk.html webtalk.log webtalk_pn.xml run.tcl

#target for performing local synthesis
local:
		echo "project open $(PROJECT)" > run.tcl
		echo "process run {Generate Programming File} -force rerun_all" >> run.tcl
		xtclsh run.tcl


#target for cleaing all intermediate stuff
clean:
		rm -f $(ISE_CRAP)
		rm -rf xst xlnx_auto_*_xdb iseconfig _xmsgs _ngo
    
#target for cleaning final files
mrproper:
		rm -f *.bit *.bin *.mcs

USER:=pawel
SERVER:=htsynth
R_NAME:=spec_gn4124_test

__test_for_remote_synthesis_variables:
		true #dummy

CWD := $(shell pwd)

FILES := ../spec_gn4124_test.ucf \
../rtl/spec_gn4124_test.vhd \
../../common/rtl/dummy_ctrl_regs.vhd \
../../common/rtl/dummy_stat_regs.vhd \
../../common/rtl/wb_addr_decoder.vhd \
../../gn4124core/rtl/dma_controller.vhd \
../../gn4124core/rtl/dma_controller_wb_slave.vhd \
../../gn4124core/rtl/l2p_arbiter.vhd \
../../gn4124core/rtl/l2p_dma_master.vhd \
../../gn4124core/rtl/p2l_decode32.vhd \
../../gn4124core/rtl/p2l_dma_master.vhd \
../../gn4124core/rtl/wbmaster32.vhd \
../../gn4124core/rtl/spartan6/gn4124_core.vhd \
../../gn4124core/rtl/spartan6/gn4124_core_pkg.vhd \
../../gn4124core/rtl/spartan6/l2p_ser.vhd \
../../gn4124core/rtl/spartan6/p2l_des.vhd \
../../gn4124core/rtl/spartan6/serdes_1_to_n_clk_pll_s2_diff.vhd \
../../gn4124core/rtl/spartan6/serdes_1_to_n_data_s2_se.vhd \
../../gn4124core/rtl/spartan6/serdes_n_to_1_s2_diff.vhd \
../../gn4124core/rtl/spartan6/serdes_n_to_1_s2_se.vhd \
../ip_cores/general-cores/modules/common/gencores_pkg.vhd \
../ip_cores/general-cores/modules/common/gc_crc_gen.vhd \
../ip_cores/general-cores/modules/common/gc_moving_average.vhd \
../ip_cores/general-cores/modules/common/gc_extend_pulse.vhd \
../ip_cores/general-cores/modules/common/gc_delay_gen.vhd \
../ip_cores/general-cores/modules/common/gc_dual_pi_controller.vhd \
../ip_cores/general-cores/modules/common/gc_serial_dac.vhd \
../ip_cores/general-cores/modules/common/gc_sync_ffs.vhd \
../ip_cores/general-cores/modules/genrams/genram_pkg.vhd \
../ip_cores/general-cores/modules/wishbone/wishbone_pkg.vhd \
../ip_cores/general-cores/modules/genrams/xilinx/generic_async_fifo.vhd \
../ip_cores/general-cores/modules/genrams/xilinx/generic_dpram.vhd \
../ip_cores/general-cores/modules/genrams/xilinx/generic_spram.vhd \
../ip_cores/general-cores/modules/genrams/xilinx/generic_sync_fifo.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/blk_mem_gen_v4_1/blk_mem_gen_v4_1_xst_comp.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/blk_mem_gen_v4_1/blk_mem_gen_v4_1_defaults.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/blk_mem_gen_v4_1/blk_mem_gen_v4_1_pkg.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/blk_mem_gen_v4_1/blk_mem_gen_getinit_pkg.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/blk_mem_gen_v4_1/blk_mem_min_area_pkg.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/blk_mem_gen_v4_1/blk_mem_gen_bindec.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/blk_mem_gen_v4_1/blk_mem_gen_mux.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/blk_mem_gen_v4_1/blk_mem_gen_prim_wrapper_s6.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/blk_mem_gen_v4_1/blk_mem_gen_prim_wrapper_s6_init.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/blk_mem_gen_v4_1/blk_mem_gen_prim_wrapper_s3adsp.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/blk_mem_gen_v4_1/blk_mem_gen_prim_wrapper_s3adsp_init.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/blk_mem_gen_v4_1/blk_mem_gen_prim_wrapper_s3a.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/blk_mem_gen_v4_1/blk_mem_gen_prim_wrapper_s3a_init.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/blk_mem_gen_v4_1/blk_mem_gen_prim_wrapper_v6.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/blk_mem_gen_v4_1/blk_mem_gen_prim_wrapper_v6_init.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/blk_mem_gen_v4_1/blk_mem_gen_prim_wrapper_v5.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/blk_mem_gen_v4_1/blk_mem_gen_prim_wrapper_v5_init.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/blk_mem_gen_v4_1/blk_mem_gen_prim_wrapper_v4.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/blk_mem_gen_v4_1/blk_mem_gen_prim_wrapper_v4_init.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/blk_mem_gen_v4_1/blk_mem_gen_prim_wrapper_s3.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/blk_mem_gen_v4_1/blk_mem_gen_prim_wrapper_s3_init.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/blk_mem_gen_v4_1/blk_mem_gen_prim_width.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/blk_mem_gen_v4_1/blk_mem_gen_generic_cstr.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/blk_mem_gen_v4_1/blk_mem_gen_ecc_encoder.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/blk_mem_gen_v4_1/blk_mem_gen_ecc_decoder.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/blk_mem_gen_v4_1/blk_mem_input_block.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/blk_mem_gen_v4_1/blk_mem_output_block.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/blk_mem_gen_v4_1/blk_mem_gen_top.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/blk_mem_gen_v4_1/blk_mem_gen_v4_1_xst.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/fifo_generator_v6_1/fifo_generator_v6_1_pkg.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/fifo_generator_v6_1/fifo_generator_v6_1_defaults.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/fifo_generator_v6_1/fifo_generator_v6_1_xst_comp.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/fifo_generator_v6_1/input_blk.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/fifo_generator_v6_1/output_blk.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/fifo_generator_v6_1/shft_wrapper.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/fifo_generator_v6_1/shft_ram.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/fifo_generator_v6_1/dmem.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/fifo_generator_v6_1/memory.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/fifo_generator_v6_1/compare.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/fifo_generator_v6_1/wr_bin_cntr.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/fifo_generator_v6_1/rd_bin_cntr.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/fifo_generator_v6_1/updn_cntr.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/fifo_generator_v6_1/rd_status_flags_as.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/fifo_generator_v6_1/rd_status_flags_ss.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/fifo_generator_v6_1/rd_pe_as.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/fifo_generator_v6_1/rd_pe_ss.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/fifo_generator_v6_1/rd_handshaking_flags.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/fifo_generator_v6_1/rd_dc_as.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/fifo_generator_v6_1/rd_dc_fwft_ext_as.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/fifo_generator_v6_1/dc_ss.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/fifo_generator_v6_1/dc_ss_fwft.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/fifo_generator_v6_1/rd_fwft.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/fifo_generator_v6_1/rd_logic.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/fifo_generator_v6_1/reset_blk_ramfifo.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/fifo_generator_v6_1/clk_x_pntrs.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/fifo_generator_v6_1/wr_status_flags_as.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/fifo_generator_v6_1/wr_status_flags_ss.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/fifo_generator_v6_1/wr_pf_as.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/fifo_generator_v6_1/wr_pf_ss.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/fifo_generator_v6_1/wr_handshaking_flags.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/fifo_generator_v6_1/wr_dc_as.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/fifo_generator_v6_1/wr_dc_fwft_ext_as.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/fifo_generator_v6_1/wr_logic.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/fifo_generator_v6_1/wr_status_flags_sshft.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/fifo_generator_v6_1/rd_status_flags_sshft.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/fifo_generator_v6_1/wr_pf_sshft.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/fifo_generator_v6_1/rd_pe_sshft.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/fifo_generator_v6_1/logic_sshft.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/fifo_generator_v6_1/fifo_generator_ramfifo.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/fifo_generator_v6_1/fifo_generator_v6_1_comps_builtin.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/fifo_generator_v6_1/delay.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/fifo_generator_v6_1/clk_x_pntrs_builtin.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/fifo_generator_v6_1/bin_cntr.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/fifo_generator_v6_1/logic_builtin.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/fifo_generator_v6_1/reset_builtin.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/fifo_generator_v6_1/builtin_prim.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/fifo_generator_v6_1/builtin_extdepth.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/fifo_generator_v6_1/builtin_top.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/fifo_generator_v6_1/builtin_prim_v6.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/fifo_generator_v6_1/builtin_extdepth_v6.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/fifo_generator_v6_1/builtin_top_v6.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/fifo_generator_v6_1/fifo_generator_v6_1_builtin.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/fifo_generator_v6_1/rgtw.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/fifo_generator_v6_1/wgtr.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/fifo_generator_v6_1/input_block_fifo16_patch.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/fifo_generator_v6_1/output_block_fifo16_patch.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/fifo_generator_v6_1/fifo16_patch_top.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/fifo_generator_v6_1/fifo_generator_v6_1_fifo16_patch.vhd \
../ip_cores/general-cores/modules/genrams/coregen_ip/fifo_generator_v6_1/fifo_generator_v6_1_xst.vhd \
../ip_cores/general-cores/modules/wishbone/wb_onewire_master/wb_onewire_master.vhd \
../ip_cores/general-cores/modules/wishbone/wb_onewire_master/xwb_onewire_master.vhd \
../ip_cores/general-cores/modules/wishbone/wb_onewire_master/sockit_owm.v \
../ip_cores/general-cores/modules/wishbone/wb_i2c_master/i2c_master_bit_ctrl.vhd \
../ip_cores/general-cores/modules/wishbone/wb_i2c_master/i2c_master_byte_ctrl.vhd \
../ip_cores/general-cores/modules/wishbone/wb_i2c_master/i2c_master_top.vhd \
../ip_cores/general-cores/modules/wishbone/wb_i2c_master/wb_i2c_master.vhd \
../ip_cores/general-cores/modules/wishbone/wb_i2c_master/xwb_i2c_master.vhd \
../ip_cores/general-cores/modules/wishbone/wb_bus_fanout/xwb_bus_fanout.vhd \
../ip_cores/general-cores/modules/wishbone/wb_conmax/wb_conmax_pri_dec.vhd \
../ip_cores/general-cores/modules/wishbone/wb_conmax/wb_conmax_pri_enc.vhd \
../ip_cores/general-cores/modules/wishbone/wb_conmax/wb_conmax_arb.vhd \
../ip_cores/general-cores/modules/wishbone/wb_conmax/wb_conmax_msel.vhd \
../ip_cores/general-cores/modules/wishbone/wb_conmax/wbconmax_pkg.vhd \
../ip_cores/general-cores/modules/wishbone/wb_conmax/wb_conmax_slave_if.vhd \
../ip_cores/general-cores/modules/wishbone/wb_conmax/wb_conmax_master_if.vhd \
../ip_cores/general-cores/modules/wishbone/wb_conmax/wb_conmax_rf.vhd \
../ip_cores/general-cores/modules/wishbone/wb_conmax/wb_conmax_top.vhd \
../ip_cores/general-cores/modules/wishbone/wb_gpio_port/wb_gpio_port.vhd \
../ip_cores/general-cores/modules/wishbone/wb_gpio_port/xwb_gpio_port.vhd \
../ip_cores/general-cores/modules/wishbone/wb_simple_timer/wb_tics.vhd \
../ip_cores/general-cores/modules/wishbone/wb_uart/uart_async_rx.vhd \
../ip_cores/general-cores/modules/wishbone/wb_uart/uart_async_tx.vhd \
../ip_cores/general-cores/modules/wishbone/wb_uart/uart_baud_gen.vhd \
../ip_cores/general-cores/modules/wishbone/wb_uart/uart_wb_slave.vhd \
../ip_cores/general-cores/modules/wishbone/wb_uart/wb_simple_uart.vhd \
../ip_cores/general-cores/modules/wishbone/wb_vic/vic_prio_enc.vhd \
../ip_cores/general-cores/modules/wishbone/wb_vic/wb_slave_vic.wb \
../ip_cores/general-cores/modules/wishbone/wb_vic/wb_vic.vhd \
../ip_cores/general-cores/modules/wishbone/wb_spi/spi_clgen.v \
../ip_cores/general-cores/modules/wishbone/wb_spi/spi_shift.v \
../ip_cores/general-cores/modules/wishbone/wb_spi/spi_top.v \
../ip_cores/general-cores/modules/wishbone/wb_spi/wb_spi.vhd \
../ip_cores/general-cores/modules/wishbone/wb_spi/xwb_spi.vhd \
../ip_cores/general-cores/modules/wishbone/wb_virtual_uart/wb_virtual_uart.vhd \
../ip_cores/general-cores/modules/wishbone/wb_virtual_uart/wb_virtual_uart_slave.vhd \
../ip_cores/general-cores/modules/wishbone/wbgen2/wbgen2_dpssram.vhd \
../ip_cores/general-cores/modules/wishbone/wbgen2/wbgen2_eic.vhd \
../ip_cores/general-cores/modules/wishbone/wbgen2/wbgen2_fifo_async.vhd \
../ip_cores/general-cores/modules/wishbone/wbgen2/wbgen2_fifo_sync.vhd \
../ip_cores/general-cores/modules/wishbone/wbgen2/wbgen2_pkg.vhd \
../ip_cores/general-cores/modules/wishbone/wb_spi/timescale.v \
../ip_cores/general-cores/modules/wishbone/wb_spi/spi_defines.v \
run.tcl \
spec_gn4124_test.xise

#target for running simulation in the remote location
remote: __test_for_remote_synthesis_variables __send __do_synthesis __send_back
__send_back: __do_synthesis
__do_synthesis: __send
__send: __test_for_remote_synthesis_variables

__send:
		ssh $(USER)@$(SERVER) 'mkdir -p $(R_NAME)'
		rsync -Rav $(foreach file, $(FILES), $(shell readlink -f $(file))) $(USER)@$(SERVER):$(R_NAME)

__do_synthesis:
		ssh $(USER)@$(SERVER) 'cd $(R_NAME)$(CWD) && xtclsh run.tcl'

__send_back: 
		cd .. && rsync -av $(USER)@$(SERVER):$(R_NAME)$(CWD) . && cd $(CWD)

#target for removing stuff from the remote location
cleanremote:
		ssh $(USER)@$(SERVER) 'rm -rf $(R_NAME)'

#target for fetching all modules stored in repositories
fetch: __general-cores_fetch

__general-cores_fetch:
		PWD=$(shell pwd); cd ../ip_cores; if [ -d general-cores ]; then cd general-cores; git pull; else git clone git://ohwr.org/hdl-core-lib/general-cores.git; fi; cd $(PWD) 

