2012-04-30 22:34:50 +02:00
|
|
|
include Common.mk
|
2012-05-01 01:43:09 +02:00
|
|
|
|
|
|
|
CPP_FILE_EXTENSION = cpp
|
2012-05-01 00:30:31 +02:00
|
|
|
LIBNAME := libproto.a
|
|
|
|
PREBUILT_DIR = ../jni-prebuilt/linux-x86/
|
2012-05-01 01:43:09 +02:00
|
|
|
OBJECTS = $(LOCAL_SRC_FILES:%.$(CPP_FILE_EXTENSION)=build/obj/%.o)
|
2012-04-30 22:34:50 +02:00
|
|
|
CPPFLAGS := -DGOOGLE_PROTOBUF_NO_RTTI -I.
|
|
|
|
LDLIBS = -lpthread
|
|
|
|
|
2012-05-01 00:30:31 +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-04-30 22:34:50 +02:00
|
|
|
|
2012-05-01 01:43:09 +02:00
|
|
|
build/obj/%.o : %.$(CPP_FILE_EXTENSION) $(LOCAL_C_INCLUDES)
|
2012-04-30 22:34:50 +02:00
|
|
|
@mkdir -p `dirname $@`
|
2012-05-01 01:43:09 +02:00
|
|
|
$(CXX) -o $@ -c $*.$(CPP_FILE_EXTENSION) $(CPPFLAGS)
|
2012-04-30 22:34:50 +02:00
|
|
|
|
|
|
|
clean:
|
2012-05-01 00:30:31 +02:00
|
|
|
$(RM) $(OBJECTS) build/$(LIBNAME)
|