blob: dce8bd289e759d9325a1ef4640aaff4c6aa61296 [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001#*******************************************************************************
2# include ZTE library makefile
3#*******************************************************************************
4include $(COMMON_MK)
5
6LIB_STATIC = libght_vsim.a
7LIB_SHARED = libght_vsim.so
8
9OBJS = $(patsubst %.c,%.o,$(wildcard *.c))
10
11#定义宏和头文件目录,要用+=,不要用=,否则会覆盖COMMON_MK里的值
12CFLAGS += -g
13CFLAGS += -I$(APP_DIR)/include
14
15#下面不要修改
16CFLAGS += -fPIC
17LDFLAGS += -shared
18
19all: $(LIB_STATIC) $(LIB_SHARED)
20
21$(LIB_STATIC) : $(OBJS)
22 $(AR) rcs $(LIB_STATIC) $(OBJS)
23
24$(LIB_SHARED): $(OBJS)
25 $(CC) $(LDFLAGS) -o $@ $^
26
27romfs:
28 $(ROMFSINST) $(LIB_SHARED) /lib/$(LIB_SHARED)
29
30clean:
31 -@rm *.a *.o *.so $(LIB_SHARED) $(LIB_STATIC) $(OBJS)