能用的交叉编译模块Makefile,注意不是空格,是Tab键
ifneq ($(KERNELRELEASE),)
obj-m := helloword.o
else
KERNELDIR :=/home/t/ti-sdk-am335x-evm-07.00.00.00/board-support/linux-3.12.10-ti2013.12.01
PWD := $(shell pwd)
CROSS_COMPILE=arm-linux-gnueabihf-
CC = $(CROSS_COMPILE)gcc
all:
make -C $(KERNELDIR) M=$(PWD) ARCH=arm CROSS_COMPILE=$(CROSS_COMPILE) modules
clean:
rm *.o *.ko *.mod.c
endif