cbtt: add -nodefaultlibs to LFLAGS
[openwrt/svn-archive/archive.git] / net / cbtt / Makefile
1 # Copyright (C) 2006 OpenWrt.org
2 #
3 # This is free software, licensed under the GNU General Public License v2.
4 # See /LICENSE for more information.
5 #
6 # $Id$
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=cbtt
11 PKG_VERSION:=20060727
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)80-$(PKG_VERSION)-src.tar.gz
15 PKG_SOURCE_URL:=@SF/bnbtusermods
16 PKG_MD5SUM:=d6edf0a11d7e68fa3d121e91308f22f5
17
18 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)80-$(PKG_VERSION)-src
19 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define Package/cbtt
24 SECTION:=net
25 CATEGORY:=Network
26 DEPENDS:=zlib
27 MENU:=1
28 TITLE:=Bittorrent tracker
29 DEPENDS:=+libpthread +uclibcxx
30 DESCRIPTION:=a C BitTorrent Tracker
31 URL:=http://bnbtusermods.sourceforge.net
32 endef
33
34 define Package/cbtt-mysql
35 SECTION:=net
36 CATEGORY:=Network
37 DEPENDS:=cbtt +libmysqlclient
38 TITLE:=Bittorrent tracker with mysql support
39 DESCRIPTION:=Bittorrent tracker with mysql support
40 URL:=http://bnbtusermods.sourceforge.net
41 endef
42
43 MAKE_FLAGS += \
44 LFLAGS="-L$(STAGING_DIR)/usr/lib -L $(STAGING_DIR)/usr/lib/mysql -L. -lz -lmysqlclient -nodefaultlibs -lpthread -luClibc++ -lc -lm -lgcc" \
45 CFLAGS="-I$(STAGING_DIR)/usr/include -fno-builtin -fno-rtti -nostdinc++"
46
47 define Package/cbtt/install
48 $(INSTALL_DIR) $(1)/usr/bin
49 $(INSTALL_BIN) $(PKG_BUILD_DIR)/bnbt $(1)/usr/bin/
50 endef
51
52 define Package/cbtt-mysql/install
53 $(INSTALL_DIR) $(1)/usr/bin
54 $(INSTALL_BIN) $(PKG_BUILD_DIR)/bnbtmysql $(1)/usr/bin/
55 endef
56
57 $(eval $(call BuildPackage,cbtt))
58 $(eval $(call BuildPackage,cbtt-mysql))