Carmelo Cascone | 54fb90e | 2017-08-31 21:07:25 +0200 | [diff] [blame^] | 1 | BMV2_CPU_PORT=255 |
Carmelo Cascone | b752427 | 2017-06-05 16:53:13 -0400 | [diff] [blame] | 2 | |
Carmelo Cascone | 54fb90e | 2017-08-31 21:07:25 +0200 | [diff] [blame^] | 3 | BMV2_OPTIONS=-DDO_BMV2_BUILD -DCPU_PORT=$(BMV2_CPU_PORT) |
| 4 | |
| 5 | all: bmv2 |
| 6 | |
| 7 | bmv2: default-bmv2 empty-bmv2 ecmp-bmv2 wcmp-bmv2 |
| 8 | |
| 9 | default-bmv2: default.p4 |
| 10 | p4c-bm2-ss $(BMV2_OPTIONS) --p4v 14 -o p4c-out/default.json \ |
Carmelo Cascone | b752427 | 2017-06-05 16:53:13 -0400 | [diff] [blame] | 11 | --p4runtime-file p4c-out/default.p4info --p4runtime-format text \ |
| 12 | default.p4 |
| 13 | |
Carmelo Cascone | 54fb90e | 2017-08-31 21:07:25 +0200 | [diff] [blame^] | 14 | empty-bmv2: empty.p4 |
Carmelo Cascone | b752427 | 2017-06-05 16:53:13 -0400 | [diff] [blame] | 15 | 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 Cascone | 54fb90e | 2017-08-31 21:07:25 +0200 | [diff] [blame^] | 19 | ecmp-bmv2: ecmp.p4 |
| 20 | p4c-bm2-ss $(BMV2_OPTIONS) --p4v 14 -o p4c-out/ecmp.json \ |
Carmelo Cascone | fc3776d | 2017-08-21 23:17:22 +0200 | [diff] [blame] | 21 | --p4runtime-file p4c-out/ecmp.p4info --p4runtime-format text \ |
Carmelo Cascone | b752427 | 2017-06-05 16:53:13 -0400 | [diff] [blame] | 22 | ecmp.p4 |
| 23 | |
Carmelo Cascone | 54fb90e | 2017-08-31 21:07:25 +0200 | [diff] [blame^] | 24 | wcmp-bmv2: wcmp.p4 |
| 25 | p4c-bm2-ss $(BMV2_OPTIONS) --p4v 14 -o p4c-out/wcmp.json \ |
Carmelo Cascone | 16de6db | 2017-08-22 00:27:57 +0200 | [diff] [blame] | 26 | --p4runtime-file p4c-out/wcmp.p4info --p4runtime-format text \ |
Carmelo Cascone | b752427 | 2017-06-05 16:53:13 -0400 | [diff] [blame] | 27 | wcmp.p4 |
| 28 | |
| 29 | clean: |
| 30 | rm -rf p4c-out/*.json |
| 31 | rm -rf p4c-out/*.p4info |