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 |
Carmelo Cascone | 0488822 | 2018-03-19 22:18:12 -0700 | [diff] [blame] | 10 | int: fabric-int-tofino fabric-spgw-int-tofino |
Carmelo Cascone | 04098db | 2018-01-30 18:10:32 -0800 | [diff] [blame] | 11 | |
| 12 | fabric-tofino: |
| 13 | p4c -x p4-16 -b tofino-v1model-barefoot \ |
| 14 | -I $(P4_SRC_DIR) \ |
| 15 | $(MAVERICKS_OPTIONS) -o p4c-out/tofino/fabric/mavericks \ |
| 16 | --p4runtime-file p4c-out/tofino/fabric/mavericks/fabric.p4info \ |
| 17 | --p4runtime-format text main.p4 |
| 18 | p4c -x p4-16 -b tofino-v1model-barefoot \ |
| 19 | -I $(P4_SRC_DIR) \ |
Carmelo Cascone | 0fbc908 | 2018-02-11 13:02:37 -0800 | [diff] [blame] | 20 | $(MONTARA_OPTIONS) -o p4c-out/tofino/fabric/montara \ |
| 21 | --p4runtime-file p4c-out/tofino/fabric/montara/fabric.p4info \ |
Carmelo Cascone | 04098db | 2018-01-30 18:10:32 -0800 | [diff] [blame] | 22 | --p4runtime-format text main.p4 |
| 23 | |
| 24 | fabric-spgw-tofino: |
| 25 | p4c -x p4-16 -b tofino-v1model-barefoot \ |
| 26 | -I $(P4_SRC_DIR) \ |
| 27 | $(MAVERICKS_OPTIONS) -DWITH_SPGW -o p4c-out/tofino/fabric-spgw/mavericks \ |
| 28 | --p4runtime-file p4c-out/tofino/fabric-spgw/mavericks/fabric.p4info \ |
| 29 | --p4runtime-format text main.p4 |
| 30 | p4c -x p4-16 -b tofino-v1model-barefoot \ |
| 31 | -I $(P4_SRC_DIR) \ |
Carmelo Cascone | 0fbc908 | 2018-02-11 13:02:37 -0800 | [diff] [blame] | 32 | $(MONTARA_OPTIONS) -DWITH_SPGW -o p4c-out/tofino/fabric-spgw/montara \ |
| 33 | --p4runtime-file p4c-out/tofino/fabric-spgw/montara/fabric.p4info \ |
Carmelo Cascone | 04098db | 2018-01-30 18:10:32 -0800 | [diff] [blame] | 34 | --p4runtime-format text main.p4 |
| 35 | |
Carmelo Cascone | e2c568f | 2018-03-24 15:03:40 -0700 | [diff] [blame] | 36 | fabric-spgw-int-tofino: fabric-spgw-int-1-tofino fabric-spgw-int-2-tofino |
| 37 | |
| 38 | fabric-spgw-int-1-tofino: |
Carmelo Cascone | 0488822 | 2018-03-19 22:18:12 -0700 | [diff] [blame] | 39 | p4c -x p4-16 -b tofino-v1model-barefoot \ |
| 40 | -I $(P4_SRC_DIR) \ |
Carmelo Cascone | e2c568f | 2018-03-24 15:03:40 -0700 | [diff] [blame] | 41 | $(MAVERICKS_OPTIONS) -DWITH_SPGW -DWITH_INT_TRANSIT -DINT_SWITCH_ID=100 -o p4c-out/tofino/fabric-spgw-int-1/mavericks \ |
| 42 | --p4runtime-file p4c-out/tofino/fabric-spgw-int-1/mavericks/fabric.p4info \ |
Carmelo Cascone | 0488822 | 2018-03-19 22:18:12 -0700 | [diff] [blame] | 43 | --p4runtime-format text main.p4 |
| 44 | p4c -x p4-16 -b tofino-v1model-barefoot \ |
| 45 | -I $(P4_SRC_DIR) \ |
Carmelo Cascone | e2c568f | 2018-03-24 15:03:40 -0700 | [diff] [blame] | 46 | $(MONTARA_OPTIONS) -DWITH_SPGW -DWITH_INT_TRANSIT -DINT_SWITCH_ID=100 -o p4c-out/tofino/fabric-spgw-int-1/montara \ |
| 47 | --p4runtime-file p4c-out/tofino/fabric-spgw-int-1/montara/fabric.p4info \ |
Carmelo Cascone | 0488822 | 2018-03-19 22:18:12 -0700 | [diff] [blame] | 48 | --p4runtime-format text main.p4 |
Carmelo Cascone | e2c568f | 2018-03-24 15:03:40 -0700 | [diff] [blame] | 49 | sed -i 's/FabricIngress\.//g' p4c-out/tofino/fabric-spgw-int-1/*/*.p4info |
| 50 | sed -i 's/FabricEgress\.//g' p4c-out/tofino/fabric-spgw-int-1/*/*.p4info |
| 51 | sed -i 's/FabricIngress\.//g' p4c-out/tofino/fabric-spgw-int-1/*/context.json |
| 52 | sed -i 's/FabricEgress\.//g' p4c-out/tofino/fabric-spgw-int-1/*/context.json |
| 53 | |
| 54 | fabric-spgw-int-2-tofino: |
| 55 | p4c -x p4-16 -b tofino-v1model-barefoot \ |
| 56 | -I $(P4_SRC_DIR) \ |
| 57 | $(MAVERICKS_OPTIONS) -DWITH_SPGW -DWITH_INT_TRANSIT -DINT_SWITCH_ID=200 -o p4c-out/tofino/fabric-spgw-int-2/mavericks \ |
| 58 | --p4runtime-file p4c-out/tofino/fabric-spgw-int-2/mavericks/fabric.p4info \ |
| 59 | --p4runtime-format text main.p4 |
| 60 | p4c -x p4-16 -b tofino-v1model-barefoot \ |
| 61 | -I $(P4_SRC_DIR) \ |
| 62 | $(MONTARA_OPTIONS) -DWITH_SPGW -DWITH_INT_TRANSIT -DINT_SWITCH_ID=200 -o p4c-out/tofino/fabric-spgw-int-2/montara \ |
| 63 | --p4runtime-file p4c-out/tofino/fabric-spgw-int-2/montara/fabric.p4info \ |
| 64 | --p4runtime-format text main.p4 |
| 65 | sed -i 's/FabricIngress\.//g' p4c-out/tofino/fabric-spgw-int-2/*/*.p4info |
| 66 | sed -i 's/FabricEgress\.//g' p4c-out/tofino/fabric-spgw-int-2/*/*.p4info |
| 67 | sed -i 's/FabricIngress\.//g' p4c-out/tofino/fabric-spgw-int-2/*/context.json |
| 68 | sed -i 's/FabricEgress\.//g' p4c-out/tofino/fabric-spgw-int-2/*/context.json |
Carmelo Cascone | 0488822 | 2018-03-19 22:18:12 -0700 | [diff] [blame] | 69 | |
| 70 | fabric-int-tofino: |
| 71 | p4c -x p4-16 -b tofino-v1model-barefoot \ |
| 72 | -I $(P4_SRC_DIR) \ |
| 73 | $(MAVERICKS_OPTIONS) -DWITH_INT_TRANSIT -o p4c-out/tofino/fabric-int/mavericks \ |
| 74 | --p4runtime-file p4c-out/tofino/fabric-int/mavericks/fabric.p4info \ |
| 75 | --p4runtime-format text main.p4 |
| 76 | p4c -x p4-16 -b tofino-v1model-barefoot \ |
| 77 | -I $(P4_SRC_DIR) \ |
| 78 | $(MONTARA_OPTIONS) -DWITH_INT_TRANSIT -o p4c-out/tofino/fabric-int/montara \ |
| 79 | --p4runtime-file p4c-out/tofino/fabric-int/montara/fabric.p4info \ |
| 80 | --p4runtime-format text main.p4 |
| 81 | |
Carmelo Cascone | 04098db | 2018-01-30 18:10:32 -0800 | [diff] [blame] | 82 | clean: |
| 83 | rm -rf p4c-out/* |