unfs3: add support for compiling with the external librpc
[openwrt/svn-archive/archive.git] / net / rrs / 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
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=rrs
11 PKG_VERSION:=1.70
12 PKG_RELEASE:=2
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://www.cycom.se/uploads/36/19
16 PKG_MD5SUM:=b400d03c0e39e3e78a7327ba78f789f0
17
18 include $(INCLUDE_DIR)/package.mk
19
20 define Package/rrs/Default
21 SECTION:=net
22 CATEGORY:=Network
23 DEPENDS:=+uclibcxx
24 TITLE:=A reverse (connecting) remote shell
25 URL:=http://www.cycom.se/dl/rrs/
26 endef
27
28 define Package/rrs
29 $(call Package/rrs/Default)
30 SECTION:=net
31 CATEGORY:=Network
32 DEPENDS+= +libopenssl
33 TITLE+= (with SSL support)
34 URL:=http://www.cycom.se/dl/rrs/
35 endef
36
37 define Package/rrs-nossl
38 $(call Package/rrs/Default)
39 SECTION:=net
40 CATEGORY:=Network
41 TITLE+= (without SSL support)
42 endef
43
44
45 define Build/Template
46
47 $(STAMP_BUILT)-$(2): $(STAMP_PREPARED)
48 $(MAKE) -C $(PKG_BUILD_DIR) \
49 CC="$(TARGET_CC)" \
50 CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -I$(STAGING_DIR)/usr/include/uClibc++ -fno-builtin -fno-rtti -nostdinc++" \
51 LDFLAGS="$(TARGET_LDFLAGS) -nodefaultlibs $(4) -luClibc++ -lm -lutil" \
52 LDFLAGSNOSSL="$(TARGET_LDFLAGS) -nodefaultlibs $(4) -luClibc++ -lm -lutil" \
53 $(3)
54 ( cd $(PKG_BUILD_DIR); mv -f rrs rrs-$(2); )
55 touch $$@
56
57 $(STAMP_BUILT): $(STAMP_BUILT)-$(2)
58
59 define Package/$(1)/install
60 $(INSTALL_DIR) $$(1)/usr/bin
61 $(INSTALL_BIN) $(PKG_BUILD_DIR)/rrs-$(2) $$(1)/usr/bin/rrs
62 endef
63
64 endef
65
66
67 define Build/Configure
68 endef
69
70 define Build/Compile
71 endef
72
73 ifneq ($(SDK)$(CONFIG_PACKAGE_rrs),)
74 define Build/with-ssl
75 $(call Build/Template,rrs,with-ssl,generic,-lcrypto -lssl)
76 endef
77 endif
78 $(eval $(Build/with-ssl))
79
80 ifneq ($(SDK)$(CONFIG_PACKAGE_rrs-nossl),)
81 define Build/without-ssl
82 $(call Build/Template,rrs-nossl,without-ssl,generic-nossl,)
83 endef
84 endif
85 $(eval $(Build/without-ssl))
86
87
88 $(eval $(call BuildPackage,rrs))
89 $(eval $(call BuildPackage,rrs-nossl))