File: Makefile

package info (click to toggle)
android-platform-frameworks-native 21-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 6,684 kB
  • ctags: 16,266
  • sloc: cpp: 69,486; ansic: 10,426; java: 3,883; xml: 422; python: 293; perl: 130; sh: 123; asm: 68; makefile: 55
file content (60 lines) | stat: -rw-r--r-- 1,253 bytes parent folder | download
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
#!/bin/make

CXX = g++

SOURCES:= \
	BasicHashtable.cpp \
	BlobCache.cpp \
	BufferedTextOutput.cpp \
	Debug.cpp \
	FileMap.cpp \
	Flattenable.cpp \
	LinearTransform.cpp \
	Looper.cpp \
	PropertyMap.cpp \
	RefBase.cpp \
	SharedBuffer.cpp \
	Static.cpp \
	StopWatch.cpp \
	String8.cpp \
	String16.cpp \
	StringArray.cpp \
	SystemClock.cpp \
	TextOutput.cpp \
	Threads.cpp \
	Timers.cpp \
	Tokenizer.cpp \
	Unicode.cpp \
	VectorImpl.cpp \
	WorkQueue.cpp \
	ZipFileCRO.cpp \
	ZipFileRO.cpp \
	ZipUtils.cpp \
	misc.cpp

OBJECTS = $(SOURCES:.cpp=.o)

# Debian has gettid, but this build doesn't find it
#         -DHAVE_GETTID \

ALL_CXXFLAGS = -O2 -fPIC -I../../include -I/usr/include/android \
	-include /usr/include/android/arch/linux-x86/AndroidConfig.h
ALL_LDFLAGS = -fPIC -shared -rdynamic -Wl,-rpath=/usr/lib/android
ALL_LIBS = -lrt -ldl -lz -lpthread -L/usr/lib/android -lcutils -llog

CXXFLAGS := $(ALL_CXXFLAGS) $(CXXFLAGS)
LDFLAGS := $(ALL_LDFLAGS) $(LDFLAGS)
LIBS := $(ALL_LIBS) $(LIBS)

LIBNAME = libutils
SONAME = $(LIBNAME).so.0
SOFILENAME = $(SONAME).21.0

all: $(OBJECTS)
	$(CXX) $(LDFLAGS) -Wl,-soname,$(SONAME) -o $(SOFILENAME) $(OBJECTS) $(LIBS)
	ar rs $(LIBNAME).a $(OBJECTS)

clean:
	rm -f $(OBJECTS)
	rm -f $(LIBNAME).so* $(LIBNAME).a