blob: 18730711036b31affc4aefa07968f5ad4f7889cd [file] [log] [blame]
Yi Tseng1d842672017-11-28 16:06:52 -08001BMV2_CPU_PORT=255
Yi Tsengbe342052017-11-03 10:21:23 -07002
Carmelo Casconeb531b682018-01-30 17:55:56 -08003BMV2_OPTIONS=-DTARGET_BMV2 -DCPU_PORT=$(BMV2_CPU_PORT)
Yi Tseng1d842672017-11-28 16:06:52 -08004
Carmelo Casconeb531b682018-01-30 17:55:56 -08005all: bmv2 bmv2-spgw
Yi Tseng1d842672017-11-28 16:06:52 -08006
7bmv2:
Yi Tseng27b9bc02018-04-12 14:52:40 +08008 p4c -v -x p4-16 -b bmv2-v1model \
Yi Tseng1d842672017-11-28 16:06:52 -08009 $(BMV2_OPTIONS) -o p4c-out/bmv2 \
10 --p4runtime-file p4c-out/bmv2/fabric.p4info \
11 --p4runtime-format text fabric.p4
12 mv p4c-out/bmv2/fabric.p4rt p4c-out/bmv2/fabric.p4info
13 rm -f p4c-out/bmv2/fabric.p4i
14
Carmelo Casconeb81f4be2018-01-16 23:24:01 -080015bmv2-spgw:
16 p4c-bm2-ss -o p4c-out/bmv2/fabric-spgw.json \
17 $(BMV2_OPTIONS) -DWITH_SPGW \
18 --p4runtime-file p4c-out/bmv2/fabric-spgw.p4info \
19 --p4runtime-format text fabric.p4
20
Yi Tsengbe342052017-11-03 10:21:23 -070021clean:
Yi Tseng1d842672017-11-28 16:06:52 -080022 rm -rf p4c-out/*