blob: 9504beed15c84df46233e8ead092a203c4cdc878 [file] [log] [blame]
#*******************************************************************************
# include ZTE library makefile
#*******************************************************************************
include $(COMMON_MK)
LIB_STATIC = libdemo.a
LIB_SHARED = libdemo.so
OBJS = demo.o
#定义宏和头文件目录,要用+=,不要用=,否则会覆盖COMMON_MK里的值
CFLAGS += -g
#CFLAGS += -I$(APP_DIR)/include
#下面不要修改
CFLAGS += -fPIC
LDFLAGS += -shared
all: $(LIB_STATIC) $(LIB_SHARED)
$(LIB_STATIC) : $(OBJS)
$(AR) rcs $(LIB_STATIC) $(OBJS)
$(LIB_SHARED): $(OBJS)
$(CC) $(LDFLAGS) -o $@ $^
romfs:
$(ROMFSINST) $(LIB_SHARED) /lib/$(LIB_SHARED)
clean:
-@rm *.a *.o *.so $(LIB_SHARED) $(LIB_STATIC) $(OBJS)