blob: dce8bd289e759d9325a1ef4640aaff4c6aa61296 [file] [log] [blame]
#*******************************************************************************
# include ZTE library makefile
#*******************************************************************************
include $(COMMON_MK)
LIB_STATIC = libght_vsim.a
LIB_SHARED = libght_vsim.so
OBJS = $(patsubst %.c,%.o,$(wildcard *.c))
#定义宏和头文件目录,要用+=,不要用=,否则会覆盖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)