mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-06 17:31:01 +01:00

This patch adds a parser make variable and a make target for building the compiler with coverage compilation flags. With this, coverage information can be generated by running tests/test suites against the built parser and run through tools like gcovr. Patch History: v1: initial version v2: refreshed/no change v3: address feedback from sarnold: - mark coverage target as phony - correct missing '.' typo in clean target - make coverage extensions consistent in clean targets Signed-off-by: Steve Beattie <steve@nxnw.org> Acked-by: Seth Arnold <seth.arnold@canonical.com>
32 lines
664 B
Makefile
32 lines
664 B
Makefile
# Profiling:
|
|
#EXTRA_CFLAGS = -pg
|
|
|
|
TARGET=libapparmor_re.a
|
|
|
|
CFLAGS ?= -g -Wall -O2 ${EXTRA_CFLAGS} -std=gnu++0x
|
|
CXXFLAGS := ${CFLAGS}
|
|
|
|
ARFLAGS=-rcs
|
|
|
|
BISON := bison
|
|
|
|
all : ${TARGET}
|
|
|
|
libapparmor_re.a: parse.o expr-tree.o hfa.o chfa.o aare_rules.o
|
|
ar ${ARFLAGS} $@ $^
|
|
|
|
expr-tree.o: expr-tree.cc expr-tree.h
|
|
|
|
hfa.o: hfa.cc apparmor_re.h hfa.h ../immunix.h
|
|
|
|
aare_rules.o: aare_rules.cc aare_rules.h apparmor_re.h expr-tree.h hfa.h chfa.h parse.h ../immunix.h
|
|
|
|
chfa.o: chfa.cc chfa.h ../immunix.h
|
|
|
|
parse.o : parse.cc apparmor_re.h expr-tree.h
|
|
|
|
parse.cc : parse.y parse.h flex-tables.h ../immunix.h
|
|
${BISON} -o $@ $<
|
|
|
|
clean:
|
|
rm -f *.o parse.cc ${TARGET} *.gcda *.gcno
|