blob: 9211037bbd017fc62693e1344f5c219615bb6763 [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 Salyzyn61e9ce62016-09-12 14:51:54 -070024 LogTags.cpp \
Mark Salyzyn989980c2014-05-14 12:37:22 -070025 event.logtags
Mark Salyzyn0175b072014-02-26 09:50:16 -080026
Mark Salyzyn0175b072014-02-26 09:50:16 -080027LOCAL_SHARED_LIBRARIES := \
28 libsysutils \
29 liblog \
Mark Salyzyn34facab2014-02-06 14:48:50 -080030 libcutils \
William Robertsaeca97b2015-07-31 13:10:36 -070031 libbase \
Jorge Lucangeli Obes2bbdbe82016-07-15 13:57:08 -040032 libpackagelistparser \
Mark Salyzynf0b8e1b2016-10-28 14:49:53 -070033 libcap
Mark Salyzyn0175b072014-02-26 09:50:16 -080034
Mark Salyzyn95b46782015-03-06 11:15:55 -080035# This is what we want to do:
36# event_logtags = $(shell \
37# sed -n \
38# "s/^\([0-9]*\)[ \t]*$1[ \t].*/-D`echo $1 | tr a-z A-Z`_LOG_TAG=\1/p" \
39# $(LOCAL_PATH)/$2/event.logtags)
40# event_flag := $(call event_logtags,auditd)
Mark Salyzynab0dcf62015-03-16 12:04:09 -070041# event_flag += $(call event_logtags,logd)
Mark Salyzyn61e9ce62016-09-12 14:51:54 -070042# event_flag += $(call event_logtags,tag_def)
Mark Salyzyn95b46782015-03-06 11:15:55 -080043# so make sure we do not regret hard-coding it as follows:
Mark Salyzyn61e9ce62016-09-12 14:51:54 -070044event_flag := -DAUDITD_LOG_TAG=1003 -DCHATTY_LOG_TAG=1004 -DTAG_DEF_LOG_TAG=1005
Mark Salyzyn1dfb4de2016-12-16 16:09:15 -080045event_flag += -DLIBLOG_LOG_TAG=1006
Mark Salyzyn95b46782015-03-06 11:15:55 -080046
47LOCAL_CFLAGS := -Werror $(event_flag)
Mark Salyzyn0175b072014-02-26 09:50:16 -080048
49include $(BUILD_EXECUTABLE)
Mark Salyzynd3ba6652014-02-28 13:44:12 -080050
Mark Salyzyn61e9ce62016-09-12 14:51:54 -070051include $(CLEAR_VARS)
52
53LOCAL_MODULE := logtagd.rc
54LOCAL_SRC_FILES := $(LOCAL_MODULE)
55LOCAL_MODULE_CLASS := ETC
56LOCAL_MODULE_TAGS := debug
57LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/init
58
59include $(BUILD_PREBUILT)
60
Mark Salyzynd3ba6652014-02-28 13:44:12 -080061include $(call first-makefiles-under,$(LOCAL_PATH))