yuezonghe | 824eb0c | 2024-06-27 02:32:26 -0700 | [diff] [blame] | 1 | #******************************************************************************* |
| 2 | # include ZTE library makefile |
| 3 | #******************************************************************************* |
| 4 | include $(COMMON_MK) |
| 5 | |
| 6 | ##############USER COMIZE BEGIN################ |
| 7 | LIB_STATIC = libsoft_timer.a |
| 8 | LIB_SHARED = libsoft_timer.so |
| 9 | |
| 10 | OBJS = soft_timer.o |
| 11 | |
| 12 | CFLAGS += -g |
| 13 | |
| 14 | LDFLAGS += -lpthread |
| 15 | |
| 16 | ##############USER COMIZE END################## |
| 17 | |
| 18 | CFLAGS += -I$(APP_DIR)/include |
| 19 | CFLAGS += -fPIC |
| 20 | |
| 21 | LDFLAGS += -shared |
| 22 | |
| 23 | all: $(LIB_STATIC) $(LIB_SHARED) |
| 24 | |
| 25 | $(LIB_STATIC) : $(OBJS) |
| 26 | $(AR) rcs $(LIB_STATIC) $(OBJS) |
| 27 | |
| 28 | $(LIB_SHARED): $(OBJS) |
| 29 | $(CC) $(LDFLAGS) -o $@ $^ |
| 30 | |
| 31 | romfs: |
| 32 | $(ROMFSINST) $(LIB_SHARED) /lib/$(LIB_SHARED) |
| 33 | |
| 34 | clean: |
| 35 | -$(RM) *.a *.o *.so $(LIB_SHARED) $(LIB_STATIC) $(OBJS) |
| 36 | |