blob: d74f63e3c57afe3858baae2314e3d91ebdb92f24 [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001#*******************************************************************************
2# include ZTE library makefile
3#*******************************************************************************
4include $(COMMON_MK)
5
6LIB_STATIC = libupi_ab.a
7LIB_SHARED = libupi_ab.so
8
9SRCS=$(wildcard ./src/*.c)
10OBJS = $(patsubst %.c,%.o,$(SRCS))
11
12#定义宏和头文件目录,要用+=,不要用=,否则会覆盖COMMON_MK里的值
13CFLAGS += -g -O2 -marm -I./upi_ab/inc
14CFLAGS += -Wall -g
15
16CFLAGS += -Werror=implicit-int \
17 -Werror=implicit-function-declaration \
18 -Werror=float-equal \
19 -Werror=return-type \
20 -Werror=enum-compare \
21 -Werror=init-self
22
23CFLAGS += -O2
24CFLAGS += -I../../app/include
25CFLAGS += -I./inc \
26 -I$(zte_lib_path)/libssl/install/include
27
28#下面不要修改
29CFLAGS += -fPIC
30LDFLAGS += -shared
31
32ifeq ($(MK_SDK_VERSION),yes)
33all:
34 echo "libupi_ab skip build in sdk version"
35else
36all: $(LIB_STATIC) $(LIB_SHARED)
37endif
38
39$(LIB_STATIC) : $(OBJS)
40 $(AR) rcs $(LIB_STATIC) $(OBJS)
41
42$(LIB_SHARED): $(OBJS)
43 $(CC) $(LDFLAGS) -o $@ $^
44
45romfs:
46 $(ROMFSINST) $(LIB_SHARED) /lib/$(LIB_SHARED)
47
48clean:
49ifeq ($(MK_SDK_VERSION),yes)
50 echo "libupi_ab skip clean in sdk version"
51else
52 -@rm *.a *.o *.so $(LIB_SHARED) $(LIB_STATIC) $(OBJS)
53endif