Carmelo Cascone | 04098db | 2018-01-30 18:10:32 -0800 | [diff] [blame^] | 1 | P4_SRC_DIR=$(ONOS_ROOT)/pipelines/fabric/src/main/resources |
| 2 | |
| 3 | MAVERICKS_CPU_PORT=320 |
| 4 | MONTANA_CPU_PORT=192 |
| 5 | |
| 6 | MAVERICKS_OPTIONS=-DCPU_PORT=$(MAVERICKS_CPU_PORT) |
| 7 | MONTANA_OPTIONS=-DCPU_PORT=$(MONTANA_CPU_PORT) |
| 8 | |
| 9 | all: fabric-tofino fabric-spgw-tofino |
| 10 | |
| 11 | fabric-tofino: |
| 12 | p4c -x p4-16 -b tofino-v1model-barefoot \ |
| 13 | -I $(P4_SRC_DIR) \ |
| 14 | $(MAVERICKS_OPTIONS) -o p4c-out/tofino/fabric/mavericks \ |
| 15 | --p4runtime-file p4c-out/tofino/fabric/mavericks/fabric.p4info \ |
| 16 | --p4runtime-format text main.p4 |
| 17 | p4c -x p4-16 -b tofino-v1model-barefoot \ |
| 18 | -I $(P4_SRC_DIR) \ |
| 19 | $(MONTANA_OPTIONS) -o p4c-out/tofino/fabric/montana \ |
| 20 | --p4runtime-file p4c-out/tofino/fabric/montana/fabric.p4info \ |
| 21 | --p4runtime-format text main.p4 |
| 22 | |
| 23 | fabric-spgw-tofino: |
| 24 | p4c -x p4-16 -b tofino-v1model-barefoot \ |
| 25 | -I $(P4_SRC_DIR) \ |
| 26 | $(MAVERICKS_OPTIONS) -DWITH_SPGW -o p4c-out/tofino/fabric-spgw/mavericks \ |
| 27 | --p4runtime-file p4c-out/tofino/fabric-spgw/mavericks/fabric.p4info \ |
| 28 | --p4runtime-format text main.p4 |
| 29 | p4c -x p4-16 -b tofino-v1model-barefoot \ |
| 30 | -I $(P4_SRC_DIR) \ |
| 31 | $(MONTANA_OPTIONS) -DWITH_SPGW -o p4c-out/tofino/fabric-spgw/montana \ |
| 32 | --p4runtime-file p4c-out/tofino/fabric-spgw/montana/fabric.p4info \ |
| 33 | --p4runtime-format text main.p4 |
| 34 | |
| 35 | clean: |
| 36 | rm -rf p4c-out/* |