add expat to makefile
This commit is contained in:
parent
35bf240ec2
commit
e084044a58
6 changed files with 44 additions and 21 deletions
|
@ -3,6 +3,7 @@ build :
|
||||||
cd protobuf; $(MAKE)
|
cd protobuf; $(MAKE)
|
||||||
cd png; $(MAKE)
|
cd png; $(MAKE)
|
||||||
cd skia; $(MAKE)
|
cd skia; $(MAKE)
|
||||||
|
cd expat; $(MAKE)
|
||||||
cd freetype; $(MAKE)
|
cd freetype; $(MAKE)
|
||||||
cd osmand; $(MAKE)
|
cd osmand; $(MAKE)
|
||||||
|
|
||||||
|
@ -10,5 +11,6 @@ clean :
|
||||||
cd protobuf; $(MAKE) clean
|
cd protobuf; $(MAKE) clean
|
||||||
cd png; $(MAKE) clean
|
cd png; $(MAKE) clean
|
||||||
cd skia; $(MAKE) clean
|
cd skia; $(MAKE) clean
|
||||||
|
cd expat; $(MAKE) clean
|
||||||
cd freetype; $(MAKE) clean
|
cd freetype; $(MAKE) clean
|
||||||
cd osmand; $(MAKE) clean
|
cd osmand; $(MAKE) clean
|
||||||
|
|
1
Osmand-kernel/expat/.gitignore
vendored
Normal file
1
Osmand-kernel/expat/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
build
|
|
@ -1,6 +1,7 @@
|
||||||
LOCAL_PATH:= $(call my-dir)
|
LOCAL_PATH:= $(call my-dir)
|
||||||
|
|
||||||
include $(CLEAR_VARS)
|
include $(CLEAR_VARS)
|
||||||
|
include $(LOCAL_PATH)/Common.mk
|
||||||
|
|
||||||
ifneq ($(OSMAND_BUILDING_NEON_LIBRARY),true)
|
ifneq ($(OSMAND_BUILDING_NEON_LIBRARY),true)
|
||||||
LOCAL_MODULE := expat_static
|
LOCAL_MODULE := expat_static
|
||||||
|
@ -9,26 +10,8 @@ LOCAL_MODULE := expat_static_neon
|
||||||
LOCAL_ARM_NEON := true
|
LOCAL_ARM_NEON := true
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(OSMAND_EXPAT_LOC),)
|
|
||||||
OSMAND_EXPAT_LOC := ./expat_library
|
|
||||||
endif
|
|
||||||
ifeq ($(OSMAND_EXPAT_ABS),)
|
|
||||||
OSMAND_EXPAT_ABS := $(LOCAL_PATH)/expat_library
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifneq ($(OSMAND_USE_PREBUILT),true)
|
ifneq ($(OSMAND_USE_PREBUILT),true)
|
||||||
|
|
||||||
LOCAL_SRC_FILES := \
|
|
||||||
$(OSMAND_EXPAT_LOC)/lib/xmlparse.c \
|
|
||||||
$(OSMAND_EXPAT_LOC)/lib/xmlrole.c \
|
|
||||||
$(OSMAND_EXPAT_LOC)/lib/xmltok.c
|
|
||||||
|
|
||||||
LOCAL_CFLAGS += -Wall -Wmissing-prototypes -Wstrict-prototypes -fexceptions -DHAVE_EXPAT_CONFIG_H
|
|
||||||
|
|
||||||
LOCAL_C_INCLUDES += \
|
|
||||||
$(OSMAND_EXPAT_ABS) \
|
|
||||||
$(OSMAND_EXPAT_ABS)/lib
|
|
||||||
|
|
||||||
include $(BUILD_STATIC_LIBRARY)
|
include $(BUILD_STATIC_LIBRARY)
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
14
Osmand-kernel/expat/Common.mk
Normal file
14
Osmand-kernel/expat/Common.mk
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
OSMAND_EXPAT_ABS := ./expat_library
|
||||||
|
OSMAND_EXPAT_LOC := $(LOCAL_PATH)/expat_library
|
||||||
|
|
||||||
|
# Include paths
|
||||||
|
LOCAL_C_INCLUDES += \
|
||||||
|
$(OSMAND_EXPAT_ABS) \
|
||||||
|
$(OSMAND_EXPAT_ABS)/lib
|
||||||
|
|
||||||
|
LOCAL_CFLAGS += -fPIC -Wall -Wmissing-prototypes -Wstrict-prototypes -fexceptions -DHAVE_EXPAT_CONFIG_H
|
||||||
|
|
||||||
|
LOCAL_SRC_FILES := \
|
||||||
|
$(OSMAND_EXPAT_LOC)/lib/xmlparse.c \
|
||||||
|
$(OSMAND_EXPAT_LOC)/lib/xmlrole.c \
|
||||||
|
$(OSMAND_EXPAT_LOC)/lib/xmltok.c
|
24
Osmand-kernel/expat/Makefile
Normal file
24
Osmand-kernel/expat/Makefile
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
LOCAL_PATH = .
|
||||||
|
include ../Makefile.vars
|
||||||
|
include Common.mk
|
||||||
|
|
||||||
|
CPP_FILE_EXTENSION = c
|
||||||
|
LIBNAME := libexpat.a
|
||||||
|
PREBUILT_DIR = ../jni-prebuilt/$(os)-$(arch)/
|
||||||
|
OBJECTS = $(LOCAL_SRC_FILES:%.$(CPP_FILE_EXTENSION)=build/obj-$(os)-$(arch)/%.o)
|
||||||
|
CPPFLAGS = $(LOCAL_CFLAGS) $(C_INCLUDES) $(CPP_OS_FLAGS)
|
||||||
|
|
||||||
|
target : $(PREBUILT_DIR)/$(LIBNAME)
|
||||||
|
|
||||||
|
$(PREBUILT_DIR)/$(LIBNAME) : build/$(LIBNAME)
|
||||||
|
cp build/$(LIBNAME) $(PREBUILT_DIR)/$(LIBNAME)
|
||||||
|
|
||||||
|
build/$(LIBNAME): $(OBJECTS)
|
||||||
|
ar -rf build/$(LIBNAME) $(OBJECTS)
|
||||||
|
|
||||||
|
build/obj-$(os)-$(arch)/%.o : %.$(CPP_FILE_EXTENSION) $(LOCAL_C_INCLUDES)
|
||||||
|
@mkdir -p `dirname $@`
|
||||||
|
$(CXX) -o $@ -c $*.$(CPP_FILE_EXTENSION) $(CPPFLAGS)
|
||||||
|
|
||||||
|
clean:
|
||||||
|
$(RM) $(OBJECTS) build/$(LIBNAME)
|
|
@ -22,8 +22,7 @@ LOCAL_SRC_FILES:= \
|
||||||
$(OSMAND_PNG_LOC)/pngwutil.c
|
$(OSMAND_PNG_LOC)/pngwutil.c
|
||||||
|
|
||||||
LOCAL_C_INCLUDES += \
|
LOCAL_C_INCLUDES += \
|
||||||
$(OSMAND_PNG_ABS)/
|
$(OSMAND_EXPAT_ABS) \
|
||||||
|
$(OSMAND_EXPAT_ABS)/lib
|
||||||
|
|
||||||
LOCAL_CFLAGS += -W -Wall
|
|
||||||
LOCAL_CFLAGS += -fPIC -DPIC -fvisibility=hidden -fpermissive
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue