lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 1 | #******************************************************************************* |
| 2 | # include ZTE library makefile |
| 3 | #******************************************************************************* |
| 4 | include $(COMMON_MK) |
| 5 | |
| 6 | ##############USER COMIZE BEGIN################ |
| 7 | LIB_STATIC = libcpnv.a |
| 8 | LIB_SHARED = libcpnv.so |
| 9 | |
| 10 | OBJS = cpnv.o |
| 11 | |
xf.li | aa4d92f | 2023-09-13 00:18:58 -0700 | [diff] [blame] | 12 | ifeq ($(USE_NVRO_BACKUP),yes) |
| 13 | OBJS += nvro.o mtd.o file.o |
| 14 | endif |
| 15 | |
lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 16 | CFLAGS += -g -Werror=implicit-function-declaration |
| 17 | #LDFLAGS += -lpthread |
| 18 | ##############USER COMIZE END################## |
| 19 | |
| 20 | CFLAGS += -I$(APP_DIR)/include |
| 21 | #CFLAGS += -I$(TOPDIR)/pub/project/$(CHIP_NAME)/include/nv |
xf.li | aa4d92f | 2023-09-13 00:18:58 -0700 | [diff] [blame] | 22 | #CFLAGS += -I$(LINUX_DIR)/include |
lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 23 | CFLAGS += -I$(zte_lib_path)/libnvram |
xf.li | aa4d92f | 2023-09-13 00:18:58 -0700 | [diff] [blame] | 24 | CFLAGS += -I$(zte_lib_path)/libssl/install/include |
lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 25 | CFLAGS += -fPIC |
| 26 | LDFLAGS += -shared |
| 27 | |
| 28 | all: $(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 | |
| 36 | romfs: |
| 37 | $(ROMFSINST) $(LIB_SHARED) /lib/$(LIB_SHARED) |
| 38 | |
| 39 | clean: |
| 40 | -$(RM) *.a *.o *.so $(LIB_SHARED) $(LIB_STATIC) $(OBJS) |
| 41 | |