Mark Salyzyn | 0175b07 | 2014-02-26 09:50:16 -0800 | [diff] [blame] | 1 | LOCAL_PATH:= $(call my-dir) |
| 2 | |
| 3 | include $(CLEAR_VARS) |
| 4 | |
| 5 | LOCAL_MODULE:= logd |
| 6 | |
Andreas Gampe | f5852ce | 2015-10-22 20:36:53 -0700 | [diff] [blame] | 7 | LOCAL_INIT_RC := logd.rc |
| 8 | |
Mark Salyzyn | 0175b07 | 2014-02-26 09:50:16 -0800 | [diff] [blame] | 9 | LOCAL_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 Salyzyn | 34facab | 2014-02-06 14:48:50 -0800 | [diff] [blame] | 18 | LogTimes.cpp \ |
Mark Salyzyn | dfa7a07 | 2014-02-11 12:29:31 -0800 | [diff] [blame] | 19 | LogStatistics.cpp \ |
William Roberts | 29d238d | 2013-02-08 09:45:26 +0900 | [diff] [blame] | 20 | LogWhiteBlackList.cpp \ |
| 21 | libaudit.c \ |
Mark Salyzyn | 989980c | 2014-05-14 12:37:22 -0700 | [diff] [blame] | 22 | LogAudit.cpp \ |
Mark Salyzyn | ae4d928 | 2014-10-15 08:49:39 -0700 | [diff] [blame] | 23 | LogKlog.cpp \ |
Mark Salyzyn | 61e9ce6 | 2016-09-12 14:51:54 -0700 | [diff] [blame] | 24 | LogTags.cpp \ |
Mark Salyzyn | 989980c | 2014-05-14 12:37:22 -0700 | [diff] [blame] | 25 | event.logtags |
Mark Salyzyn | 0175b07 | 2014-02-26 09:50:16 -0800 | [diff] [blame] | 26 | |
Mark Salyzyn | 0175b07 | 2014-02-26 09:50:16 -0800 | [diff] [blame] | 27 | LOCAL_SHARED_LIBRARIES := \ |
| 28 | libsysutils \ |
| 29 | liblog \ |
Mark Salyzyn | 34facab | 2014-02-06 14:48:50 -0800 | [diff] [blame] | 30 | libcutils \ |
William Roberts | aeca97b | 2015-07-31 13:10:36 -0700 | [diff] [blame] | 31 | libbase \ |
Jorge Lucangeli Obes | 2bbdbe8 | 2016-07-15 13:57:08 -0400 | [diff] [blame] | 32 | libpackagelistparser \ |
Mark Salyzyn | f0b8e1b | 2016-10-28 14:49:53 -0700 | [diff] [blame] | 33 | libcap |
Mark Salyzyn | 0175b07 | 2014-02-26 09:50:16 -0800 | [diff] [blame] | 34 | |
Mark Salyzyn | 95b4678 | 2015-03-06 11:15:55 -0800 | [diff] [blame] | 35 | # 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 Salyzyn | ab0dcf6 | 2015-03-16 12:04:09 -0700 | [diff] [blame] | 41 | # event_flag += $(call event_logtags,logd) |
Mark Salyzyn | 61e9ce6 | 2016-09-12 14:51:54 -0700 | [diff] [blame] | 42 | # event_flag += $(call event_logtags,tag_def) |
Mark Salyzyn | 95b4678 | 2015-03-06 11:15:55 -0800 | [diff] [blame] | 43 | # so make sure we do not regret hard-coding it as follows: |
Mark Salyzyn | 61e9ce6 | 2016-09-12 14:51:54 -0700 | [diff] [blame] | 44 | event_flag := -DAUDITD_LOG_TAG=1003 -DCHATTY_LOG_TAG=1004 -DTAG_DEF_LOG_TAG=1005 |
Mark Salyzyn | 1dfb4de | 2016-12-16 16:09:15 -0800 | [diff] [blame] | 45 | event_flag += -DLIBLOG_LOG_TAG=1006 |
Mark Salyzyn | 95b4678 | 2015-03-06 11:15:55 -0800 | [diff] [blame] | 46 | |
| 47 | LOCAL_CFLAGS := -Werror $(event_flag) |
Mark Salyzyn | 0175b07 | 2014-02-26 09:50:16 -0800 | [diff] [blame] | 48 | |
| 49 | include $(BUILD_EXECUTABLE) |
Mark Salyzyn | d3ba665 | 2014-02-28 13:44:12 -0800 | [diff] [blame] | 50 | |
Mark Salyzyn | 61e9ce6 | 2016-09-12 14:51:54 -0700 | [diff] [blame] | 51 | include $(CLEAR_VARS) |
| 52 | |
| 53 | LOCAL_MODULE := logtagd.rc |
| 54 | LOCAL_SRC_FILES := $(LOCAL_MODULE) |
| 55 | LOCAL_MODULE_CLASS := ETC |
| 56 | LOCAL_MODULE_TAGS := debug |
| 57 | LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/init |
| 58 | |
| 59 | include $(BUILD_PREBUILT) |
| 60 | |
Mark Salyzyn | d3ba665 | 2014-02-28 13:44:12 -0800 | [diff] [blame] | 61 | include $(call first-makefiles-under,$(LOCAL_PATH)) |