Yi Tseng | 1d84267 | 2017-11-28 16:06:52 -0800 | [diff] [blame] | 1 | BMV2_CPU_PORT=255 |
Yi Tseng | be34205 | 2017-11-03 10:21:23 -0700 | [diff] [blame] | 2 | |
Yi Tseng | 1d84267 | 2017-11-28 16:06:52 -0800 | [diff] [blame] | 3 | BMV2_OPTIONS=-DTARGET_BMV2 |
| 4 | |
| 5 | all: bmv2 |
| 6 | |
| 7 | bmv2: |
| 8 | p4c -v -x p4-16 -b bmv2-ss-p4org \ |
| 9 | $(BMV2_OPTIONS) -o p4c-out/bmv2 \ |
| 10 | --p4runtime-file p4c-out/bmv2/fabric.p4info \ |
| 11 | --p4runtime-format text fabric.p4 |
| 12 | mv p4c-out/bmv2/fabric.p4rt p4c-out/bmv2/fabric.p4info |
| 13 | rm -f p4c-out/bmv2/fabric.p4i |
| 14 | |
Carmelo Cascone | b81f4be | 2018-01-16 23:24:01 -0800 | [diff] [blame^] | 15 | bmv2-spgw: |
| 16 | p4c-bm2-ss -o p4c-out/bmv2/fabric-spgw.json \ |
| 17 | $(BMV2_OPTIONS) -DWITH_SPGW \ |
| 18 | --p4runtime-file p4c-out/bmv2/fabric-spgw.p4info \ |
| 19 | --p4runtime-format text fabric.p4 |
| 20 | |
Yi Tseng | 1d84267 | 2017-11-28 16:06:52 -0800 | [diff] [blame] | 21 | custom: |
| 22 | p4c -v -x p4-16 -b $(BACKEND) \ |
| 23 | $(BACKEND_OPTIONS) -o p4c-out/$(BACKEND) \ |
| 24 | --p4runtime-file p4c-out/$(BACKEND)/fabric.p4info \ |
| 25 | --p4runtime-format text fabric.p4 |
Yi Tseng | be34205 | 2017-11-03 10:21:23 -0700 | [diff] [blame] | 26 | |
| 27 | clean: |
Yi Tseng | 1d84267 | 2017-11-28 16:06:52 -0800 | [diff] [blame] | 28 | rm -rf p4c-out/* |