make_home := ../..
top_srcdir := ../..


include $(make_home)/project_make
WARN = -Wall
include $(make_home)/package_make

include ../Makefile.defines
#######################
# CUSTOMIZE MACROS HERE
#######################

# name your library here
PKG_LIB = cutils

# at least one of following lines must be uncommented
# CFILES   is .c
# CCFILES  is .cc
# CPPFILES is .cpp
# CXXFILES is .cxx

CFILES = array.c \
    hashmap.c \
    atomic.c \
    native_handle.c \
    buffer.c \
    socket_inaddr_any_server.c \
    socket_local_client.c \
    socket_local_server.c \
    socket_loopback_client.c \
    socket_loopback_server.c \
    socket_network_client.c \
    sockets.c \
    config_utils.c \
    cpu_info.c \
    load_file.c \
    list.c \
    open_memstream.c \
    strdup16to8.c \
    strdup8to16.c \
    record_stream.c \
    process_name.c \
    properties.c \
    threads.c \
    sched_policy.c \
    iosched_policy.c \
    str_parms.c \
    abort_socket.c \
    selector.c \
    tztime.c \
    zygote.c \
    ashmem-dev.c \
    mot_pthread.c \
    android_reboot.c \
    partition_utils.c \
    uevent.c \
    qtaguid.c \
    klog.c \
    memory.c

CFLAGS += -DHAVE_MEMSET16 -DHAVE_MEMSET32
SFILES += arch-arm/memset32.S atomics_arm.S atomic-android-arm.S

#CCFILES =
#CPPFILES =
#CXXFILES =

# if this library depends on private static library built
# by this package, uncomment next line
#STATIC_LIBS =

# modify compiler command-line options
CFLAGS += -fPIC -DHAVE_ANDROID_OS=1 -DHAVE_UBUNTU_OS=1 -DANDROID_SMP=0 -DUSE_SSE2 -D_GNU_SOURCE=1 $(CONFIG_DEFINES)

# modify linker command-line options
LDFLAGS += -L ../liblog

SHARED_LIBS += -llog -lpthread -lrt

# build private static library
private_lib = NO

# build simple shared library
# single header file exported, should be .../lib/include/$(PKG_LIB).h
PKGCONFIG = NO

# build pkgconfig shared library
# change PKGCONFIG to YES and add following three macros
# PKG_LIBDESC is one line description of library
# PKG_REQUIRES is list of required pkgconfig libraries
# PKG_HEADERS is list of header files to export
#PKG_LIBDESC =
#PKG_REQUIRES =
#PKG_HEADERS =

MAKESUBDIR = YES
LIBSUBDIR = /$(install_lib_rel)
HDRSUBDIR = /$(install_hdr_rel)

############################
# END OF MACROS TO CUSTOMIZE
############################

all: $(TARGET)

-include $(DEPENDS)

include $(make_home)/target_lib

