blob: ca73869368b44607048c8cd52251d66ad593ade2 [file] [log] [blame]
Carmelo Cascone54fb90e2017-08-31 21:07:25 +02001BMV2_CPU_PORT=255
Carmelo Casconeb7524272017-06-05 16:53:13 -04002
Carmelo Cascone54fb90e2017-08-31 21:07:25 +02003BMV2_OPTIONS=-DDO_BMV2_BUILD -DCPU_PORT=$(BMV2_CPU_PORT)
4
5all: bmv2
6
7bmv2: default-bmv2 empty-bmv2 ecmp-bmv2 wcmp-bmv2
8
9default-bmv2: default.p4
10 p4c-bm2-ss $(BMV2_OPTIONS) --p4v 14 -o p4c-out/default.json \
Carmelo Casconeb7524272017-06-05 16:53:13 -040011 --p4runtime-file p4c-out/default.p4info --p4runtime-format text \
12 default.p4
13
Carmelo Cascone54fb90e2017-08-31 21:07:25 +020014empty-bmv2: empty.p4
Carmelo Casconeb7524272017-06-05 16:53:13 -040015 p4c-bm2-ss --p4v 14 -o p4c-out/empty.json \
16 --p4runtime-file p4c-out/empty.p4info --p4runtime-format text \
17 empty.p4
18
Carmelo Cascone54fb90e2017-08-31 21:07:25 +020019ecmp-bmv2: ecmp.p4
20 p4c-bm2-ss $(BMV2_OPTIONS) --p4v 14 -o p4c-out/ecmp.json \
Carmelo Casconefc3776d2017-08-21 23:17:22 +020021 --p4runtime-file p4c-out/ecmp.p4info --p4runtime-format text \
Carmelo Casconeb7524272017-06-05 16:53:13 -040022 ecmp.p4
23
Carmelo Cascone54fb90e2017-08-31 21:07:25 +020024wcmp-bmv2: wcmp.p4
25 p4c-bm2-ss $(BMV2_OPTIONS) --p4v 14 -o p4c-out/wcmp.json \
Carmelo Cascone16de6db2017-08-22 00:27:57 +020026 --p4runtime-file p4c-out/wcmp.p4info --p4runtime-format text \
Carmelo Casconeb7524272017-06-05 16:53:13 -040027 wcmp.p4
28
29clean:
30 rm -rf p4c-out/*.json
31 rm -rf p4c-out/*.p4info