| #******************************************************************************* |
| # include ZTE library makefile |
| #******************************************************************************* |
| include $(COMMON_MK) |
| |
| ##############USER COMIZE BEGIN################ |
| LIB_STATIC = libsoft_timer.a |
| LIB_SHARED = libsoft_timer.so |
| LIB_STATIC_SC = libsoft_timer_sc.a |
| LIB_SHARED_SC = libsoft_timer_sc.so |
| |
| OBJS = soft_timer.o |
| OBJS2 = soft_timer_api_wrapper.o |
| |
| CFLAGS += -g |
| |
| LDFLAGS += -lpthread |
| |
| ##############USER COMIZE END################## |
| |
| CFLAGS += -I$(APP_DIR)/include |
| CFLAGS += -fPIC |
| |
| LDFLAGS += -shared |
| |
| ifeq ($(MK_SDK_VERSION),yes) |
| all: |
| echo "libsoft_timer skip build in sdk version" |
| else |
| all: $(LIB_STATIC) $(LIB_SHARED) $(LIB_STATIC_SC) $(LIB_SHARED_SC) |
| endif |
| |
| $(LIB_STATIC) : $(OBJS) $(OBJS2) |
| $(AR) rcs $@ $(OBJS) $(OBJS2) |
| |
| $(LIB_SHARED): $(OBJS) $(OBJS2) |
| $(CC) $(LDFLAGS) -o $@ $(OBJS) $(OBJS2) |
| |
| $(LIB_STATIC_SC) : $(OBJS) |
| $(AR) rcs $@ $(OBJS) |
| |
| $(LIB_SHARED_SC): $(OBJS) |
| $(CC) $(LDFLAGS) -o $@ $(OBJS) |
| |
| romfs: |
| ifeq ($(LIBSOFT_TIMER_API_NEW),yes) |
| $(ROMFSINST) $(LIB_SHARED_SC) /lib/$(LIB_SHARED_SC) |
| cd $(ROOTFS_DIR)/lib && rm -f $(LIB_SHARED) && ln -s $(LIB_SHARED_SC) $(LIB_SHARED) |
| else |
| |
| $(ROMFSINST) $(LIB_SHARED) /lib/$(LIB_SHARED) |
| cd $(ROOTFS_DIR)/lib && rm -f $(LIB_SHARED_SC) && ln -s $(LIB_SHARED) $(LIB_SHARED_SC) |
| endif |
| |
| clean: |
| ifeq ($(MK_SDK_VERSION),yes) |
| echo "libsoft_timer skip clean in sdk version" |
| else |
| -$(RM) *.a *.o *.so |
| endif |
| |