+2004-05-29 Martin Mares <mj@ucw.cz>
+
+ * Makefile, lib/configure: Cross-compilation support, patch by Maciej.
+
2004-05-28 Martin Mares <mj@ucw.cz>
* Released as 2.1.99-test4.
endif
endif
+HOST=
+RELEASE=
+
export
all: $(PCILIB) lspci setpci lspci.8 setpci.8 update-pciids update-pciids.8 pci.ids
force:
lib/config.h:
- cd lib && ./configure $(SHAREDIR) $(VERSION)
+ cd lib && ./configure $(SHAREDIR) $(VERSION) $(HOST) $(RELEASE)
lspci: lspci.o common.o $(PCILIB)
setpci: setpci.o common.o $(PCILIB)
This package contains the PCI Utilities, version @VERSION@.
-Copyright (c) 1997--2003 Martin Mares <mj@ucw.cz>
+Copyright (c) 1997--2004 Martin Mares <mj@ucw.cz>
All files in this package can be freely distributed and used according
to the terms of the GNU General Public License, either version 2 or
o pcimodules and possibly other Linux module related stuff
o New ID's from the pciids project
- o Cross-compilation support
############################################################################
else
cpu=`uname -m | sed 's/^i.86$/i386/;s/^sun4u$/sparc64/;s/^i86pc$/i386/'`
fi
-echo " $sys/$cpu $rel"
+host=${3:-$cpu-$sys}
+host=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)$/\1--\2/' | tr 'A-Z' 'a-z'`
+cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+sys=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+rel=${4:-$rel}
+echo " $host $rel"
c=config.h
echo >$c "#define ARCH_`echo $cpu | tr 'a-z' 'A-Z'`"
echo_n "Looking for access methods..."
case $sys in
- Linux)
+ linux*)
case $rel in
2.[1-9]*|[3-9]*) echo_n "sysfs proc"
echo >>$c '#define HAVE_PM_LINUX_SYSFS'
;;
esac
;;
- SunOS)
+ sunos)
case $cpu in
i386) echo_n " i386-ports"
echo >>$c "#define HAVE_PM_INTEL_CONF"
esac
;;
- FreeBSD)
+ freebsd)
echo_n " fbsd-device"
echo >>$c '#define HAVE_PM_FBSD_DEVICE'
echo >>$c '#define PATH_FBSD_DEVICE "/dev/pci"'
ok=1
;;
- AIX)
+ aix)
echo_n " aix-device"
echo >>$c '#define HAVE_PM_AIX_DEVICE'
ok=1
;;
- NetBSD)
+ netbsd)
echo_n " nbsd-libpci"
echo >>$c '#define HAVE_PM_NBSD_LIBPCI'
echo >>$c '#define PATH_NBSD_DEVICE "/dev/pci0"'
ok=1
;;
- GNU)
+ gnu)
echo_n " i386-ports"
echo >>$c '#define HAVE_PM_INTEL_CONF'
ok=1