remove the need for C99 math (closes: #1579)
[openwrt/svn-archive/archive.git] / ipv6 / dibbler / Makefile
1 #
2 # Copyright (C) 2006 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
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=dibbler
12 PKG_VERSION:=0.5.0
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-src.tar.gz
16 PKG_SOURCE_URL:=http://klub.com.pl/dhcpv6/dibbler
17 PKG_MD5SUM:=26a0e37512be7641a2deb0dc5b00e582
18 PKG_CAT:=zcat
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/dibbler/Default
25 SECTION:=ipv6
26 CATEGORY:=IPv6
27 DEPENDS:=+uclibcxx
28 TITLE:=Dibbler, a portable DHCPv6 implementation
29 URL:=http://klub.com.pl/dhcpv6/
30 endef
31
32 define Package/dibbler-client
33 $(call Package/dibbler/Default)
34 TITLE+= (client)
35 endef
36
37 define Package/dibbler-relay
38 $(call Package/dibbler/Default)
39 TITLE+= (relay)
40 endef
41
42 define Package/dibbler-server
43 $(call Package/dibbler/Default)
44 TITLE+= (server)
45 endef
46
47 define Build/Configure
48 (cd $(PKG_BUILD_DIR)/poslib; \
49 $(TARGET_CONFIGURE_OPTS) \
50 CFLAGS="$(TARGET_CFLAGS)" \
51 CPPFLAGS="$(EXTRA_CPPFLAGS)" \
52 LDFLAGS="$(EXTRA_LDFLAGS)" \
53 ./configure \
54 --target=$(GNU_TARGET_NAME) \
55 --host=$(GNU_TARGET_NAME) \
56 --build=$(GNU_HOST_NAME) \
57 --program-prefix="" \
58 --program-suffix="" \
59 --prefix=/usr \
60 --exec-prefix=/usr \
61 --bindir=/usr/bin \
62 --datadir=/usr/share \
63 --includedir=/usr/include \
64 --infodir=/usr/share/info \
65 --libdir=/usr/lib \
66 --libexecdir=/usr/lib \
67 --localstatedir=/var \
68 --mandir=/usr/share/man \
69 --sbindir=/usr/sbin \
70 --sysconfdir=/etc \
71 $(DISABLE_NLS) \
72 $(DISABLE_LARGEFILE) \
73 );
74 endef
75
76 CXX_LIBS:= -nodefaultlibs -Wl,-Bdynamic,-luClibc++,-Bstatic,-lstdc++,-Bdynamic,-lm,-lc,-lgcc
77 define Build/Compile
78 $(MAKE) -C $(PKG_BUILD_DIR) \
79 $(TARGET_CONFIGURE_OPTS) \
80 PORT_CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CPPFLAGS) -fno-builtin -fno-rtti" \
81 PORT_LDFLAGS="$(EXTRA_LDFLAGS)" \
82 DEBUGINFO= \
83 CLNT_LIBS="$(CXX_LIBS)" \
84 SRV_LIBS="$(CXX_LIBS)" \
85 server client relay
86 endef
87
88 define Package/dibbler-client/install
89 $(INSTALL_DIR) $(1)/usr/sbin
90 $(INSTALL_BIN) $(PKG_BUILD_DIR)/dibbler-client $(1)/usr/sbin/
91 endef
92
93 define Package/dibbler-relay/install
94 $(INSTALL_DIR) $(1)/usr/sbin
95 $(INSTALL_BIN) $(PKG_BUILD_DIR)/dibbler-relay $(1)/usr/sbin/
96 endef
97
98 define Package/dibbler-server/install
99 $(INSTALL_DIR) $(1)/usr/sbin
100 $(INSTALL_BIN) $(PKG_BUILD_DIR)/dibbler-server $(1)/usr/sbin/
101 endef
102
103 $(eval $(call BuildPackage,dibbler-client))
104 $(eval $(call BuildPackage,dibbler-relay))
105 $(eval $(call BuildPackage,dibbler-server))