xf.li | bdd93d5 | 2023-05-12 07:10:14 -0700 | [diff] [blame] | 1 | #*******************************************************************************
|
| 2 | # include ZTE library makefile
|
| 3 | #*******************************************************************************
|
| 4 | include $(COMMON_MK)
|
| 5 |
|
| 6 | LIB_STATIC = libatreg.a
|
| 7 | LIB_SHARED = libatreg.so
|
| 8 |
|
| 9 | OBJS = $(patsubst %.c,%.o,$(wildcard *.c))
|
| 10 |
|
| 11 | CFLAGS += -I$(zte_app_path)/zte_comm/at_ctl/inc
|
| 12 | CFLAGS += -I$(zte_lib_path)/libatutils
|
| 13 | CFLAGS += -I$(LINUX_DIR)/include
|
| 14 |
|
| 15 | CFLAGS += -g -Werror=implicit-function-declaration
|
| 16 | CFLAGS += -I$(zte_app_path)/include
|
| 17 | CFLAGS += -fPIC
|
| 18 |
|
| 19 | LDFLAGS += -shared
|
| 20 |
|
| 21 |
|
| 22 | #*******************************************************************************
|
| 23 | # targets
|
| 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)
|