Home | History | Annotate | Download | only in libevent
      1 # Copyright (C) 2015 The Android Open Source Project
      2 #
      3 # Licensed under the Apache License, Version 2.0 (the "License");
      4 # you may not use this file except in compliance with the License.
      5 # You may obtain a copy of the License at
      6 #
      7 #      http://www.apache.org/licenses/LICENSE-2.0
      8 #
      9 # Unless required by applicable law or agreed to in writing, software
     10 # distributed under the License is distributed on an "AS IS" BASIS,
     11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     12 # See the License for the specific language governing permissions and
     13 # limitations under the License.
     14 
     15 LOCAL_PATH := $(call my-dir)
     16 
     17 libevent_linux_src := \
     18 	epoll.c \
     19 	poll.c \
     20 	select.c \
     21 
     22 libevent_darwin_src := \
     23 	kqueue.c \
     24 	poll.c \
     25 	select.c \
     26 
     27 libevent_core_src := \
     28 	buffer.c \
     29 	bufferevent.c \
     30 	bufferevent_filter.c \
     31 	bufferevent_pair.c \
     32 	bufferevent_ratelim.c \
     33 	bufferevent_sock.c \
     34 	event.c \
     35 	evmap.c \
     36 	evthread.c \
     37 	evutil.c \
     38 	evutil_rand.c \
     39 	listener.c \
     40 	log.c \
     41 	signal.c \
     42 	strlcpy.c
     43 
     44 libevent_extra_src := \
     45 	evdns.c \
     46 	event_tagging.c \
     47 	evrpc.c \
     48 	http.c
     49 
     50 libevent_all_src := \
     51 	$(libevent_core_src) \
     52 	$(libevent_extra_src)
     53 
     54 libevent_cflags := \
     55 	-O3 \
     56 	-Wno-implicit-function-declaration \
     57 	-Wno-strict-aliasing \
     58 	-Wno-unused-parameter \
     59 	-Werror
     60 
     61 include $(CLEAR_VARS)
     62 LOCAL_MODULE := libevent
     63 LOCAL_ARM_MODE := arm
     64 LOCAL_CFLAGS := $(libevent_cflags)
     65 LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
     66 LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
     67 LOCAL_SHARED_LIBRARIES := libc
     68 LOCAL_SRC_FILES := $(libevent_all_src) $(libevent_linux_src)
     69 include $(BUILD_SHARED_LIBRARY)
     70 
     71 include $(CLEAR_VARS)
     72 LOCAL_MODULE := libevent-host
     73 LOCAL_CFLAGS := $(libevent_cflags)
     74 LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
     75 LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
     76 LOCAL_SRC_FILES := $(libevent_all_src) $(libevent_$(HOST_OS)_src)
     77 include $(BUILD_HOST_SHARED_LIBRARY)
     78