blob: b5dc8d9ec3f7480955e4ab78901eb7eaf67f0432 [file] [log] [blame]
Carmelo Cascone8277e012017-09-27 17:57:34 +02001BMV2_CPU_PORT=255
2MAVERICKS_CPU_PORT=320
3MONTARA_CPU_PORT=192
4
5MAVERICKS_OPTIONS=-DCPU_PORT=$(MAVERICKS_CPU_PORT)
6MONTARA_OPTIONS=-DCPU_PORT=$(MONTARA_CPU_PORT)
7BMV2_OPTIONS=-DDO_BMV2_BUILD -DCPU_PORT=$(BMV2_CPU_PORT)
8
9all: tor-bmv2 tor-tofino
10
11tor-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
18tor-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
30clean:
31 rm -rf p4c-out/*.json
32 rm -rf p4c-out/*.p4info