Makefile
上传用户:plenty2008
上传日期:2022-08-02
资源大小:11k
文件大小:1k
源码类别:

驱动编程

开发平台:

Unix_Linux

  1. PWD    :=$(shell pwd)
  2. WARN  :=-Wall -Wstrict-prototypes -Wno-trigraphs -Wmissing-prototypes
  3. INCLUDE :=-I/home/cvtech/jx2410/linux/include -I../include
  4. TEMP :=-isystem /lib/modules/`uname -r`/build/include
  5. EXEC :=candrv.o
  6. #CFLAGS  :=-O2 -DMODULE -D__KERNEL__ ${WARN} ${INCLUDE}
  7. CFLAGS :=-O2 -DMODULE -D__KERNEL__ ${INCLUDE}
  8. LDFLAGS +=-r
  9. #LIBS :=./port2.a
  10. CC  :=/usr/local/arm/2.95.3/bin/arm-linux-gcc
  11. LD :=/usr/local/arm/2.95.3/bin/arm-linux-ld
  12. OBJS  :=${patsubst %.c, %.o, ${wildcard *.c}}
  13. all :${EXEC}
  14. $(EXEC) :$(OBJS)
  15. $(LD) $(LDFLAGS) -o $@ $(OBJS) 
  16. cp $(EXEC) /tftpboot/exercise/
  17. .PHONY :clean
  18. clean :
  19. rm -rf *.o