From: David Schleef Date: Thu, 7 Aug 2003 01:02:20 +0000 (+0000) Subject: actually works now X-Git-Tag: r0_7_69~267 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b064e818465339b3943444d1f2527d40d60aad5a;p=comedi.git actually works now --- diff --git a/configure.ac b/configure.ac index 727c87c6..85621811 100644 --- a/configure.ac +++ b/configure.ac @@ -16,22 +16,21 @@ AC_SUBST(VERSION) AC_PROG_CC -LINUX="/home/ds/linux/condor-kernel-2.4.20/linux-2.4.21" +#DS_LINUX_2_4() +DS_LINUX_2_6() -LINUX_LD="ld -m elf_i386 -r -e stext" -LINUX_CFLAGS="-D__KERNEL__ -I/home/ds/linux/condor-kernel-2.4.20/linux-2.4.21/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=athlon -DMODULE" +#ERROR_CFLAGS="-Werror" -AC_SUBST(LINUX_LD) -AC_SUBST(LINUX_CFLAGS) - - -COMEDI_CFLAGS="-Werror -I\$(top_srcdir)/include/" +COMEDI_CFLAGS="$ERROR_CFLAGS -I\$(top_srcdir)/include/" AC_SUBST(COMEDI_CFLAGS) -moduledir="\$(libdir)/comedi" - +moduledir="/lib/modules/${LINUX_KERNELRELEASE}/comedi" +modulePROGRAMS_INSTALL="\$(top_srcdir)/modtool --install" AC_SUBST(moduledir) +AC_SUBST(modulePROGRAMS_INSTALL) +#DS_LINUX_CONFIG_OPTION_MODULE(CONFIG_PCMCIA) +AM_CONDITIONAL(CONFIG_PCMCIA,false) AC_OUTPUT([ Makefile diff --git a/modtool.in b/modtool.in index 643e7de2..8b86ad94 100755 --- a/modtool.in +++ b/modtool.in @@ -2,9 +2,28 @@ LINUX_LD="@LINUX_LD@" CC="@CC@" +INSTALL="@INSTALL@" +LINUX_MODULE_EXT="@LINUX_MODULE_EXT@" -echo modtool $* +#echo modtool $* -$LINUX_LD $* +mode=$1 +shift + +case $mode in +--link) + echo $LINUX_LD -r $* + $LINUX_LD -r $* + ;; +--install) + module_src=$1 + module_dest=`echo $2 | sed "s/\.ko$/${LINUX_MODULE_EXT}/"` + echo $INSTALL "$module_src" "$module_dest" + $INSTALL "$module_src" "$module_dest" + ;; +*) + echo Unknown mode $mode >&2 + exit 1 +esac