blob: 585c0d2eaf0bf79c56b39b603dec3df826e9249d [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
4MONTANA_CPU_PORT=192
5
6MAVERICKS_OPTIONS=-DCPU_PORT=$(MAVERICKS_CPU_PORT)
7MONTANA_OPTIONS=-DCPU_PORT=$(MONTANA_CPU_PORT)
8
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) \
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
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) \
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
35clean:
36 rm -rf p4c-out/*