[apparmor] [PATCH 2/9] Cleanup libapparmor_re Makefile to use patterns
John Johansen
john.johansen at canonical.com
Tue Sep 15 03:11:14 UTC 2015
Signed-off-by: John Johansen <john.johansen at canonical.com>
---
parser/libapparmor_re/Makefile | 15 +++++----------
1 file changed, 5 insertions(+), 10 deletions(-)
diff --git a/parser/libapparmor_re/Makefile b/parser/libapparmor_re/Makefile
index f66702a..c8d9db6 100644
--- a/parser/libapparmor_re/Makefile
+++ b/parser/libapparmor_re/Makefile
@@ -20,19 +20,14 @@ BISON := bison
all : ${TARGET}
UNITTESTS = tst_parse
+SRCS = expr-tree.cc hfa.cc aare_rules.cc chfa.cc parse.cc
+HDRS = expr-tree.h hfa.h aare_rules.h chfa.h apparmor_re.h flex-tables.h ../immunix.h
+OBJS = $(SRCS:.cc=.o)
-libapparmor_re.a: parse.o expr-tree.o hfa.o chfa.o aare_rules.o
+libapparmor_re.a: $(OBJS)
ar ${ARFLAGS} $@ $^
-expr-tree.o: expr-tree.cc expr-tree.h apparmor_re.h
-
-hfa.o: hfa.cc hfa.h apparmor_re.h expr-tree.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 hfa.h apparmor_re.h expr-tree.h flex-tables.h ../immunix.h
-
-parse.o : parse.cc apparmor_re.h expr-tree.h
+%.o: %.cc $(HDRS)
parse.cc : parse.y parse.h flex-tables.h ../immunix.h
${BISON} -o $@ $<
--
2.1.4
More information about the AppArmor
mailing list