1 #############################################################
5 #############################################################
6 PCIUTILS_VERSION
:=2.2.10
7 PCIUTILS_VERSION
:=3.0.3
8 PCIUTILS_SOURCE
:=pciutils-
$(PCIUTILS_VERSION
).
tar.gz
10 PCIUTILS_SITE
:=ftp
://atrey.karlin.mff.cuni.cz
/pub
/linux
/pci
11 PCIUTILS_DIR
:=$(BUILD_DIR
)/pciutils-
$(PCIUTILS_VERSION
)
14 PCIIDS_SITE
:=http
://pciids.sourceforge.net
/
15 PCIIDS_SOURCE
:=pci.ids.bz2
18 ifeq ($(BR2_PACKAGE_ZLIB
),y
)
19 PCIUTILS_HAVE_ZLIB
=yes
20 PCIIDS_FILE
=pci.ids.gz
21 PCIIDS_COMPRESSOR
=gzip
-9 -c
28 ifeq ($(BR2_ENABLE_SHARED
),y
)
31 LIB_PCI_ABIVERSION
=.
$(word 1,$(subst .
, ,$(PCIUTILS_VERSION
)))
36 $(DL_DIR
)/$(PCIUTILS_SOURCE
):
37 $(WGET
) -P
$(DL_DIR
) $(PCIUTILS_SITE
)/$(PCIUTILS_SOURCE
)
39 $(DL_DIR
)/$(PCIIDS_SOURCE
):
40 $(WGET
) -P
$(DL_DIR
) $(PCIIDS_SITE
)/$(PCIIDS_SOURCE
)
42 $(PCIUTILS_DIR
)/.unpacked
: $(DL_DIR
)/$(PCIUTILS_SOURCE
) $(DL_DIR
)/$(PCIIDS_SOURCE
)
43 $(PCIUTILS_CAT
) $(DL_DIR
)/$(PCIUTILS_SOURCE
) |
tar -C
$(BUILD_DIR
) $(TAR_OPTIONS
) -
44 $(PCIIDS_CAT
) $(DL_DIR
)/$(PCIIDS_SOURCE
) |
$(PCIIDS_COMPRESSOR
) > $(PCIUTILS_DIR
)/$(PCIIDS_FILE
)
45 toolchain
/patch-kernel.sh
$(PCIUTILS_DIR
) package
/pciutils pciutils-
$(PCIUTILS_VERSION
)\
*.patch
46 #$(CONFIG_UPDATE) $(@D)
47 $(SED
) 's/uname -s/echo Linux/' \
48 -e
's/uname -r/echo $(LINUX_HEADERS_VERSION)/' \
49 -e
's/uname -m/echo $(KERNEL_ARCH)/' \
50 $(PCIUTILS_DIR
)/lib
/configure
53 $(PCIUTILS_DIR
)/.compiled
: $(PCIUTILS_DIR
)/.unpacked
$(if
$(BR2_PACKAGE_ZLIB
),zlib
)
54 $(MAKE
) -C
$(PCIUTILS_DIR
) clean
55 $(MAKE
) CC
="$(TARGET_CC)" OPT
="$(TARGET_CFLAGS)" -C
$(PCIUTILS_DIR
) \
56 SHAREDIR
="/usr/share/misc" \
57 ZLIB
=$(PCIUTILS_HAVE_ZLIB
) \
58 SHARED
=$(PCIUTILS_HAVE_SO
) \
62 $(PCIUTILS_DIR
)/lib
/libpci.a
: $(PCIUTILS_DIR
)/.unpacked
$(if
$(BR2_PACKAGE_ZLIB
),zlib
)
63 $(MAKE
) -C
$(PCIUTILS_DIR
) clean
64 $(MAKE
) CC
="$(TARGET_CC)" OPT
="$(TARGET_CFLAGS)" -C
$(PCIUTILS_DIR
) \
65 SHAREDIR
="/usr/share/misc" \
66 ZLIB
=$(PCIUTILS_HAVE_ZLIB
) \
71 $(TARGET_DIR
)/usr
/lib
/libpci.a
: $(PCIUTILS_DIR
)/lib
/libpci.a
72 $(INSTALL
) -D
-m0644
$< $@
73 $(INSTALL
) -d
$(TARGET_DIR
)/usr
/include/pci
74 $(INSTALL
) -m0644
$(addprefix $(PCIUTILS_DIR
)/lib
/,config.h header.h pci.h types.h
) $(TARGET_DIR
)/usr
/include/pci
/
77 $(TARGET_DIR
)/sbin
/lspci
: $(PCIUTILS_DIR
)/.compiled
78 $(INSTALL
) -D
-m0755
$(PCIUTILS_DIR
)/lspci
$(TARGET_DIR
)/sbin
/lspci
79 ifeq ($(BR2_ENABLE_SHARED
),y
)
80 $(INSTALL
) -D
-m0755
$(PCIUTILS_DIR
)/lib
/$(LIB_PCI
).
$(PCIUTILS_VERSION
) $(TARGET_DIR
)/usr
/lib
/$(LIB_PCI
).
$(PCIUTILS_VERSION
)
81 ln
-sf
$(LIB_PCI
).
$(PCIUTILS_VERSION
) $(TARGET_DIR
)/usr
/lib
/$(LIB_PCI
)$(LIB_PCI_ABIVERSION
)
82 $(STRIPCMD
) $(STRIP_STRIP_UNNEEDED
) $(TARGET_DIR
)/usr
/lib
/$(LIB_PCI
).
$(PCIUTILS_VERSION
)
84 $(STRIPCMD
) $(STRIP_STRIP_ALL
) $@
86 $(TARGET_DIR
)/sbin
/setpci
: $(PCIUTILS_DIR
)/.compiled
87 $(INSTALL
) -D
-m0755
$(PCIUTILS_DIR
)/setpci
$(TARGET_DIR
)/sbin
/setpci
88 $(STRIPCMD
) $(STRIP_STRIP_ALL
) $@
90 $(TARGET_DIR
)/usr
/share
/misc
/$(PCIIDS_FILE
): $(PCIUTILS_DIR
)/.unpacked
91 $(INSTALL
) -D
$(PCIUTILS_DIR
)/$(PCIIDS_FILE
) $@
93 pciutils
: $(TARGET_DIR
)/sbin
/setpci
$(TARGET_DIR
)/sbin
/lspci
$(TARGET_DIR
)/usr
/share
/misc
/$(PCIIDS_FILE
)
94 pciutils-headers
: $(TARGET_DIR
)/usr
/lib
/libpci.a
96 pciutils-source
: $(DL_DIR
)/$(PCIUTILS_SOURCE
) $(DL_DIR
)/$(PCIIDS_SOURCE
)
99 -$(MAKE
) -C
$(PCIUTILS_DIR
) clean
100 rm -f
$(TARGET_DIR
)/sbin
/lspci
$(TARGET_DIR
)/sbin
/setpci \
101 $(TARGET_DIR
)/usr
/share
/misc
/pci.ids
* \
102 $(TARGET_DIR
)/usr
/lib
/$(LIB_PCI
)*
105 rm -rf
$(PCIUTILS_DIR
)
107 #############################################################
109 # Toplevel Makefile options
111 #############################################################
112 ifeq ($(BR2_PACKAGE_PCIUTILS
)$(BR2_HAVE_INCLUDES
),yy
)
113 TARGETS
+=pciutils-headers
115 ifeq ($(BR2_PACKAGE_PCIUTILS
),y
)