blob: 42c45e5480bb6b03d279ddf644fd53cbf8612829 [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 = libkey.a
8LIB_SHARED = libkey.so
9
10OBJS = $(patsubst %.c,%.o,$(wildcard *.c))
11
12CFLAGS += -g
13#LDFLAGS += -lpthread
14##############USER COMIZE END##################
15
16CFLAGS += -I$(APP_DIR)/include
17CFLAGS += -I$(TOPDIR)/pub/project/$(CHIP_NAME)/include/nv
18CFLAGS += -I$(LINUX_DIR)/include
19#CFLAGS += -I/$(TOPDIR)/pub/project/$(CHIP_NAME)/include/drv
20#CFLAGS += -I/$(CP_ROOT_DIR)/ps/driver/inc/misc
21CFLAGS += -fPIC
22LDFLAGS += -shared
23
24all: $(LIB_STATIC) $(LIB_SHARED)
25
26$(LIB_STATIC) : $(OBJS)
27 $(AR) rcs $(LIB_STATIC) $(OBJS)
28
29$(LIB_SHARED): $(OBJS)
30 $(CC) $(LDFLAGS) -o $@ $^
31
32romfs:
33 $(ROMFSINST) $(LIB_SHARED) /lib/$(LIB_SHARED)
34
35clean:
36 -$(RM) *.a *.o *.so $(LIB_SHARED) $(LIB_STATIC) $(OBJS)
37