objlink(comedi.o comedi_fops.o proc.o range.o drivers.o kvmem.o comedi_ksyms.o)
-#if CONFIG_COMEDI_RT += rt_pend_tq/rt_pend_tq.o
-#if CONFIG_COMEDI_RT += rt.o
+ifsel(CONFIG_COMEDI_RT)
+ objlink(comedi.o rt_pend_tq.o rt.o)
+endif
select(CONFIG_COMEDI comedi.o)
expsyms(mite.o 8255.o)
select(CONFIG_COMEDI_8255 8255.o)
-select(CONFIG_COMEDI_ADL_PCI9118 adl_pci9118.o)
-select(CONFIG_COMEDI_ADV_PCI1710 adv_pci1710.o)
+select(CONFIG_COMEDI_ADL_PCI9118 adl_pci9118.o amcc_s5933.o)
+select(CONFIG_COMEDI_ADV_PCI1710 adv_pci1710.o amcc_s5933.o)
select(CONFIG_COMEDI_AMPLC_PCI230 amplc_pci230.o)
select(CONFIG_COMEDI_CB_PCIDAS cb_pcidas.o)
select(CONFIG_COMEDI_CB_PCIDAS64 cb_pcidas64.o)
topdir=${PWD}
interactive=y
+menu=n
while [ "$1" != "" ];do
case $1 in
--non-interactive)
interactive=n
;;
+ --menu)
+ menu=y
+ ;;
esac
shift
done
. scripts/dep.rtlinux
-scripts/Configure ${old}
+if [ "$menu" = "y" ];then
+ make -C scripts/lxdialog all
+ if [ ! -f .config ];then
+ cp scripts/config.dist .config
+ fi
+ scripts/Menuconfig scripts/config.in
+else
+ scripts/Configure ${old}
+fi
-scripts/generate_makefile comedi/Makefile.in >comedi/Makefile
-scripts/generate_makefile comedi/drivers/Makefile.in >comedi/drivers/Makefile
-scripts/generate_makefile comedi/kcomedilib/Makefile.in >comedi/kcomedilib/Makefile
+for each in $(find . -name Makefile.in)
+do
+ scripts/generate_makefile ${each} >$(dirname $each)/$(basename $each .in)
+done
+#scripts/generate_makefile comedi/Makefile.in >comedi/Makefile
+#scripts/generate_makefile comedi/drivers/Makefile.in >comedi/drivers/Makefile
+#scripts/generate_makefile comedi/kcomedilib/Makefile.in >comedi/kcomedilib/Makefile
cat <<EOF
-Makefiles for Comedi are now be configured.
+Makefiles for Comedi are now configured.
Run 'make' to compile, and then 'make install' to install.
If Comedi has never been installed on your system,
#!/bin/sh
-default=${LINUXDIR:=/usr/src/linux}
+if [ -f /lib/modules/$(uname -r)/build/Makefile ];then
+ default="/lib/modules/$(uname -r)/build"
+else
+ default="/usr/src/linux"
+fi
+default=${LINUXDIR:=$default}
if [ "${interactive}" = "y" ];then
echo -n "Enter location of Linux source tree [$default]: "
read LINUXDIR
print "# This Makefile is autogenerated. Edit Makefile.in instead.\n";
while($_=<IN>){
- if(m/select\(([\w_]+) ([\w_.]+)\)/){
+ if(m/select\(([\w_]+) ([\w_. ]+)\)/){
print "obj-\$($1) += $2\n";
}elsif(m/expsyms\(([\w_. ]+)\)/){
print "export-objs += $1\n";
}elsif(m/objlink\(([\w_.]+) ([\w_. ]+)\)/){
- push @later,"$1: $2\n";
- push @later,"\t\$(LD) -r -o \$@ $2\n";
+ print "$1-objs += $2\n";
+ push @later,"$1";
}elsif(m/link_subdirs\(([\w_.]+)\)/){
print "subdir-m += $1\n";
+ }elsif(m/ifsel\(([\w_]+)\)/){
+ print "ifneq (\$($1),)\n";
+ }elsif(m/endif/){
+ print "endif\n";
}elsif(m/^$/){
}elsif(m/^#/){
}else{
print "\n";
print "include \$(TOPDIR)/Rules.make\n";
print "\n";
-print @later;
+
+@later = sort @later;
+
+$last="";
+foreach $s (@later){
+ if($s ne $last){
+ print "$s: \$($s-objs)\n";
+ print "\t\$(LD) -r -o \$@ \$($s-objs)\n";
+ }
+ $last=$s;
+}