| include $(COMMON_MK) |
| |
| TARGET_USES_LOGD = true |
| |
| ifneq ($(TARGET_USES_LOGD),false) |
| liblog_sources := logd_write.c |
| else |
| liblog_sources := logd_write_kern.c |
| endif |
| |
| liblog_sources += logprint.c event_tag_map.c |
| |
| liblog_target_sources := $(liblog_sources) |
| |
| ifneq ($(TARGET_USES_LOGD),false) |
| liblog_target_sources += log_read.c |
| else |
| liblog_target_sources += log_read_kern.c |
| endif |
| |
| LOCAL_SRC_FILES = $(liblog_target_sources) |
| |
| LOCAL_SRC_CPP_FILES = log_time.cpp |
| |
| LOCAL_MODULE := liblog.so |
| |
| LOCAL_C_INCLUDES = -I../include |
| LOCAL_C_INCLUDES += -I../include/log |
| LOCAL_C_INCLUDES += -I../include/cutils |
| LOCAL_C_INCLUDES += -I../include/utils |
| #-I$(STAGEDIR) |
| |
| LOCAL_CFLAGS += -fPIC -g -O2 -DBINDER_IPC_32BIT=1 -DHAVE_ENDIAN_H -DHAVE_PTHREADS -DHAVE_SYS_UIO_H -DHAVE_POSIX_FILEMAP -DHAVE_STRLCPY -DHAVE_PRCTL -DHAVE_MEMSET16 -DHAVE_MEMSET32 -DANDROID_SMP=0 |
| LOCAL_CFLAGS += -Werror |
| # -nostartfiles |
| |
| LOCAL_CPPFLAGS += -fPIC -g -O2 -DBINDER_IPC_32BIT=1 -DHAVE_ENDIAN_H -DHAVE_PTHREADS -DHAVE_SYS_UIO_H -DHAVE_POSIX_FILEMAP -DHAVE_STRLCPY -DHAVE_PRCTL -DHAVE_MEMSET16 -DHAVE_MEMSET32 -DANDROID_SMP=0 |
| LOCAL_CPPFLAGS += -std=c++11 |
| |
| LOCAL_LDLIBS += |
| #LOCAL_LDFLAGS += -shared |
| LDFLAGS += -shared |
| |
| ALL_OBJS = $(subst .c,.o, $(LOCAL_SRC_FILES)) |
| |
| ALL_CPP_OBJS = $(subst .cpp,.o, $(LOCAL_SRC_CPP_FILES)) |
| |
| all : $(LOCAL_MODULE) |
| @echo "Compile $(LOCAL_MODULE) done!" |
| |
| clean : |
| @rm -rvf $(ALL_OBJS) $(LOCAL_MODULE) |
| |
| $(LOCAL_MODULE) : $(ALL_OBJS) $(ALL_CPP_OBJS) |
| # $(CXX) $(LOCAL_LDFLAGS) $(LOCAL_CPPFLAGS) -o $@ $^ $(LOCAL_LDLIBS) |
| $(CXX) $(LDFLAGS) $(LOCAL_CPPFLAGS) -o $@ $^ $(LOCAL_LDLIBS) |
| |
| %.o:%.c |
| @echo Compile $< |
| $(CC) $(LOCAL_CFLAGS) $(LOCAL_C_INCLUDES) -c $< -o $@ |
| |
| %.o:%.cpp |
| @echo Compile $< |
| $(CXX) $(LOCAL_CPPFLAGS) $(LOCAL_C_INCLUDES) -c $< -o $@ |
| |
| romfs: |
| $(ROMFSINST) $(LOCAL_MODULE) /lib/$(LOCAL_MODULE) |
| @echo $(LOCAL_MODULE) has been installed! |
| |