make ARCH=mips CROSS_COMPILE="/home/ralink/RT288x_SDK/toolchain/buildroot-gcc342/bin"/mipsel-linux ,make ARCH=mips CROSS_COMPILE="/home/ralink/RT288x_SDK/toolchain/buildroot-gcc342/bin"/mipsel-linux-uclibc- -j9 -C linux-2.6.36.x modules
ARCH=mips tool_path = /opt/buildroot-gcc342/bin lib_path = /opt/buildroot-gcc342/lib include_path = /opt/buildroot-gcc342/include CROSS_COMPILE = $(tool_path)/mipsel-linux- export CROSS_COMPILE CROSS_LIB = -L$(lib_path) export CROSS_LIB CROSS_INCLUDE = -I$(include_path) export CROSS_INCLUDE TARGET_CFLAGS = LD_CFLAGS = AS = $(CROSS_COMPILE)as LD = $(CROSS_COMPILE)ld $(LD_CFLAGS) CC = $(CROSS_COMPILE)gcc $(TARGET_CFLAGS) CPP = $(CC) -E CXX = $(CROSS_COMPILE)c++ $(TARGET_CFLAGS) G++ = $(CROSS_COMPILE)g++ $(TARGET_CFLAGS) AR = $(CROSS_COMPILE)ar NM = $(CROSS_COMPILE)nm STRIP = $(CROSS_COMPILE)strip OBJCOPY = $(CROSS_COMPILE)objcopy OBJDUMP = $(CROSS_COMPILE)objdump RANLIB = $(CROSS_COMPILE)ranlib ELF2FLT = $(CROSS_COMPILE)elf2flt export AS LD CC CPP CXX AR NM STRIP OBFCOPY OBJDUMP RANLIB ELF2FLT ARCH
include ./Mtk_Mips.mk hello:hello.o $(CC) -o hello hello.o hello.o:hello.c $(CC) -c hello.c clean: rm hello.c
标签:buildroot,CROSS,COMPILE,mtk,CFLAGS,path,mips,hello From: https://www.cnblogs.com/hshy/p/16917985.html