[Feature][ZXW-88]merge P50 version
Only Configure: No
Affected branch: master
Affected module: unknown
Is it affected on both ZXIC and MTK: only ZXIC
Self-test: Yes
Doc Update: No
Change-Id: I34667719d9e0e7e29e8e4368848601cde0a48408
diff --git a/ap/lib/libmtd/Makefile b/ap/lib/libmtd/Makefile
new file mode 100755
index 0000000..f4fa4c6
--- /dev/null
+++ b/ap/lib/libmtd/Makefile
@@ -0,0 +1,37 @@
+#*******************************************************************************
+# include ZTE library makefile
+#*******************************************************************************
+#include $(COMMON_MK)
+
+##############USER COMIZE BEGIN################
+LIB_STATIC = libmtd.a
+LIB_SHARED = libmtd.so
+
+OBJS = mtd.o
+
+CFLAGS += -g -I.
+# off_t:32 bits -> 64 bits
+CFLAGS += -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
+#LDFLAGS += -lpthread
+##############USER COMIZE END##################
+
+CFLAGS += -fPIC
+
+CFLAGS += -I$(zte_app_path)/include
+
+LDFLAGS += -shared
+
+all: $(LIB_STATIC) $(LIB_SHARED)
+
+$(LIB_STATIC) : $(OBJS)
+ $(AR) rcs $(LIB_STATIC) $(OBJS)
+
+$(LIB_SHARED): $(OBJS)
+ $(CC) $(LDFLAGS) -o $@ $^
+
+romfs:
+ $(ROMFSINST) $(LIB_SHARED) /lib/$(LIB_SHARED)
+
+clean:
+ -$(RM) *.a *.o *.so $(LIB_SHARED) $(LIB_STATIC) $(OBJS)
+