Android.mk revision e55ece9ca0c4d2a322aba5a97bc80ba9e628a94c
1LOCAL_PATH:=$(call my-dir) 2 3# Build avahi-daemon, install the conf file, and generate the init rc file. 4 5LOCAL_INIT_SERVICE := avahi-daemon 6 7include $(CLEAR_VARS) 8 9LOCAL_MODULE := $(LOCAL_INIT_SERVICE) 10 11LOCAL_REQUIRED_MODULES := \ 12 $(LOCAL_INIT_SERVICE).conf \ 13 init.$(LOCAL_INIT_SERVICE).rc \ 14 15LOCAL_SRC_FILES := \ 16 main.c \ 17 static-services.c \ 18 static-hosts.c \ 19 ini-file-parser.c \ 20 setproctitle.c \ 21 sd-daemon.c \ 22 glob.c \ 23 ../avahi-client/check-nss.c \ 24 dbus-protocol.c \ 25 dbus-util.c \ 26 dbus-async-address-resolver.c \ 27 dbus-async-host-name-resolver.c \ 28 dbus-async-service-resolver.c \ 29 dbus-domain-browser.c \ 30 dbus-entry-group.c \ 31 dbus-service-browser.c \ 32 dbus-service-type-browser.c \ 33 dbus-sync-address-resolver.c \ 34 dbus-sync-host-name-resolver.c \ 35 dbus-sync-service-resolver.c \ 36 dbus-record-browser.c \ 37 ../avahi-common/dbus.c \ 38 ../avahi-common/dbus-watch-glue.c 39 40LOCAL_SHARED_LIBRARIES:=\ 41 libavahi-common \ 42 libavahi-core \ 43 libexpat \ 44 libdl \ 45 libdaemon \ 46 libdbus 47 48LOCAL_CFLAGS := \ 49 -DHAVE_CONFIG_H \ 50 -g \ 51 -O2 \ 52 -fstack-protector \ 53 -std=c99 \ 54 -Wall \ 55 -W \ 56 -Wextra \ 57 -pedantic \ 58 -pipe \ 59 -Wformat \ 60 -Wold-style-definition \ 61 -Wdeclaration-after-statement \ 62 -Wfloat-equal \ 63 -Wmissing-declarations \ 64 -Wmissing-prototypes \ 65 -Wstrict-prototypes \ 66 -Wredundant-decls \ 67 -Wmissing-noreturn \ 68 -Wshadow \ 69 -Wendif-labels \ 70 -Wpointer-arith \ 71 -Wbad-function-cast \ 72 -Wcast-qual \ 73 -Wcast-align \ 74 -Wwrite-strings \ 75 -fdiagnostics-show-option \ 76 -Wno-cast-qual \ 77 -fno-strict-aliasing \ 78 -DDEBUG_TRAP=__asm__\(\"int\ $3\"\) \ 79 -DAVAHI_CONFIG_FILE=\"/system/etc/avahi-daemon.conf\" \ 80 -DAVAHI_HOSTS_FILE=\"/data/misc/avahi/hosts\" \ 81 -DAVAHI_SERVICE_DIR=\"/data/misc/avahi/services/\" \ 82 -DUSE_EXPAT_H \ 83 -DDBUS_VERSION_MAJOR=1 \ 84 -DDBUS_VERSION_MINOR=6 \ 85 -DDBUS_VERSION_MICRO=18 \ 86 -DDBUS_API_SUBJECT_TO_CHANGE \ 87 -DDBUS_SYSTEM_BUS_DEFAULT_ADDRESS=\"unix:path=/dev/socket/dbus\" 88 89LOCAL_C_INCLUDES := \ 90 $(LOCAL_PATH) \ 91 external/avahi 92 93include $(BUILD_EXECUTABLE) 94 95# /system/etc/avahi-daemon.conf 96include $(CLEAR_VARS) 97LOCAL_MODULE := $(LOCAL_INIT_SERVICE).conf 98LOCAL_SRC_FILES := $(LOCAL_INIT_SERVICE).conf 99LOCAL_MODULE_CLASS := ETC 100LOCAL_MODULE_TARGET := $(TARGET_OUT_ETC) 101include $(BUILD_PREBUILT) 102 103# init.avahi-daemon.rc generation 104ifdef INITRC_TEMPLATE 105include $(CLEAR_VARS) 106LOCAL_MODULE := init.$(LOCAL_INIT_SERVICE).rc 107LOCAL_MODULE_CLASS := ETC 108LOCAL_MODULE_PATH := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_INITRCD) 109 110include $(BUILD_SYSTEM)/base_rules.mk 111 112.PHONY: $(LOCAL_BUILT_MODULE) 113$(LOCAL_BUILT_MODULE): $(INITRC_TEMPLATE) 114 $(call generate-initrc-file,$(LOCAL_INIT_SERVICE),\ 115 --syslog --no-drop-root,inet) 116endif 117