blob: 5942baabc7a919ad7df96c710609d09fe958f4bc [file] [log] [blame]
Carmelo Cascone04098db2018-01-30 18:10:32 -08001P4_SRC_DIR=$(ONOS_ROOT)/pipelines/fabric/src/main/resources
2
3MAVERICKS_CPU_PORT=320
Carmelo Cascone0fbc9082018-02-11 13:02:37 -08004MONTARA_CPU_PORT=192
Carmelo Cascone04098db2018-01-30 18:10:32 -08005
6MAVERICKS_OPTIONS=-DCPU_PORT=$(MAVERICKS_CPU_PORT)
Carmelo Cascone0fbc9082018-02-11 13:02:37 -08007MONTARA_OPTIONS=-DCPU_PORT=$(MONTARA_CPU_PORT)
Carmelo Cascone04098db2018-01-30 18:10:32 -08008
9all: fabric-tofino fabric-spgw-tofino
10
11fabric-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 Cascone0fbc9082018-02-11 13:02:37 -080019 $(MONTARA_OPTIONS) -o p4c-out/tofino/fabric/montara \
20 --p4runtime-file p4c-out/tofino/fabric/montara/fabric.p4info \
Carmelo Cascone04098db2018-01-30 18:10:32 -080021 --p4runtime-format text main.p4
22
23fabric-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 Cascone0fbc9082018-02-11 13:02:37 -080031 $(MONTARA_OPTIONS) -DWITH_SPGW -o p4c-out/tofino/fabric-spgw/montara \
32 --p4runtime-file p4c-out/tofino/fabric-spgw/montara/fabric.p4info \
Carmelo Cascone04098db2018-01-30 18:10:32 -080033 --p4runtime-format text main.p4
34
35clean:
36 rm -rf p4c-out/*