1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89
|
#!/bin/make
CC = gcc
commonSources := \
array.c \
hashmap.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 \
qsort_r_compat.c \
threads.c \
sched_policy.c \
iosched_policy.c \
str_parms.c
commonHostSources := \
ashmem-host.c
commonSources += \
abort_socket.c \
selector.c \
zygote.c
# atomic-inline.h needs to be ported, so skip all that for now
ifeq ($(shell uname -m), x86_64)
commonSources += atomic.c
endif
ifeq ($(shell uname -m), armel)
commonSources += atomic.c
endif
ifeq ($(shell uname -m), armhf)
commonSources += atomic.c
endif
ifeq ($(shell uname -m), i386)
commonSources += atomic.c
endif
ifeq ($(shell uname -m), i486)
commonSources += atomic.c
endif
ifeq ($(shell uname -m), i586)
commonSources += atomic.c
endif
ifeq ($(shell uname -m), i686)
commonSources += atomic.c
endif
ifeq ($(shell uname -m), mips)
commonSources += atomic.c
endif
ifeq ($(shell uname -m), mipsel)
commonSources += atomic.c
endif
SOURCES := $(commonSources) $(commonHostSources) dlmalloc_stubs.c
OBJECTS = $(SOURCES:.c=.o)
CFLAGS += -fPIC -I../include \
-DANDROID_SMP=0 \
-include ../include/arch/linux-x86/AndroidConfig.h
LDFLAGS += -fPIC -shared -rdynamic -Wl,-rpath=/usr/lib/android
LIBS += -L../liblog -lpthread -llog -lbsd
LIBNAME = cutils
all: $(OBJECTS)
$(CC) $(LDFLAGS) -Wl,-soname,lib$(LIBNAME).so.0 -o lib$(LIBNAME).so.0.21.0 $(OBJECTS) $(LIBS)
ar rs lib$(LIBNAME).a $(OBJECTS)
clean:
rm -f $(OBJECTS)
rm -f lib$(LIBNAME).so* lib$(LIBNAME).a
|