aboutsummaryrefslogtreecommitdiffstats
path: root/fpga/usrp2/top/Makefile.common
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-06-15 18:24:33 -0700
committerJosh Blum <josh@joshknows.com>2010-06-15 18:24:33 -0700
commitedcc2df10ba59ed91ac9513c2dc1d36e155caaec (patch)
tree1a1ec2c0b5500990c991c27af03dbe48c10ce7ca /fpga/usrp2/top/Makefile.common
parenta89d684ba2b81c6e18d348965dffb919edb56fea (diff)
parent9445315e6a5cdfb29c4ead73b0fcd4d5fd75b900 (diff)
downloaduhd-edcc2df10ba59ed91ac9513c2dc1d36e155caaec.tar.gz
uhd-edcc2df10ba59ed91ac9513c2dc1d36e155caaec.tar.bz2
uhd-edcc2df10ba59ed91ac9513c2dc1d36e155caaec.zip
Merge branch 'master' of ettus.sourcerepo.com:ettus/fpga into uhd_master
Conflicts: fpga/.gitignore
Diffstat (limited to 'fpga/usrp2/top/Makefile.common')
-rw-r--r--fpga/usrp2/top/Makefile.common57
1 files changed, 57 insertions, 0 deletions
diff --git a/fpga/usrp2/top/Makefile.common b/fpga/usrp2/top/Makefile.common
new file mode 100644
index 000000000..d1c89fdfb
--- /dev/null
+++ b/fpga/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: