source: freewrt/package/libusb/Makefile@ a12b53f

freewrt_1_0 freewrt_2_0
Last change on this file since a12b53f was d419478, checked in by Thorsten Glaser <tg@…>, 19 years ago
  • whitespace cleanup, while here
  • move WRKDIR and DISTFILES definition into PKG_template
  • define WRKDIR via parent BUILD_DIR instead of going up from WRKSRC
  • use a sub-directory as WRKDIR, like BSD
  • rename PKG_BUILD_DIR into WRKBUILD
  • define WRKBUILD relative via WRKDIR
  • rename PKG_INSTALL_DIR into WRKINST
  • fix a few dependencies
  • make use of common cases in the definition of WRKBUILD and WRKINST, removing many redundant lines
  • use WRKDIR instead of BUILD_DIR in places where the latter was used previously
  • while here, remove PKG_CAT stuff

this only affects packages, for now

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

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