| # /***************************************************************************** |
| #* °æÈ¨ËùÓÐ (C)2015, ÖÐÐËͨѶ¹É·ÝÓÐÏÞ¹«Ë¾¡£ |
| #* |
| #* ÎļþÃû³Æ: Makefile |
| #* Îļþ±êʶ: Makefile |
| #* ÄÚÈÝÕªÒª: Makefile of ZTE applications |
| #* ʹÓ÷½·¨: void |
| #* |
| #* ÐÞ¸ÄÈÕÆÚ °æ±¾ºÅ Ð޸ıê¼Ç ÐÞ¸ÄÈË ÐÞ¸ÄÄÚÈÝ |
| #* ----------------------------------------------------------------------------- |
| #* 2015/03/12 V1.0 Create ²ÜÈü ´´½¨ |
| #* |
| # ******************************************************************************/ |
| |
| #******************************************************************************* |
| # include ZTE application makefile |
| #******************************************************************************* |
| .EXPORT_ALL_VARIABLES: |
| ifeq ($(LINUX_TYPE),uClinux) |
| include $(COMMON_MK) |
| endif |
| #include ../net_team.mk |
| #******************************************************************************* |
| # execute |
| #******************************************************************************* |
| EXEC = zping |
| |
| #******************************************************************************* |
| # objects |
| #******************************************************************************* |
| OBJSRC = $(filter-out zping.c,$(wildcard *.c)) |
| OBJS = $(patsubst %.c,%.o,$(OBJSRC)) |
| |
| #******************************************************************************* |
| # include path |
| #******************************************************************************* |
| ifeq ($(LINUX_TYPE),uClinux) |
| CFLAGS += -I../include -I$(zte_lib_path)/libnl_2/libnl-2.0/include -lnl -lm -L$(zte_lib_path)/libnl_2/libnl-2.0/lib/.libs |
| CFLAGS += -Wl,--allow-multiple-definition,-elf2flt=-s131072 |
| else |
| #CFLAGS += -I../include -I$(ROOT_PATH)/lib/zte_libs/libnl_2/libnl-2.0/include -lnl -lm -L$(ROOT_PATH)/lib/zte_libs/libnl_2/libnl-2.0/lib/.libs |
| CFLAGS += -I../include -I$(zte_lib_path)/libnl_2/libnl-2.0/include -lnl -lm -L$(zte_lib_path)/libnl_2/libnl-2.0/lib/.libs |
| endif |
| |
| CFLAGS += -g |
| CFLAGS += -I../include |
| CFLAGS += -g -Werror=implicit-function-declaration |
| #******************************************************************************* |
| # macro definition |
| #******************************************************************************* |
| ifeq ($(CUSTOM_MODEL), MF29S2) |
| CFLAGS += -DCUSTOM_VERSION_MF29S2_ZTE |
| endif |
| #CPPFLAGS += -D_MBB_OS_UCLINUX |
| #******************************************************************************* |
| # library |
| #******************************************************************************* |
| |
| LDLIBS += -lsoft_timer_sc |
| LDLIBS += -lsoftap |
| LDLIBS += -lpthread -lnl -lm -lnvram_sc |
| LDLIBS += -L$(zte_lib_path)/libnvram |
| LDLIBS += -L$(zte_lib_path)/libsoft_timer |
| LDLIBS += -L$(zte_lib_path)/libsoftap |
| CFLAGS += -I$(zte_lib_path)/libnvram |
| ifeq ($(LINUX_TYPE),uClinux) |
| LDFLAGS += -L$(zte_lib_path)/libnl_2/libnl-2.0/lib/.libs -Wl,--allow-multiple-definition |
| else |
| #LDFLAGS += -L$(ROOT_PATH)/lib/zte_libs/libnl_2/libnl-2.0/lib/.libs |
| LDFLAGS += -L$(zte_lib_path)/libnl_2/libnl-2.0/lib/.libs |
| endif |
| |
| #******************************************************************************* |
| # library path |
| #******************************************************************************* |
| |
| #******************************************************************************* |
| # targets |
| #******************************************************************************* |
| all: $(EXEC) |
| |
| $(EXEC): $(OBJS) |
| $(CC) $(CFLAGS) -o $@ $(EXEC).c $(OBJS) -Wl,--start-group $(LDLIBS) -Wl,--end-group $(LDFLAGS) |
| |
| $(OBJS):%.o:%.c |
| $(CC) $(CFLAGS) -c $< |
| |
| romfs root_fs: |
| #$(ROMFSINST) /bin/$(EXEC) |
| cp -v zping ../test_tools/ |
| |
| clean: |
| -rm -f $(EXEC) *.elf *.gdb *.o |
| |