add expat to makefile

This commit is contained in:
Victor Shcherb 2012-05-28 19:19:39 +02:00
parent 35bf240ec2
commit e084044a58
6 changed files with 44 additions and 21 deletions

View file

@ -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
View file

@ -0,0 +1 @@
build

View file

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

View 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

View 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)

View file

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