blob: 489cb8c5a974fce5b513bda9f497a5acbfe4f445 [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001#*******************************************************************************
2# include ZTE library makefile
3#*******************************************************************************
4include $(COMMON_MK)
5
6##############USER COMIZE BEGIN################
7LIB_STATIC = libcpnv.a
8LIB_SHARED = libcpnv.so
9
10OBJS = cpnv.o
11
xf.liaa4d92f2023-09-13 00:18:58 -070012ifeq ($(USE_NVRO_BACKUP),yes)
13OBJS += nvro.o mtd.o file.o
14endif
15
lh9ed821d2023-04-07 01:36:19 -070016CFLAGS += -g -Werror=implicit-function-declaration
17#LDFLAGS += -lpthread
18##############USER COMIZE END##################
19
20CFLAGS += -I$(APP_DIR)/include
21#CFLAGS += -I$(TOPDIR)/pub/project/$(CHIP_NAME)/include/nv
xf.liaa4d92f2023-09-13 00:18:58 -070022#CFLAGS += -I$(LINUX_DIR)/include
lh9ed821d2023-04-07 01:36:19 -070023CFLAGS += -I$(zte_lib_path)/libnvram
xf.liaa4d92f2023-09-13 00:18:58 -070024CFLAGS += -I$(zte_lib_path)/libssl/install/include
lh9ed821d2023-04-07 01:36:19 -070025CFLAGS += -fPIC
26LDFLAGS += -shared
27
28all: $(LIB_STATIC) $(LIB_SHARED)
29
30$(LIB_STATIC) : $(OBJS)
31 $(AR) rcs $(LIB_STATIC) $(OBJS)
32
33$(LIB_SHARED): $(OBJS)
34 $(CC) $(LDFLAGS) -o $@ $^
35
36romfs:
37 $(ROMFSINST) $(LIB_SHARED) /lib/$(LIB_SHARED)
38
39clean:
40 -$(RM) *.a *.o *.so $(LIB_SHARED) $(LIB_STATIC) $(OBJS)
41