|
大家好我是linux新人有一个简单的问题,厂家提供了一个can的驱动包,我现在把它编译通过了,但现在的问题来了
我要如何安装驱动
1、要把编译好的那些文件copy到什么目录下
2、要不要配什么脚本文件
3、要不要重新编译内核
我刚从window转过来,很多概念搞不清,先谢谢大家了
以下是编译can驱动的makefile文件
我的qq 175412977 在线等
# Comment/uncomment the following line to disable/enable debugging
#DEBUG = y
EXTDEBUG = y #extended debugging (register dumps)定义变量
# This Makefile has been simplified as much as possible, by putting all
# generic material, independent of this specific directory, into
# ../Rules.make. Read that file for details
TOPDIR := $(shell cd ..; pwd) //????????
include Rules.make#加入规则
# Add your debugging flag (or not) to CFLAGS
ifeq ($(EXTDEBUG),y)
DEBFLAGS = -O -g -DCAN_DEBUG -DREGDUMP # "-O" is needed to expand inlines
else
ifeq ($(DEBUG),y)
DEBFLAGS = -O -g -DCAN_DEBUG # "-O" is needed to expand inlines
else
DEBFLAGS = -O2
endif
endif
CFLAGS += $(DEBFLAGS)
CFLAGS += -I..
VPATH = ./src:./include:./examples
TARGET = can
OBJS = $(TARGET).o
SRC = main.c proc.c hms30c7202_can.c c_can.c \
irq.c open.c close.c read.c write.c ioctl.c \
all: .depend $(TARGET).o
$(TARGET).o: $(SRC:.c=.o)
$(LD) -r $^ -o $@
install:
install -d $(INSTALLDIR)
install -c $(TARGET).o $(INSTALLDIR)
clean:
rm -f *.o src/*.o *~ core .depend
depend .depend dep:
$(CC) $(CFLAGS) -M src/*.c > $@
#ifeq (.depend, $(wildcard .depend))
#include .depend
#endif |
|