lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 1 | #******************************************************************************* |
| 2 | # include ZTE library makefile |
| 3 | #******************************************************************************* |
| 4 | include $(zte_lib_mak) |
| 5 | |
| 6 | ##############USER COMIZE BEGIN################ |
| 7 | #include ../net_team.mk |
| 8 | |
| 9 | LIB_STATIC = libzte_vsim.a |
| 10 | #LIB_SHARED = libzte_vsim.so |
| 11 | |
| 12 | OBJS = $(patsubst %.c,%.o,$(wildcard ./src/*.c)) |
| 13 | |
| 14 | CFLAGS += -I. |
| 15 | CFLAGS += -I./inc |
| 16 | CFLAGS += -I$(zte_app_path)/at_ctl/inc |
| 17 | CFLAGS += -I$(zte_lib_path)/libatutils |
| 18 | CFLAGS += -I$(LINUX_DIR)/include |
| 19 | CFLAGS += -g |
| 20 | |
| 21 | |
| 22 | ##############USER COMIZE END################## |
| 23 | |
| 24 | CFLAGS += -I$(zte_app_path)/include |
| 25 | CFLAGS += -fPIC |
| 26 | LDFLAGS += -shared |
| 27 | |
| 28 | h_sources += $(wildcard ./inc/*.h) |
| 29 | |
| 30 | |
| 31 | all: $(LIB_STATIC) $(LIB_SHARED) |
| 32 | |
| 33 | $(LIB_STATIC) : $(OBJS) |
| 34 | $(AR) rcs $(LIB_STATIC) $(OBJS) |
| 35 | |
| 36 | $(LIB_SHARED): $(OBJS) |
| 37 | $(CC) $(LDFLAGS) -o $@ $^ -Wl,-whole-archive $(LDLIBS) -Wl,-no-whole-archive |
| 38 | |
| 39 | romfs: |
| 40 | echo "static lib no need copy to lib" |
| 41 | |
| 42 | clean: |
| 43 | -rm -f $(LIB_SHARED) $(LIB_STATIC) $(OBJS) |
| 44 | |