Carmelo Cascone | 8277e01 | 2017-09-27 17:57:34 +0200 | [diff] [blame^] | 1 | BMV2_CPU_PORT=255 |
| 2 | MAVERICKS_CPU_PORT=320 |
| 3 | MONTARA_CPU_PORT=192 |
| 4 | |
| 5 | MAVERICKS_OPTIONS=-DCPU_PORT=$(MAVERICKS_CPU_PORT) |
| 6 | MONTARA_OPTIONS=-DCPU_PORT=$(MONTARA_CPU_PORT) |
| 7 | BMV2_OPTIONS=-DDO_BMV2_BUILD -DCPU_PORT=$(BMV2_CPU_PORT) |
| 8 | |
| 9 | all: tor-bmv2 tor-tofino |
| 10 | |
| 11 | tor-bmv2: class_id.p4 headers.p4 ipv4_checksum.p4 l3_fwd.p4 \ |
| 12 | packetio.p4 parser.p4 punt.p4 \ |
| 13 | spoof_protection.p4 tor.p4 vrf.p4 |
| 14 | p4c-bm2-ss $(BMV2_OPTIONS) -o p4c-out/tor.json \ |
| 15 | --p4runtime-file p4c-out/tor.p4info \ |
| 16 | --p4runtime-format text tor.p4 |
| 17 | |
| 18 | tor-tofino: class_id.p4 headers.p4 ipv4_checksum.p4 l3_fwd.p4 \ |
| 19 | packetio.p4 parser.p4 punt.p4 \ |
| 20 | spoof_protection.p4 tor.p4 vrf.p4 |
| 21 | p4c -x p4-16 -b tofino-v1model-barefoot \ |
| 22 | $(MAVERICKS_OPTIONS) -o p4c-out/tofino/tor/mavericks \ |
| 23 | --p4runtime-file p4c-out/tofino/tor/mavericks/tor.p4info \ |
| 24 | --p4runtime-format text tor.p4 |
| 25 | p4c -x p4-16 -b tofino-v1model-barefoot \ |
| 26 | $(MONTARA_OPTIONS) -o p4c-out/tofino/tor/montara \ |
| 27 | --p4runtime-file p4c-out/tofino/tor/montara/tor.p4info \ |
| 28 | --p4runtime-format text tor.p4 |
| 29 | |
| 30 | clean: |
| 31 | rm -rf p4c-out/*.json |
| 32 | rm -rf p4c-out/*.p4info |