[T106][ZXW-22]7520V3SCV2.01.01.02P42U09_VEC_V0.8_AP_VEC origin source commit
Change-Id: Ic6e05d89ecd62fc34f82b23dcf306c93764aec4b
diff --git a/ap/lib/libnvram/Makefile b/ap/lib/libnvram/Makefile
new file mode 100755
index 0000000..870f500
--- /dev/null
+++ b/ap/lib/libnvram/Makefile
@@ -0,0 +1,57 @@
+#*******************************************************************************
+# include ZTE library makefile
+#*******************************************************************************
+include $(COMMON_MK)
+
+##############USER COMIZE BEGIN################
+LIB_STATIC = libnvram.a
+LIB_SHARED = libnvram.so
+LIB_STATIC_SC = libnvram_sc.a
+LIB_SHARED_SC = libnvram_sc.so
+
+OBJS = nv_api.o cfg_api.o sys_infra.o
+OBJS2 = cfg_api_wrapper.o
+
+CFLAGS += -g
+#LDFLAGS += -lpthread
+##############USER COMIZE END##################
+
+CFLAGS += -I$(APP_DIR)/include
+CFLAGS += -fPIC
+LDFLAGS += -shared
+
+ifeq ($(MK_SDK_VERSION),yes)
+all:
+ echo "libnvram skip build in sdk version"
+else
+all: $(LIB_STATIC) $(LIB_SHARED) $(LIB_STATIC_SC) $(LIB_SHARED_SC)
+endif
+
+$(LIB_STATIC) : $(OBJS) $(OBJS2)
+ $(AR) rcs $@ $(OBJS) $(OBJS2)
+
+$(LIB_SHARED): $(OBJS) $(OBJS2)
+ $(CC) $(LDFLAGS) -o $@ $(OBJS) $(OBJS2)
+
+$(LIB_STATIC_SC) : $(OBJS)
+ $(AR) rcs $@ $(OBJS)
+
+$(LIB_SHARED_SC): $(OBJS)
+ $(CC) $(LDFLAGS) -o $@ $(OBJS)
+
+romfs:
+ifeq ($(LIBNVRAM_API_NEW),yes)
+ $(ROMFSINST) $(LIB_SHARED_SC) /lib/$(LIB_SHARED_SC)
+ cd $(ROOTFS_DIR)/lib && rm -f $(LIB_SHARED) && ln -s $(LIB_SHARED_SC) $(LIB_SHARED)
+else
+ $(ROMFSINST) $(LIB_SHARED) /lib/$(LIB_SHARED)
+ cd $(ROOTFS_DIR)/lib && rm -f $(LIB_SHARED_SC) && ln -s $(LIB_SHARED) $(LIB_SHARED_SC)
+endif
+
+clean:
+ifeq ($(MK_SDK_VERSION),yes)
+ echo "libupi_ab skip clean in sdk version"
+else
+ -$(RM) *.a *.o *.so
+endif
+