xf.li | 6c8fc1e | 2023-08-12 00:11:09 -0700 | [diff] [blame] | 1 | #******************************************************************************* |
| 2 | # include ZTE library makefile |
| 3 | #******************************************************************************* |
| 4 | include $(COMMON_MK) |
| 5 | |
| 6 | ##############USER COMIZE BEGIN################ |
| 7 | |
| 8 | LIB_STATIC = libflags.a |
| 9 | LIB_SHARED = libflags.so |
| 10 | |
| 11 | OBJS = $(patsubst %.c,%.o,$(wildcard *.c)) |
| 12 | |
| 13 | #CFLAGS += -I$(zte_app_path)/at_ctl/inc |
| 14 | #CFLAGS += -I$(zte_lib_path)/libatutils |
| 15 | CFLAGS += -I$(LINUX_DIR)/include |
| 16 | CFLAGS += -g |
| 17 | |
| 18 | |
| 19 | ##############USER COMIZE END################## |
| 20 | |
| 21 | CFLAGS += -I$(zte_app_path)/include |
| 22 | CFLAGS += -fPIC |
| 23 | LDFLAGS += -shared |
| 24 | |
| 25 | all: $(LIB_STATIC) $(LIB_SHARED) |
| 26 | |
| 27 | $(LIB_STATIC) : $(OBJS) |
| 28 | $(AR) rcs $(LIB_STATIC) $(OBJS) |
| 29 | |
| 30 | $(LIB_SHARED): $(OBJS) |
| 31 | $(CC) $(LDFLAGS) -o $@ $^ |
| 32 | |
| 33 | romfs: |
| 34 | $(ROMFSINST) $(LIB_SHARED) /lib/$(LIB_SHARED) |
| 35 | |
| 36 | clean: |
| 37 | -$(RM) *.a *.o *.so $(LIB_SHARED) $(LIB_STATIC) $(OBJS) |