1 #############################################################
5 #############################################################
6 # Copyright (C) 2001-2003 by Erik Andersen <andersen@codepoet.org>
7 # Copyright (C) 2002 by Tim Riker <Tim@Rikers.org>
9 # This program is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU Library General Public License as
11 # published by the Free Software Foundation; either version 2 of the
12 # License, or (at your option) any later version.
14 # This program is distributed in the hope that it will be useful, but
15 # WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 # Library General Public License for more details.
19 # You should have received a copy of the GNU Library General Public
20 # License along with this program; if not, write to the Free Software
21 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
24 LIBSYSFS_VERSION
:=2.1.0
25 LIBSYSFS_DIR
:=$(BUILD_DIR
)/sysfsutils-
$(LIBSYSFS_VERSION
)
26 LIBSYSFS_SITE
:=http
://$(BR2_SOURCEFORGE_MIRROR
).dl.sourceforge.net
/sourceforge
/linux-diag
27 LIBSYSFS_SOURCE
:=sysfsutils-
$(LIBSYSFS_VERSION
).
tar.gz
30 $(DL_DIR
)/$(LIBSYSFS_SOURCE
):
31 $(WGET
) -P
$(DL_DIR
) $(LIBSYSFS_SITE
)/$(LIBSYSFS_SOURCE
)
33 libsysfs-source
: $(DL_DIR
)/$(LIBSYSFS_SOURCE
)
35 $(LIBSYSFS_DIR
)/.unpacked
: $(DL_DIR
)/$(LIBSYSFS_SOURCE
)
36 $(LIBSYSFS_CAT
) $(DL_DIR
)/$(LIBSYSFS_SOURCE
) |
tar -C
$(BUILD_DIR
) $(TAR_OPTIONS
) -
37 toolchain
/patch-kernel.sh
$(LIBSYSFS_DIR
) package
/libsysfs
/ \
*.patch
38 $(CONFIG_UPDATE
) $(@D
)
40 touch
-c
$(LIBSYSFS_DIR
)/config.h.in
43 $(LIBSYSFS_DIR
)/.configured
: $(LIBSYSFS_DIR
)/.unpacked
44 (cd
$(LIBSYSFS_DIR
); rm -rf config.cache
; \
45 $(AUTO_CONFIGURE_TARGET
) \
51 $(LIBSYSFS_DIR
)/.compiled
: $(LIBSYSFS_DIR
)/.configured
52 $(MAKE
) -C
$(LIBSYSFS_DIR
)
55 $(STAGING_DIR
)/usr
/lib
/libsysfs.so
: $(LIBSYSFS_DIR
)/.compiled
56 $(MAKE
) -C
$(LIBSYSFS_DIR
) DESTDIR
=$(STAGING_DIR
) install
57 $(SED
) "s,^libdir=.*,libdir=\'$(STAGING_DIR)/usr/lib\',g" \
58 $(STAGING_DIR
)/usr
/lib
/libsysfs.la
61 $(TARGET_DIR
)/usr
/lib
/libsysfs.so
: $(STAGING_DIR
)/usr
/lib
/libsysfs.so
62 $(INSTALL
) -d
$(TARGET_DIR
)/usr
/lib
/
63 $(INSTALL
) -m
0755 $(STAGING_DIR
)/usr
/lib
/libsysfs.so
* $(TARGET_DIR
)/usr
/lib
/
64 -$(STRIPCMD
) $(STRIP_STRIP_UNNEEDED
) $(TARGET_DIR
)/usr
/lib
/libsysfs.so
66 libsysfs
: $(TARGET_DIR
)/usr
/lib
/libsysfs.so
69 -$(MAKE
) -C
$(LIBSYSFS_DIR
) clean
70 -$(MAKE
) -C
$(LIBSYSFS_DIR
) DESTDIR
=$(STAGING_DIR
) uninstall
71 rm -f
$(TARGET_DIR
)/usr
/lib
/libsysfs.so
*
74 rm -rf
$(LIBSYSFS_DIR
)
76 #############################################################
78 # Toplevel Makefile options
80 #############################################################
81 ifeq ($(BR2_PACKAGE_LIBSYSFS
),y
)