blob: 585c0d2eaf0bf79c56b39b603dec3df826e9249d [file] [log] [blame]
P4_SRC_DIR=$(ONOS_ROOT)/pipelines/fabric/src/main/resources
MAVERICKS_CPU_PORT=320
MONTANA_CPU_PORT=192
MAVERICKS_OPTIONS=-DCPU_PORT=$(MAVERICKS_CPU_PORT)
MONTANA_OPTIONS=-DCPU_PORT=$(MONTANA_CPU_PORT)
all: fabric-tofino fabric-spgw-tofino
fabric-tofino:
p4c -x p4-16 -b tofino-v1model-barefoot \
-I $(P4_SRC_DIR) \
$(MAVERICKS_OPTIONS) -o p4c-out/tofino/fabric/mavericks \
--p4runtime-file p4c-out/tofino/fabric/mavericks/fabric.p4info \
--p4runtime-format text main.p4
p4c -x p4-16 -b tofino-v1model-barefoot \
-I $(P4_SRC_DIR) \
$(MONTANA_OPTIONS) -o p4c-out/tofino/fabric/montana \
--p4runtime-file p4c-out/tofino/fabric/montana/fabric.p4info \
--p4runtime-format text main.p4
fabric-spgw-tofino:
p4c -x p4-16 -b tofino-v1model-barefoot \
-I $(P4_SRC_DIR) \
$(MAVERICKS_OPTIONS) -DWITH_SPGW -o p4c-out/tofino/fabric-spgw/mavericks \
--p4runtime-file p4c-out/tofino/fabric-spgw/mavericks/fabric.p4info \
--p4runtime-format text main.p4
p4c -x p4-16 -b tofino-v1model-barefoot \
-I $(P4_SRC_DIR) \
$(MONTANA_OPTIONS) -DWITH_SPGW -o p4c-out/tofino/fabric-spgw/montana \
--p4runtime-file p4c-out/tofino/fabric-spgw/montana/fabric.p4info \
--p4runtime-format text main.p4
clean:
rm -rf p4c-out/*