source: packages/utils/gadgetfs-test/Makefile @ 9630

Last change on this file since 9630 was 9630, checked in by juhosg, 8 years ago

[packages] utils/gadgetfs-test: fix PKG_BUILD_DIR

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.5 KB
Line 
1#
2# Copyright (C) 2007 OpenWrt.org
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6#
7# $Id$
8
9include $(TOPDIR)/rules.mk
10
11PKG_NAME:=gadgetfs-test
12PKG_VERSION:=2007-11-29
13PKG_RELEASE:=1
14
15PKG_SOURCE:=$(PKG_NAME).tar.bz2
16PKG_SOURCE_URL:=http://avr32linux.org/twiki/pub/Main/GadgetFsTest
17PKG_MD5SUM:=49476a74c29f1281c8a4c035aa57a5bd
18
19PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
20PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
21
22include $(INCLUDE_DIR)/package.mk
23
24define Package/gadgetfs-test
25  SECTION:=utils
26  CATEGORY:=Utilities
27  TITLE:=Test program for gadgetfs
28  DEPENDS:=@DEVEL +libpthread
29  URL:=http://linux-usb.org/gadget
30endef
31
32define Package/gadgetfs-test/description
33 Test program for gadgetfs from linux-usb.org.
34endef
35
36define Package/gadgetfs-test-bulk
37$(call Package/gadgetfs-test)
38  TITLE+= (BULK transfer)
39endef
40
41define Package/gadgetfs-test-bulk/description
42$(call Package/gadgetfs-test/description)
43 This package is built with BULK transfer support.
44endef
45
46define Package/gadgetfs-test-isoc
47$(call Package/gadgetfs-test)
48  DEPENDS+= +libaio
49  TITLE+= (ISOCHRONOUS transfer)
50endef
51
52define Package/gadgetfs-test-isoc/description
53$(call Package/gadgetfs-test/description)
54 This package is built with ISOCHRONOUS transfer support using libaio.
55endef
56
57
58GADGETFS_CFLAGS:=$(TARGET_CFLAGS) $(EXTRA_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)
59GADGETFS_LDFLAGS:=$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS)
60GADGETFS_LIBS:=-lpthread
61
62define Build/Template
63
64$(STAMP_BUILT)-$(1): $(STAMP_PREPARED)
65        -$(MAKE) -C $(PKG_BUILD_DIR) clean
66        $(MAKE_VARS) \
67        $(MAKE) -C $(PKG_BUILD_DIR) \
68                $(TARGET_CONFIGURE_OPTS) \
69                CC="$(TARGET_CC)" \
70                LDFLAGS="$(GADGETFS_LDFLAGS)" \
71                $(2) \
72                all
73        mv -f $(PKG_BUILD_DIR)/gadgetfs-test $(PKG_BUILD_DIR)/gadgetfs-test-$(1)
74        touch $$@
75
76$(STAMP_BUILT): $(STAMP_BUILT)-$(1)
77
78define Package/gadgetfs-test-$(1)/install
79        $(INSTALL_DIR) $$(1)/usr/sbin
80        $(INSTALL_BIN) $$(PKG_BUILD_DIR)/gadgetfs-test-$(1) $$(1)/usr/sbin/
81endef
82
83endef
84
85define Build/Configure
86endef
87
88define Build/Compile
89endef
90
91ifneq ($(SDK)$(CONFIG_PACKAGE_gadgetfs-test-bulk),)
92  define Build/bulk
93    $(call Build/Template,bulk, \
94                CFLAGS="$(GADGETFS_CFLAGS)" \
95                LIBS="$(GADGETFS_LIBS)" \
96    )
97  endef
98endif
99$(eval $(Build/bulk))
100
101ifneq ($(SDK)$(CONFIG_PACKAGE_gadgetfs-test-isoc),)
102  define Build/isoc
103    $(call Build/Template,isoc, \
104                CFLAGS="$(GADGETFS_CFLAGS) -DAIO" \
105                LIBS="$(GADGETFS_LIBS) -laio" \
106    )
107  endef
108endif
109$(eval $(Build/isoc))
110
111$(eval $(call BuildPackage,gadgetfs-test-bulk))
112$(eval $(call BuildPackage,gadgetfs-test-isoc))
113
Note: See TracBrowser for help on using the repository browser.