ONOS-6457 Improved bmv2.py mininet script

- Starts BMv2 with empty.p4 as when running with --no-p4 the switch
  crashes
- Automatically send a netcfg JSON to ONOS for each device
- Makefile to build all P4 programs (needed for empty.p4)

Change-Id: Ib872641751c543aac6c752610b1ce88a1a00d0d2
diff --git a/tools/test/p4src/Makefile b/tools/test/p4src/Makefile
new file mode 100644
index 0000000..87888e0
--- /dev/null
+++ b/tools/test/p4src/Makefile
@@ -0,0 +1,23 @@
+all: default.json empty.json ecmp.json wcmp.json
+
+default.json: default.p4
+	p4c-bm2-ss --p4v 14 -o p4c-out/default.json \
+	--p4runtime-file p4c-out/default.p4info --p4runtime-format text \
+	default.p4
+
+empty.json: empty.p4
+	p4c-bm2-ss --p4v 14 -o p4c-out/empty.json \
+	--p4runtime-file p4c-out/empty.p4info --p4runtime-format text \
+	empty.p4
+
+ecmp.json: ecmp.p4
+	p4c-bmv2 --json p4c-out/ecmp.json \
+	ecmp.p4
+
+wcmp.json: wcmp.p4
+	p4c-bmv2 --json p4c-out/wcmp.json \
+	wcmp.p4
+
+clean:
+	rm -rf p4c-out/*.json
+	rm -rf p4c-out/*.p4info
\ No newline at end of file