blob: ca73869368b44607048c8cd52251d66ad593ade2 [file] [log] [blame]
BMV2_CPU_PORT=255
BMV2_OPTIONS=-DDO_BMV2_BUILD -DCPU_PORT=$(BMV2_CPU_PORT)
all: bmv2
bmv2: default-bmv2 empty-bmv2 ecmp-bmv2 wcmp-bmv2
default-bmv2: default.p4
p4c-bm2-ss $(BMV2_OPTIONS) --p4v 14 -o p4c-out/default.json \
--p4runtime-file p4c-out/default.p4info --p4runtime-format text \
default.p4
empty-bmv2: empty.p4
p4c-bm2-ss --p4v 14 -o p4c-out/empty.json \
--p4runtime-file p4c-out/empty.p4info --p4runtime-format text \
empty.p4
ecmp-bmv2: ecmp.p4
p4c-bm2-ss $(BMV2_OPTIONS) --p4v 14 -o p4c-out/ecmp.json \
--p4runtime-file p4c-out/ecmp.p4info --p4runtime-format text \
ecmp.p4
wcmp-bmv2: wcmp.p4
p4c-bm2-ss $(BMV2_OPTIONS) --p4v 14 -o p4c-out/wcmp.json \
--p4runtime-file p4c-out/wcmp.p4info --p4runtime-format text \
wcmp.p4
clean:
rm -rf p4c-out/*.json
rm -rf p4c-out/*.p4info