2012-05-08 10:47:42 +02:00
|
|
|
LOCAL_PATH = .
|
2012-05-15 20:48:06 +02:00
|
|
|
include ../Makefile.vars
|
2012-05-08 10:47:42 +02:00
|
|
|
include Common.mk
|
|
|
|
|
|
|
|
CPP_FILE_EXTENSION = c
|
|
|
|
LIBNAME := libpng.a
|
2012-05-15 20:48:06 +02:00
|
|
|
PREBUILT_DIR = ../jni-prebuilt/$(os)-$(arch)/
|
|
|
|
OBJECTS = $(LOCAL_SRC_FILES:%.$(CPP_FILE_EXTENSION)=build/obj-$(os)-$(arch)/%.o)
|
2012-05-08 10:47:42 +02:00
|
|
|
C_INCLUDES := $(addprefix -I, $(LOCAL_C_INCLUDES))
|
2012-05-15 21:32:29 +02:00
|
|
|
CPPFLAGS = $(LOCAL_CFLAGS) $(C_INCLUDES) $(CPP_OS_FLAGS)
|
2012-05-08 10:47:42 +02:00
|
|
|
|
|
|
|
target : $(PREBUILT_DIR)/$(LIBNAME)
|
|
|
|
|
|
|
|
$(PREBUILT_DIR)/$(LIBNAME) : build/$(LIBNAME)
|
|
|
|
cp build/$(LIBNAME) $(PREBUILT_DIR)/$(LIBNAME)
|
|
|
|
|
|
|
|
build/$(LIBNAME): $(OBJECTS)
|
|
|
|
ar -rf build/$(LIBNAME) $(OBJECTS)
|
|
|
|
|
2012-05-15 20:48:06 +02:00
|
|
|
build/obj-$(os)-$(arch)/%.o : %.$(CPP_FILE_EXTENSION) $(LOCAL_C_INCLUDES)
|
2012-05-08 10:47:42 +02:00
|
|
|
@mkdir -p `dirname $@`
|
|
|
|
$(CXX) -o $@ -c $*.$(CPP_FILE_EXTENSION) $(CPPFLAGS)
|
|
|
|
|
|
|
|
clean:
|
|
|
|
$(RM) $(OBJECTS) build/$(LIBNAME)
|