File: Makefile

package info (click to toggle)
android-platform-tools 29.0.6-28
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 365,224 kB
  • sloc: cpp: 1,049,638; java: 460,532; ansic: 375,452; asm: 301,257; xml: 134,509; python: 92,731; perl: 62,008; sh: 26,753; makefile: 3,210; javascript: 3,172; yacc: 1,403; lex: 455; awk: 368; ruby: 183; sql: 140
file content (55 lines) | stat: -rw-r--r-- 1,521 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
PYTHON ?= python3
SECILC ?= secilc

# Installation directories.
LINGUAS ?= ru
PREFIX ?= /usr
BINDIR ?= $(PREFIX)/bin
MANDIR ?= $(PREFIX)/share/man

CFLAGS ?= -Werror -Wall -W

# If no specific libsepol.a is specified, fall back on LDFLAGS search path
# Otherwise, as $(LIBSEPOLA) already appears in the dependencies, there
# is no need to define a value for LDLIBS_LIBSEPOLA
ifeq ($(LIBSEPOLA),)
        LDLIBS_LIBSEPOLA := -l:libsepol.a
endif

all: audit2why sepolgen-ifgen-attr-helper

sepolgen-ifgen-attr-helper: sepolgen-ifgen-attr-helper.o $(LIBSEPOLA)
	$(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS_LIBSEPOLA)

audit2why:
	ln -sf audit2allow audit2why

test: all test_dummy_policy
	@$(PYTHON) test_audit2allow.py -v

test_dummy_policy: test_dummy_policy.cil
	$(SECILC) -o $@ -f /dev/null $<

install: all
	-mkdir -p $(DESTDIR)$(BINDIR)
	install -m 755 audit2allow $(DESTDIR)$(BINDIR)
	(cd $(DESTDIR)$(BINDIR); ln -sf audit2allow audit2why)
	install -m 755 sepolgen-ifgen-attr-helper $(DESTDIR)$(BINDIR)
	install -m 755 sepolgen-ifgen $(DESTDIR)$(BINDIR)
	-mkdir -p $(DESTDIR)$(MANDIR)/man1
	install -m 644 audit2allow.1 $(DESTDIR)$(MANDIR)/man1/
	install -m 644 audit2why.1 $(DESTDIR)$(MANDIR)/man1/
	for lang in $(LINGUAS) ; do \
		if [ -e $${lang} ] ; then \
			mkdir -p $(DESTDIR)$(MANDIR)/$${lang}/man1 ; \
			install -m 644 $${lang}/*.1 $(DESTDIR)$(MANDIR)/$${lang}/man1/ ; \
		fi ; \
	done

clean:
	rm -f *~ *.o sepolgen-ifgen-attr-helper test_dummy_policy

indent:
	../../scripts/Lindent $(wildcard *.[ch])

relabel: ;