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 |
Carmelo Cascone | 0fbc908 | 2018-02-11 13:02:37 -0800 | [diff] [blame^] | 4 | MONTARA_CPU_PORT=192 |
Carmelo Cascone | 04098db | 2018-01-30 18:10:32 -0800 | [diff] [blame] | 5 | |
| 6 | MAVERICKS_OPTIONS=-DCPU_PORT=$(MAVERICKS_CPU_PORT) |
Carmelo Cascone | 0fbc908 | 2018-02-11 13:02:37 -0800 | [diff] [blame^] | 7 | MONTARA_OPTIONS=-DCPU_PORT=$(MONTARA_CPU_PORT) |
Carmelo Cascone | 04098db | 2018-01-30 18:10:32 -0800 | [diff] [blame] | 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) \ |
Carmelo Cascone | 0fbc908 | 2018-02-11 13:02:37 -0800 | [diff] [blame^] | 19 | $(MONTARA_OPTIONS) -o p4c-out/tofino/fabric/montara \ |
| 20 | --p4runtime-file p4c-out/tofino/fabric/montara/fabric.p4info \ |
Carmelo Cascone | 04098db | 2018-01-30 18:10:32 -0800 | [diff] [blame] | 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) \ |
Carmelo Cascone | 0fbc908 | 2018-02-11 13:02:37 -0800 | [diff] [blame^] | 31 | $(MONTARA_OPTIONS) -DWITH_SPGW -o p4c-out/tofino/fabric-spgw/montara \ |
| 32 | --p4runtime-file p4c-out/tofino/fabric-spgw/montara/fabric.p4info \ |
Carmelo Cascone | 04098db | 2018-01-30 18:10:32 -0800 | [diff] [blame] | 33 | --p4runtime-format text main.p4 |
| 34 | |
| 35 | clean: |
| 36 | rm -rf p4c-out/* |