blob: c3016f84ee463251166a2a262713ac6e8e24d105 [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
Carmelo Cascone6af4e172018-06-15 16:01:30 +02007bmv2: makedir
8 p4c-bm2-ss --arch v1model -o p4c-out/bmv2/fabric.json \
9 $(BMV2_OPTIONS) \
10 --p4runtime-file p4c-out/bmv2/fabric.p4info \
11 --p4runtime-format text fabric.p4
Yi Tseng1d842672017-11-28 16:06:52 -080012
Carmelo Cascone6af4e172018-06-15 16:01:30 +020013bmv2-spgw: makedir
14 p4c-bm2-ss --arch v1model -o p4c-out/bmv2/fabric-spgw.json \
15 $(BMV2_OPTIONS) -DWITH_SPGW \
16 --p4runtime-file p4c-out/bmv2/fabric-spgw.p4info \
17 --p4runtime-format text fabric.p4
18
19makedir:
20 mkdir -p p4c-out/bmv2
Carmelo Casconeb81f4be2018-01-16 23:24:01 -080021
Yi Tsengbe342052017-11-03 10:21:23 -070022clean:
Carmelo Cascone6af4e172018-06-15 16:01:30 +020023 rm -rf p4c-out/bmv2/*