File: Makefile

package info (click to toggle)
android-platform-frameworks-base 21-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 4,836 kB
  • ctags: 9,265
  • sloc: cpp: 51,953; java: 19,224; ansic: 612; python: 571; yacc: 300; sh: 246; lex: 212; xml: 146; makefile: 70
file content (55 lines) | stat: -rw-r--r-- 1,227 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
#!/bin/make

CXX = g++

# formerly in libutils
commonUtilsSources:= \
    Asset.cpp \
    AssetDir.cpp \
    AssetManager.cpp \
    ObbFile.cpp \
    ResourceTypes.cpp \
    StreamingZipInflater.cpp

# formerly in libui
commonUiSources:= \
    Input.cpp \
    InputDevice.cpp \
    Keyboard.cpp \
    KeyCharacterMap.cpp \
    KeyLayoutMap.cpp \
    VelocityControl.cpp \
    VelocityTracker.cpp \
    VirtualKeyMap.cpp

commonSources:= \
	$(commonUtilsSources) \
	$(commonUiSources)

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

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 -lutils

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

LIBNAME = libandroidfw
SONAME = $(LIBNAME).so.0
SOLIBNAME = $(SONAME).21.0

all: $(LIBNAME).a $(SOLIBNAME)

$(SOLIBNAME): $(OBJECTS)
	$(CXX) $(LDFLAGS) -Wl,-soname,$(SONAME) -o $(SOLIBNAME) $(OBJECTS) $(LIBS)

$(LIBNAME).a: $(OBJECTS)
	ar rs $(LIBNAME).a $(OBJECTS)

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