summaryrefslogtreecommitdiffstats
path: root/usrp2/top/Makefile.common
diff options
context:
space:
mode:
authorMatt Ettus <matt@ettus.com>2010-06-14 13:23:18 -0700
committerMatt Ettus <matt@ettus.com>2010-06-14 13:23:18 -0700
commita97707caa8e9f19fdc81061ac11a73f41aab2704 (patch)
treec75983a4caff316fe1c64cdba047229ac4584cc7 /usrp2/top/Makefile.common
parenta4b11332ab4f6a24bf4645c0b2770f9578a36f45 (diff)
parent9445315e6a5cdfb29c4ead73b0fcd4d5fd75b900 (diff)
downloaduhd-a97707caa8e9f19fdc81061ac11a73f41aab2704.tar.gz
uhd-a97707caa8e9f19fdc81061ac11a73f41aab2704.tar.bz2
uhd-a97707caa8e9f19fdc81061ac11a73f41aab2704.zip
Merge branch 'master' into u1e_newbuild
Made so Makefile changes as well to get it to build * master: new make works on ise12 produces good bin files first attempt at cleaning up the build system get rid of debug stuff to help timing move u2_core into u2_rev3 directory to simplify directory structure and save headaches Conflicts: usrp2/fifo/fifo36_to_fifo18.v usrp2/top/u2_rev3/Makefile usrp2/top/u2_rev3/Makefile.udp usrp2/top/u2_rev3/u2_core_udp.v
Diffstat (limited to 'usrp2/top/Makefile.common')
-rw-r--r--usrp2/top/Makefile.common57
1 files changed, 57 insertions, 0 deletions
diff --git a/usrp2/top/Makefile.common b/usrp2/top/Makefile.common
new file mode 100644
index 000000000..d1c89fdfb
--- /dev/null
+++ b/usrp2/top/Makefile.common
@@ -0,0 +1,57 @@
+#
+# Copyright 2008, 2009, 2010 Ettus Research LLC
+#
+
+##################################################
+# Constants
+##################################################
+ISE_VER = $(shell xtclsh -h | head -n1 | cut -f2 -d" " | cut -f1 -d.)
+ifeq ($(ISE_VER),10)
+ ISE_EXT = ise
+else
+ ISE_EXT = xise
+endif
+BASE_DIR = $(abspath ..)
+ISE_HELPER = xtclsh $(BASE_DIR)/tcl/ise_helper.tcl
+ISE_FILE = $(BUILD_DIR)/$(TOP_MODULE).$(ISE_EXT)
+BIN_FILE = $(BUILD_DIR)/$(TOP_MODULE).bin
+MCS_FILE = $(BUILD_DIR)/$(TOP_MODULE).mcs
+
+##################################################
+# Global Targets
+##################################################
+all: bin
+
+proj: $(ISE_FILE)
+
+check: $(ISE_FILE)
+ $(ISE_HELPER) "Check Syntax"
+
+synth: $(ISE_FILE)
+ $(ISE_HELPER) "Synthesize - XST"
+
+bin: $(BIN_FILE)
+
+mcs: $(MCS_FILE)
+
+clean:
+ $(RM) -r $(BUILD_DIR)
+
+.PHONY: all proj check synth bin mcs clean
+
+##################################################
+# Dependency Targets
+##################################################
+$(ISE_FILE): $(SOURCES)
+ @echo $@
+ $(ISE_HELPER) ""
+
+$(BIN_FILE): $(ISE_FILE)
+ @echo $@
+ $(ISE_HELPER) "Generate Programming File"
+ touch $@
+
+$(MCS_FILE): $(BIN_FILE)
+ promgen -w -spi -p mcs -o $(MCS_FILE) -s 4096 -u 0 $(BIN_FILE)
+
+.EXPORT_ALL_VARIABLES: