[ltp] modified Makefile for ltmodem-2.6-alk-4 on Fedora Core 2
Joe Christy
linux-thinkpad@linux-thinkpad.org
Tue, 15 Jun 2004 18:24:30 -0700
Judging from the chatter on linux-thinkpad, fedora-devel, and
discuss@linmodems.org, I may not be the only one for whom the following
Makefile modifications (to enable painlessly building and installing
ltmodem on Fedora Core 2 w/o rebuilding the entire kernel) are not
completely obvious, so I thought I'd share them.
With the Makefile below, to install the ltmodem-2.6-alk stuff onto
Fedora Core 2, one need only:
1) follow the first two steps in the README within ltmodem-2.6-alk-4/
2) type make && make install within ltmodem-2.6-alk-4/
3) add the three aliases to your modprobe.conf
No need to install the kernel-sourcecode RPM (or even know that it's no
longer called kernel-source), no editing the Makefile for each new
kernel, no copying the .ko files, and no wondering where the -a flag to
modprobe disappeared.
Your mileage may vary,
Joe
===============================================
# makefile for ltmodem for 2.6 kernels
##
## Modified for FC2
## to be used with tarball from
## http://linmodems.technion.ac.il/packages/ltmodem/kernel-2.6/
## Joe Christy
## 2004-06-15
#
MODULE_NAME := ltmodem
ltmodem-objs := lt_modem.o ltmdmobj.o
ltserial-objs := serial.o
obj-m += ltmodem.o ltserial.o
EXTRA_CFLAGS += -Wall
EXTRA_LDFLAGS := -d
default:
make -C /lib/modules/`uname -r`/build SUBDIRS=`pwd` modules
$(obj)/ltmdmobj.o:
cp $(src)/ltmdmobj.o $(obj)/ltmdmobj.o
clean:
rm -f lt_modem.o ltmodem.o ltserial.ko serial.o ltserial.o
ltserial.mod.* ltmodem.mod.o ltmodem.ko ltmodem.mod.c
install:
make -C /lib/modules/`uname -r`/build SUBDIRS=`pwd` modules_install
depmod -eF /boot/System.map