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
|