blob: 5942baabc7a919ad7df96c710609d09fe958f4bc [file] [log] [blame]
P4_SRC_DIR=$(ONOS_ROOT)/pipelines/fabric/src/main/resources
MAVERICKS_CPU_PORT=320
MONTARA_CPU_PORT=192
MAVERICKS_OPTIONS=-DCPU_PORT=$(MAVERICKS_CPU_PORT)
MONTARA_OPTIONS=-DCPU_PORT=$(MONTARA_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) \
$(MONTARA_OPTIONS) -o p4c-out/tofino/fabric/montara \
--p4runtime-file p4c-out/tofino/fabric/montara/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) \
$(MONTARA_OPTIONS) -DWITH_SPGW -o p4c-out/tofino/fabric-spgw/montara \
--p4runtime-file p4c-out/tofino/fabric-spgw/montara/fabric.p4info \
--p4runtime-format text main.p4
clean:
rm -rf p4c-out/*