3 include $(TOPDIR
)/rules.mk
8 PKG_MD5SUM
:=c6062b29acd2cef414bcc34e0decbdd1
10 PKG_SOURCE_URL
:=@SF
/libusb
11 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
14 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
16 PKG_IPK
:=$(PACKAGE_DIR
)/$(PKG_NAME
)_
$(PKG_VERSION
)-$(PKG_RELEASE
)_
$(ARCH
).ipk
17 PKG_IPK_DIR
:=$(PKG_BUILD_DIR
)/ipkg
/$(PKG_NAME
)
18 PKG_INFO
:=$(IPKG_STATE_DIR
)/info/$(PKG_NAME
).list
20 $(DL_DIR
)/$(PKG_SOURCE
):
21 $(SCRIPT_DIR
)/download.pl
$(DL_DIR
) $(PKG_SOURCE
) $(PKG_MD5SUM
) $(PKG_SOURCE_URL
)
23 $(PKG_BUILD_DIR
)/.prepared
: $(DL_DIR
)/$(PKG_SOURCE
)
24 $(PKG_CAT
) $(DL_DIR
)/$(PKG_SOURCE
) |
tar -C
$(BUILD_DIR
) $(TAR_OPTIONS
) -
25 $(PATCH
) $(PKG_BUILD_DIR
) .
/patches
26 touch
$(PKG_BUILD_DIR
)/.prepared
28 $(PKG_BUILD_DIR
)/.configured
: $(PKG_BUILD_DIR
)/.prepared
29 (cd
$(PKG_BUILD_DIR
); rm -rf config.cache config.status
; \
30 $(TARGET_CONFIGURE_OPTS
) \
31 CFLAGS
="$(TARGET_CFLAGS)" \
32 CPPFLAGS
="-I$(STAGING_DIR)/usr/include" \
33 LDFLAGS
="-L$(STAGING_DIR)/usr/lib" \
34 ac_cv_c_bigendian
=no \
36 --target
=$(GNU_TARGET_NAME
) \
37 --host
=$(GNU_TARGET_NAME
) \
38 --build
=$(GNU_HOST_NAME
) \
44 --datadir=/usr
/share \
45 --includedir=/usr
/include \
46 --infodir=/usr
/share
/info \
48 --libexecdir
=/usr
/lib \
49 --localstatedir
=/var \
50 --mandir=/usr
/share
/man \
54 $(DISABLE_LARGEFILE
) \
58 touch
$(PKG_BUILD_DIR
)/.configured
60 $(PKG_BUILD_DIR
)/.libs
/libusb.so
: $(PKG_BUILD_DIR
)/.configured
61 $(MAKE
) -C
$(PKG_BUILD_DIR
) -j1 \
62 CC
=$(TARGET_CC
) LD
=$(TARGET_CROSS
)ld ARCH
=$(ARCH
) \
64 $(STAGING_DIR
)/usr
/lib
/libusb.so
: $(PKG_BUILD_DIR
)/.libs
/libusb.so
65 mkdir
-p
$(STAGING_DIR
)/usr
/lib
66 mkdir
-p
$(STAGING_DIR
)/usr
/include
67 cp
-a
$(PKG_BUILD_DIR
)/.libs
/*.so
* $(STAGING_DIR
)/usr
/lib
/
68 cp
-a
$(PKG_BUILD_DIR
)/usb.h
$(STAGING_DIR
)/usr
/include/
70 $(PKG_IPK
): $(STAGING_DIR
)/usr
/lib
/libusb.so
71 $(SCRIPT_DIR
)/make-ipkg-dir.sh
$(PKG_IPK_DIR
) $(PKG_NAME
).control
$(PKG_VERSION
)-$(PKG_RELEASE
) $(ARCH
)
72 mkdir
-p
$(PKG_IPK_DIR
)/usr
/lib
73 cp
-a
$(PKG_BUILD_DIR
)/.libs
/libusb
*.so
* $(PKG_IPK_DIR
)/usr
/lib
/
74 $(STRIP
) $(PKG_IPK_DIR
)/usr
/lib
/*
75 mkdir
-p
$(PACKAGE_DIR
)
76 $(IPKG_BUILD
) $(PKG_IPK_DIR
) $(PACKAGE_DIR
)
78 $(PKG_INFO
): $(PKG_IPK
)
79 $(IPKG
) install $(PKG_IPK
)
81 source
: $(DL_DIR
)/$(PKG_SOURCE
)
82 prepare
: $(PKG_BUILD_DIR
)/.prepared
83 compile
: $(PKG_IPK
) $(STAGING_DIR
)/usr
/lib
/libusb.so
87 rm -f
$(STAGING_DIR
)/usr
/lib
/libusb
*
88 rm -f
$(STAGING_DIR
)/usr
/include/usb.h
89 rm -rf
$(PKG_BUILD_DIR
) $(PKG_IPK
)