blob: d74f63e3c57afe3858baae2314e3d91ebdb92f24 [file] [log] [blame]
#*******************************************************************************
# include ZTE library makefile
#*******************************************************************************
include $(COMMON_MK)
LIB_STATIC = libupi_ab.a
LIB_SHARED = libupi_ab.so
SRCS=$(wildcard ./src/*.c)
OBJS = $(patsubst %.c,%.o,$(SRCS))
#定义宏和头文件目录,要用+=,不要用=,否则会覆盖COMMON_MK里的值
CFLAGS += -g -O2 -marm -I./upi_ab/inc
CFLAGS += -Wall -g
CFLAGS += -Werror=implicit-int \
-Werror=implicit-function-declaration \
-Werror=float-equal \
-Werror=return-type \
-Werror=enum-compare \
-Werror=init-self
CFLAGS += -O2
CFLAGS += -I../../app/include
CFLAGS += -I./inc \
-I$(zte_lib_path)/libssl/install/include
#下面不要修改
CFLAGS += -fPIC
LDFLAGS += -shared
ifeq ($(MK_SDK_VERSION),yes)
all:
echo "libupi_ab skip build in sdk version"
else
all: $(LIB_STATIC) $(LIB_SHARED)
endif
$(LIB_STATIC) : $(OBJS)
$(AR) rcs $(LIB_STATIC) $(OBJS)
$(LIB_SHARED): $(OBJS)
$(CC) $(LDFLAGS) -o $@ $^
romfs:
$(ROMFSINST) $(LIB_SHARED) /lib/$(LIB_SHARED)
clean:
ifeq ($(MK_SDK_VERSION),yes)
echo "libupi_ab skip clean in sdk version"
else
-@rm *.a *.o *.so $(LIB_SHARED) $(LIB_STATIC) $(OBJS)
endif