| #******************************************************************************* |
| # 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 |
| |