Skip to content

Commit 1629b0a

Browse files
dabao1955luyanci
authored andcommitted
Makefile: fix flask.h not found for non-gki
luyanci: Sometimes,selinux compile will late then BBG itself. And it will cause flash.h not generated,but BBG need it. So we manual compile it if it not compiled. This commit will close #70.
1 parent 2f60136 commit 1629b0a

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

Makefile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,15 @@ ccflags-y += -I$(objtree)/security/selinux -include $(srctree)/include/uapi/asm-
66

77
obj-$(CONFIG_BBG) += bbg.o
88

9+
ifneq ($(wildcard $(objtree)/security/selinux/flask.h),)
10+
$(info -- Baseband-guard: flask.h found, skip generation)
11+
else
12+
$(info -- Baseband-guard: flask.h not found, starting generation)
13+
$(shell $(HOSTCC) -I$(srctree)/scripts/selinux/genheaders -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89 -I$(srctree)/include/uapi -I$(srctree)/include -I$(srctree)/security/selinux/include -o $(objtree)/genheaders $(srctree)/scripts/selinux/genheaders/genheaders.c)
14+
$(shell $(objtree)/genheaders flask.h av_permissions.h)
15+
$(shell mv $(objtree)/flask.h $(objtree)/av_permissions.h $(objtree)/security/selinux)
16+
endif
17+
918
GIT_BIN := /usr/bin/env PATH="$$PATH":/usr/bin:/usr/local/bin git
1019

1120
ifeq ($(findstring $(srctree),$(src)),$(srctree))

0 commit comments

Comments
 (0)