blob: 203943c3113ef42eee93d698838b399941ea2bf9 [file] [log] [blame]
Mark Salyzyn0175b072014-02-26 09:50:16 -08001LOCAL_PATH:= $(call my-dir)
2
3include $(CLEAR_VARS)
4
5LOCAL_MODULE:= logd
6
Andreas Gampef5852ce2015-10-22 20:36:53 -07007LOCAL_INIT_RC := logd.rc
8
Mark Salyzyn0175b072014-02-26 09:50:16 -08009LOCAL_SRC_FILES := \
10 main.cpp \
11 LogCommand.cpp \
12 CommandListener.cpp \
13 LogListener.cpp \
14 LogReader.cpp \
15 FlushCommand.cpp \
16 LogBuffer.cpp \
17 LogBufferElement.cpp \
Mark Salyzyn34facab2014-02-06 14:48:50 -080018 LogTimes.cpp \
Mark Salyzyndfa7a072014-02-11 12:29:31 -080019 LogStatistics.cpp \
William Roberts29d238d2013-02-08 09:45:26 +090020 LogWhiteBlackList.cpp \
21 libaudit.c \
Mark Salyzyn989980c2014-05-14 12:37:22 -070022 LogAudit.cpp \
Mark Salyzynae4d9282014-10-15 08:49:39 -070023 LogKlog.cpp \
Mark Salyzyn989980c2014-05-14 12:37:22 -070024 event.logtags
Mark Salyzyn0175b072014-02-26 09:50:16 -080025
Mark Salyzyn0175b072014-02-26 09:50:16 -080026LOCAL_SHARED_LIBRARIES := \
27 libsysutils \
28 liblog \
Mark Salyzyn34facab2014-02-06 14:48:50 -080029 libcutils \
William Robertsaeca97b2015-07-31 13:10:36 -070030 libbase \
31 libpackagelistparser
Mark Salyzyn0175b072014-02-26 09:50:16 -080032
Mark Salyzyn95b46782015-03-06 11:15:55 -080033# This is what we want to do:
34# event_logtags = $(shell \
35# sed -n \
36# "s/^\([0-9]*\)[ \t]*$1[ \t].*/-D`echo $1 | tr a-z A-Z`_LOG_TAG=\1/p" \
37# $(LOCAL_PATH)/$2/event.logtags)
38# event_flag := $(call event_logtags,auditd)
Mark Salyzynab0dcf62015-03-16 12:04:09 -070039# event_flag += $(call event_logtags,logd)
Mark Salyzyn95b46782015-03-06 11:15:55 -080040# so make sure we do not regret hard-coding it as follows:
Mark Salyzyn0ee8de32016-01-06 21:17:43 +000041event_flag := -DAUDITD_LOG_TAG=1003 -DLOGD_LOG_TAG=1004
Mark Salyzyn95b46782015-03-06 11:15:55 -080042
43LOCAL_CFLAGS := -Werror $(event_flag)
Mark Salyzyn0175b072014-02-26 09:50:16 -080044
Sami Tolvanen0bdad0f2016-02-05 14:27:52 -080045ifeq ($(TARGET_BUILD_VARIANT),user)
46LOCAL_CFLAGS += -DAUDITD_ENFORCE_INTEGRITY=true
47endif
48
Mark Salyzyn0175b072014-02-26 09:50:16 -080049include $(BUILD_EXECUTABLE)
Mark Salyzynd3ba6652014-02-28 13:44:12 -080050
51include $(call first-makefiles-under,$(LOCAL_PATH))