9e03bd6c337fb5dcbabecad04b5502902c84ec2b
[openwrt/svn-archive/archive.git] / utils / cwiid / Makefile
1 #
2 # Copyright (C) 2010 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=cwiid
11 PKG_VERSION:=0.6.00
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz
15 PKG_SOURCE_URL:=http://abstrakraft.org/cwiid/downloads/
16 PKG_SOURCE_VERSION:=2100f14c612471084434b364501e3818c7f4144e
17
18 include $(INCLUDE_DIR)/package.mk
19
20 define Package/cwiid/Default
21 TITLE:=Linux Nintendo Wiimote interface
22 URL:=http://abstrakraft.org/cwiid/
23 DEPENDS:= @!LINUX_2_4
24 endef
25
26 define Package/libcwiid
27 $(call Package/cwiid/Default)
28 SECTION:=libs
29 CATEGORY:=Libraries
30 TITLE+= (library)
31 DEPENDS+= +bluez-libs
32 endef
33
34 define Package/wminput
35 $(call Package/cwiid/Default)
36 SECTION:=utils
37 CATEGORY:=Utilities
38 TITLE+= (utility)
39 DEPENDS+= +libcwiid
40 endef
41
42 CONFIGURE_ARGS += \
43 --without-python \
44 --disable-ldconfig \
45 --enable-shared \
46
47 TARGET_CFLAGS += $(FPIC)
48
49 define Build/Prepare
50 $(call Build/Prepare/Default)
51 ( cd $(PKG_BUILD_DIR) ; \
52 autoconf ; \
53 )
54 endef
55
56 define Build/Compile
57 $(MAKE) -C "$(PKG_BUILD_DIR)" \
58 CC="$(TARGET_CC)" \
59 OFLAGS="$(TARGET_CFLAGS)" \
60 CPPFLAGS="$(TARGET_CPPFLAGS)" \
61 LDFLAGS="$(TARGET_LDFLAGS) -L../libcwiid/" \
62 all
63 endef
64
65 define Build/InstallDev
66 $(INSTALL_DIR) $(1)/usr/include
67 $(CP) $(PKG_BUILD_DIR)/libcwiid/*.h $(1)/usr/include/
68 $(INSTALL_DIR) $(1)/usr/lib
69 $(CP) $(PKG_BUILD_DIR)/libcwiid/*.so $(1)/usr/lib/
70 endef
71
72 define Package/libcwiid/install
73 $(INSTALL_DIR) $(1)/usr/lib
74 $(CP) $(PKG_BUILD_DIR)/libcwiid/libcwiid.so.1.0 $(1)/usr/lib/
75 endef
76
77 define Package/wminput/install
78 $(INSTALL_DIR) $(1)/usr/bin
79 $(CP) $(PKG_BUILD_DIR)/wminput/wminput $(1)/usr/bin/
80 $(CP) $(PKG_BUILD_DIR)/lswm/lswm $(1)/usr/bin/
81 endef
82
83 $(eval $(call BuildPackage,libcwiid))
84 $(eval $(call BuildPackage,wminput))