aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbryan newbold <bnewbold@leaflabs.com>2013-11-12 19:57:34 -0500
committerbryan newbold <bnewbold@leaflabs.com>2013-11-12 20:03:09 -0500
commit4782465ef5d08bd7e7a36085a3013ed379e90ec2 (patch)
treefe2deb9c67906aba6e7969e409bdcee40f064033
parentf155faea835fff5b953777d97ab73ca76696fbe3 (diff)
downloadbasic-hdl-template-4782465ef5d08bd7e7a36085a3013ed379e90ec2.zip
basic-hdl-template-4782465ef5d08bd7e7a36085a3013ed379e90ec2.tar.gz
hack fix for bug with include ordering
There seems to be a problem with the default target being overriden when a board-specific file is included before xilinx.mk. Workaround is to include targets last.
-rw-r--r--Makefile.example9
-rw-r--r--contrib/sp605/settings.mk (renamed from contrib/sp605/sp605.mk)0
-rw-r--r--contrib/xilinx.mk5
-rw-r--r--contrib/xula2/settings.mk12
-rw-r--r--contrib/xula2/targets.mk (renamed from contrib/xula2/xula2.mk)12
5 files changed, 22 insertions, 16 deletions
diff --git a/Makefile.example b/Makefile.example
index 8194587..c0c566d 100644
--- a/Makefile.example
+++ b/Makefile.example
@@ -8,11 +8,12 @@ vendor := xilinx
### Uncomment this line to use the Xilinx SP605 dev board with default
### configuration
-#include ./contrib/sp605/sp605.mk
+#include ./contrib/sp605/settings.mk
-### Uncomment this line to use the Xula2 dev board with default configuration
+### Uncomment these lines to use the Xula2 dev board with default configuration
### See also ./contrib/xula2/README.xula2
-include ./contrib/xula2/xula2.mk
+include ./contrib/xula2/settings.mk
+extra_includes += ./contrib/xula2/targets.mk
### Edit and uncomment the below lines to use a custom board
#board := exampleboard
@@ -26,7 +27,7 @@ include ./contrib/xula2/xula2.mk
### Uncomment this line and create a new makefile to include any
### hardware-specific targets (eg, upload via SPI)
-#extra_includes = exampleproj.mk
+#extra_includes += exampleproj.mk
part := $(device)$(speedgrade)-$(device_package)
diff --git a/contrib/sp605/sp605.mk b/contrib/sp605/settings.mk
index 857417b..857417b 100644
--- a/contrib/sp605/sp605.mk
+++ b/contrib/sp605/settings.mk
diff --git a/contrib/xilinx.mk b/contrib/xilinx.mk
index e891c1f..628af75 100644
--- a/contrib/xilinx.mk
+++ b/contrib/xilinx.mk
@@ -50,9 +50,10 @@
# "PRECIOUS" files will not be deleted by make as casually
.PRECIOUS: tb/%.isim
-.DEFAULT_GOAL: default
+# Setup default targets
default: bitfiles
-all: bitfiles
+all: default
+.DEFAULT_GOAL: default
# This file only works with Xilinx stuff
vendor = xilinx
diff --git a/contrib/xula2/settings.mk b/contrib/xula2/settings.mk
new file mode 100644
index 0000000..a185426
--- /dev/null
+++ b/contrib/xula2/settings.mk
@@ -0,0 +1,12 @@
+# xula2 device-specific configuration variables
+# put targets in targets.mk, not this file
+
+board := xula2
+family := spartan6
+device := XC6SLX25
+speedgrade := -2
+device_package := ftg256
+bitconf_file := ./contrib/xula2/xula2.bitconf
+ucf_file := ./contrib/xula2/xula2.ucf
+opt_file := ./contrib/default.opt
+
diff --git a/contrib/xula2/xula2.mk b/contrib/xula2/targets.mk
index 681fe38..ec941be 100644
--- a/contrib/xula2/xula2.mk
+++ b/contrib/xula2/targets.mk
@@ -1,16 +1,8 @@
-# xula2 device-specific configuration variables and make targets
+# xula2 device-specific configuration make targets.
+# put variables in settings.mk, not this file.
.PHONY: prog prog_flash
-board := xula2
-family := spartan6
-device := XC6SLX25
-speedgrade := -2
-device_package := ftg256
-bitconf_file := ./contrib/xula2/xula2.bitconf
-ucf_file := ./contrib/xula2/xula2.ucf
-opt_file := ./contrib/default.opt
-
# This target uploads directly to the FPGA; volatile
prog: build/$(project).bit
# First ensure that xsload.py is installed