c8f341132b8e39ea4692a14148d4d21e299d54e2
[packages.git] / ipv6 / tunslip6 / Makefile
1 #
2 # Copyright (C) 2012 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # This Makefile is a skeleton
8 #
9
10 include $(TOPDIR)/rules.mk
11
12 PKG_NAME:=contiki
13 PKG_VERSION:=2.5
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).zip
16 PKG_SOURCE_URL:=http://downloads.sourceforge.net/project/contiki/Contiki/Contiki%20$(PKG_VERSION)/
17 PKG_MD5SUM:=e2dbc5a42a899177d20d285c13bb3702
18
19 #PKG_BUILD_DIR:=$(BUILD_DIR)/tools
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/tunslip6
25   SECTION:=ipv6
26   CATEGORY:=IPv6
27   DEPENDS:=+kmod-slip
28   TITLE:=tunslip6 from Contiki OS
29   URL:=http://www.contiki-os.org/
30 endef
31
32 define Package/tun6slip/description
33   SLIP utility tool for connecting to Contiki 6LoWPAN devices.
34 endef
35
36 define Build/Compile
37         # pass CFLAGS again to override -O2 set by configure
38         $(MAKE) -C $(PKG_BUILD_DIR)/tools \
39                 CROSS_COMPILE="$(KERNEL_CROSS)" \
40                 ARCH="$(LINUX_KARCH)" \
41                 KERNELDIR=$(LINUX_DIR) \
42                 CC="$(TARGET_CC)" \
43                 CFLAGS="$(TARGET_CFLAGS)" \
44                 tunslip6
45 endef
46
47 define Package/tunslip6/install
48         $(INSTALL_DIR) $(1)/usr/sbin
49         $(CP) $(PKG_BUILD_DIR)/tools/tunslip6 $(1)/usr/sbin/
50 endef
51
52 $(eval $(call BuildPackage,tunslip6))