blob: f11de1b3d42557e74aecdd05e10d6d12e2cf08e3 [file] [log] [blame]
Yi Tseng1d842672017-11-28 16:06:52 -08001BMV2_CPU_PORT=255
Yi Tsengbe342052017-11-03 10:21:23 -07002
Yi Tseng1d842672017-11-28 16:06:52 -08003BMV2_OPTIONS=-DTARGET_BMV2
4
5all: bmv2
6
7bmv2:
8 p4c -v -x p4-16 -b bmv2-ss-p4org \
9 $(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
15custom:
16 p4c -v -x p4-16 -b $(BACKEND) \
17 $(BACKEND_OPTIONS) -o p4c-out/$(BACKEND) \
18 --p4runtime-file p4c-out/$(BACKEND)/fabric.p4info \
19 --p4runtime-format text fabric.p4
Yi Tsengbe342052017-11-03 10:21:23 -070020
21clean:
Yi Tseng1d842672017-11-28 16:06:52 -080022 rm -rf p4c-out/*