source: freewrt/package/libusb/Makefile@ c8b93bd

freewrt_1_0 freewrt_2_0
Last change on this file since c8b93bd was c8b93bd, checked in by Waldemar Brodkorb <wbx@…>, 19 years ago

major package Makefile cleanup. remove mostly-clean, add licence header, always use RSTRIP varibale for stripping, rename some init scripts, indent

git-svn-id: svn://www.freewrt.org/trunk/freewrt@600 afb5a338-a214-0410-bd46-81f09a774fd1

  • Property mode set to 100644
File size: 2.3 KB
Line 
1# $FreeWRT$
2#-
3# This file is part of the FreeWRT project. FreeWRT is copyrighted
4# material, please see the LICENCE file in the top-level directory
5# or at http://www.freewrt.org/licence for details.
6
7include $(TOPDIR)/rules.mk
8
9PKG_NAME:= libusb
10PKG_VERSION:= 0.1.10a
11PKG_RELEASE:= 1
12PKG_MD5SUM:= c6062b29acd2cef414bcc34e0decbdd1
13
14PKG_SOURCE_URL:= @SF/libusb
15PKG_SOURCE:= $(PKG_NAME)-$(PKG_VERSION).tar.gz
16
17include $(TOPDIR)/mk/package.mk
18
19$(eval $(call PKG_template,LIBUSB,libusb,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
20
21$(WRKBUILD)/.configured:
22 (cd $(WRKBUILD); rm -rf config.{cache,status} ; \
23 $(TARGET_CONFIGURE_OPTS) \
24 CFLAGS="$(TARGET_CFLAGS)" \
25 CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
26 LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
27 ac_cv_c_bigendian=no \
28 ./configure \
29 --target=$(GNU_TARGET_NAME) \
30 --host=$(GNU_TARGET_NAME) \
31 --build=$(GNU_HOST_NAME) \
32 --program-prefix="" \
33 --program-suffix="" \
34 --prefix=/usr \
35 --exec-prefix=/usr \
36 --bindir=/usr/bin \
37 --datadir=/usr/share \
38 --includedir=/usr/include \
39 --infodir=/usr/share/info \
40 --libdir=/usr/lib \
41 --libexecdir=/usr/lib \
42 --localstatedir=/var \
43 --mandir=/usr/share/man \
44 --sbindir=/usr/sbin \
45 --sysconfdir=/etc \
46 --disable-nls \
47 --enable-largefile \
48 --enable-shared \
49 --enable-static \
50 );
51 touch $@
52
53$(WRKBUILD)/.built:
54 rm -rf $(WRKINST)
55 mkdir -p $(WRKINST)
56 $(MAKE) -C $(WRKBUILD) -j1 \
57 CC=$(TARGET_CC) LD=$(TARGET_CROSS)ld ARCH=$(ARCH) \
58 DESTDIR="$(WRKINST)" \
59 all install
60 touch $@
61
62$(IPKG_LIBUSB):
63 install -m0755 -d $(IDIR_LIBUSB)/usr/lib
64 $(CP) $(WRKINST)/usr/lib/libusb*.so.* $(IDIR_LIBUSB)/usr/lib/
65 $(RSTRIP) $(IDIR_LIBUSB)
66 $(IPKG_BUILD) $(IDIR_LIBUSB) $(PACKAGE_DIR)
67
68$(STAGING_DIR)/usr/lib/libusb.so: $(WRKBUILD)/.built
69 mkdir -p $(STAGING_DIR)/usr/bin
70 $(CP) $(WRKINST)/usr/bin/libusb-config $(STAGING_DIR)/usr/bin/
71 mkdir -p $(STAGING_DIR)/usr/include
72 $(CP) $(WRKINST)/usr/include/usb.h $(STAGING_DIR)/usr/include/
73 mkdir -p $(STAGING_DIR)/usr/lib
74 $(CP) $(WRKINST)/usr/lib/libusb*.{a,so*} $(STAGING_DIR)/usr/lib/
75 touch $@
76
77install-dev: $(STAGING_DIR)/usr/lib/libusb.so
78
79uninstall-dev:
80 rm -rf \
81 $(STAGING_DIR)/usr/bin/libusb-config \
82 $(STAGING_DIR)/usr/include/usb.h \
83 $(STAGING_DIR)/usr/lib/libusb*.{a,so*} \
84
85compile-targets: install-dev
86clean-targets: uninstall-dev
Note: See TracBrowser for help on using the repository browser.