fcgi: replace cflags based uclibc++ hacks with using the g++-uc wrapper - fixes false...
[openwrt/svn-archive/archive.git] / libs / fcgi / Makefile
1 #
2 # Copyright (C) 2007-2011 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:=fcgi
11 PKG_VERSION:=2.4.0
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://www.fastcgi.com/dist/
16 PKG_MD5SUM:=d15060a813b91383a9f3c66faf84867e
17
18 PKG_FIXUP:=libtool-ucxx
19
20 PKG_INSTALL:=1
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/fcgi/Default
25 SECTION:=libs
26 CATEGORY:=Libraries
27 URL:=http://www.fastcgi.com/
28 endef
29
30 define Package/fcgi
31 $(call Package/fcgi/Default)
32 MENU:=1
33 DEPENDS:= +libpthread
34 TITLE:=Shared library of FastCGI
35 endef
36
37 define Package/fcgixx
38 $(call Package/fcgi/Default)
39 DEPENDS:=fcgi +uclibcxx
40 TITLE:=Shared library of FastCGI++
41 endef
42
43 define Package/fcgi/description
44 FastCGI is a language independent, scalable, open extension to
45 CGI that provides high performance without the limitations of
46 server specific APIs.
47 endef
48
49 TARGET_CXX=g++-uc
50 TARGET_CFLAGS += $(FPIC)
51
52 CONFIGURE_ARGS += \
53 --enable-shared \
54 --enable-static \
55
56 CONFIGURE_VARS += \
57 LIBS="-lm" \
58
59 define Build/InstallDev
60 $(INSTALL_DIR) $(1)/usr/include
61 $(CP) $(PKG_INSTALL_DIR)/usr/include/fastcgi.h $(1)/usr/include/
62 $(CP) $(PKG_INSTALL_DIR)/usr/include/fcgi{app,_config,misc,o,os,_stdio}.h $(1)/usr/include/
63 $(INSTALL_DIR) $(1)/usr/lib
64 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfcgi{,++}.{a,so*} $(1)/usr/lib/
65 endef
66
67 define Package/fcgi/install
68 $(INSTALL_DIR) $(1)/usr/bin
69 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/cgi-fcgi $(1)/usr/bin/
70 $(INSTALL_DIR) $(1)/usr/lib
71 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfcgi.so.* $(1)/usr/lib/
72 endef
73
74 define Package/fcgixx/install
75 $(INSTALL_DIR) $(1)/usr/lib
76 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfcgi++.so.* $(1)/usr/lib/
77 endef
78
79 $(eval $(call BuildPackage,fcgi))
80 $(eval $(call BuildPackage,fcgixx))