Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #-------------------------------------------------------------------------------
- # Makefile for MOXA UPort 1100 Series drvier
- #-------------------------------------------------------------------------------
- DRV_VER := 1.0
- REL_DATE := 03/18/2008
- KVER := $(shell uname -r)
- KDISVER := $(shell uname -a)
- KDIR := /lib/modules/$(KVER)/build/include
- PWD := $(shell pwd)
- TARGET := mxu1100_24
- #############################2.4########################################
- CC=gcc -c
- ARCH=$(shell uname -m | sed s/i.86/i86/)
- ifeq ($(ARCH),i86)
- OPTS=-DMODULE -D__KERNEL__ -Wall -Wstrict-prototypes -O2 \
- -fomit-frame-pointer -I$(KDIR) -I/usr/src/linux-2.4/include \
- -I/usr/src/linux/include
- else
- OPTS=-DMODULE -D__KERNEL__ -Wall -Wstrict-prototypes -O2 \
- -fomit-frame-pointer -pipe -I/usr/src/linux/include -ffixed-8
- endif
- ifeq "$(findstring install, $(MAKECMDGOALS))" "install"
- OPTS+=-DMODVERSIONS
- endif
- ifeq "$(findstring SMP, $(shell uname -a))" "SMP"
- OPTS+=-D__SMP__
- endif
- all: module
- installmod: install
- install: module
- mkdir -p /lib/modules/$(shell uname -r)/kernel/drivers/usb/serial/
- cp -f ./mxu1100_24.o /lib/modules/$(shell uname -r)/kernel/drivers/usb/serial
- depmod -a
- clean :
- rm -f *.o
- rm -f /lib/modules/$(shell uname -r)/kernel/drivers/usb/serial/mxu1100_24.o
- module : mxu1100_24.c
- $(CC) $(OPTS) mxu1100_24.c
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement