blob: c9fe12d7b6668db47b0873cb96679339f515bf64 [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001#*******************************************************************************
2# include ZTE library makefile
3#*******************************************************************************
4include $(COMMON_MK)
5
6##############USER COMIZE BEGIN################
7LIB_STATIC = libsoft_timer.a
8LIB_SHARED = libsoft_timer.so
9LIB_STATIC_SC = libsoft_timer_sc.a
10LIB_SHARED_SC = libsoft_timer_sc.so
11
12OBJS = soft_timer.o
13OBJS2 = soft_timer_api_wrapper.o
14
15CFLAGS += -g
16
17LDFLAGS += -lpthread
18
19##############USER COMIZE END##################
20
21CFLAGS += -I$(APP_DIR)/include
22CFLAGS += -fPIC
23
24LDFLAGS += -shared
25
26ifeq ($(MK_SDK_VERSION),yes)
27all:
28 echo "libsoft_timer skip build in sdk version"
29else
30all: $(LIB_STATIC) $(LIB_SHARED) $(LIB_STATIC_SC) $(LIB_SHARED_SC)
31endif
32
33$(LIB_STATIC) : $(OBJS) $(OBJS2)
34 $(AR) rcs $@ $(OBJS) $(OBJS2)
35
36$(LIB_SHARED): $(OBJS) $(OBJS2)
37 $(CC) $(LDFLAGS) -o $@ $(OBJS) $(OBJS2)
38
39$(LIB_STATIC_SC) : $(OBJS)
40 $(AR) rcs $@ $(OBJS)
41
42$(LIB_SHARED_SC): $(OBJS)
43 $(CC) $(LDFLAGS) -o $@ $(OBJS)
44
45romfs:
46ifeq ($(LIBSOFT_TIMER_API_NEW),yes)
47 $(ROMFSINST) $(LIB_SHARED_SC) /lib/$(LIB_SHARED_SC)
48 cd $(ROOTFS_DIR)/lib && rm -f $(LIB_SHARED) && ln -s $(LIB_SHARED_SC) $(LIB_SHARED)
49else
50
51 $(ROMFSINST) $(LIB_SHARED) /lib/$(LIB_SHARED)
52 cd $(ROOTFS_DIR)/lib && rm -f $(LIB_SHARED_SC) && ln -s $(LIB_SHARED) $(LIB_SHARED_SC)
53endif
54
55clean:
56ifeq ($(MK_SDK_VERSION),yes)
57 echo "libsoft_timer skip clean in sdk version"
58else
59 -$(RM) *.a *.o *.so
60endif
61