2006-01-23 20:49:38 +01:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# libcgi
|
|
|
|
#
|
|
|
|
#############################################################
|
|
|
|
LIBCGI_VERSION:=1.0
|
|
|
|
LIBCGI_SOURCE:=libcgi-$(LIBCGI_VERSION).tar.gz
|
|
|
|
LIBCGI_SITE:=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/libcgi
|
|
|
|
LIBCGI_DIR:=$(BUILD_DIR)/libcgi-$(LIBCGI_VERSION)
|
|
|
|
LIBCGI_LIBRARY:=libcgi
|
|
|
|
LIBCGI_TARGET_LIBRARY:=usr/bin/libcgi
|
|
|
|
|
|
|
|
$(DL_DIR)/$(LIBCGI_SOURCE):
|
|
|
|
$(WGET) -P $(DL_DIR) $(LIBCGI_SITE)/$(LIBCGI_SOURCE)
|
|
|
|
|
|
|
|
$(LIBCGI_DIR)/.source: $(DL_DIR)/$(LIBCGI_SOURCE)
|
2006-10-01 17:17:52 +02:00
|
|
|
$(ZCAT) $(DL_DIR)/$(LIBCGI_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
|
2006-12-12 14:16:31 +01:00
|
|
|
toolchain/patch-kernel.sh $(LIBCGI_DIR) package/libcgi/ libcgi\*.patch
|
2006-01-23 20:49:38 +01:00
|
|
|
touch $(LIBCGI_DIR)/.source
|
|
|
|
|
|
|
|
$(LIBCGI_DIR)/.configured: $(LIBCGI_DIR)/.source
|
|
|
|
(cd $(LIBCGI_DIR); \
|
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
|
|
|
CFLAGS="$(TARGET_CFLAGS)" \
|
2007-03-13 23:59:59 +01:00
|
|
|
LDFLAGS="$(TARGET_LDFLAGS)" \
|
2006-01-23 20:49:38 +01:00
|
|
|
./configure \
|
|
|
|
--target=$(GNU_TARGET_NAME) \
|
|
|
|
--host=$(GNU_TARGET_NAME) \
|
|
|
|
--build=$(GNU_HOST_NAME) \
|
2007-01-14 04:52:21 +01:00
|
|
|
--prefix=/usr \
|
|
|
|
--exec-prefix=/usr \
|
|
|
|
--bindir=/usr/bin \
|
|
|
|
--sbindir=/usr/sbin \
|
|
|
|
--libdir=/lib \
|
|
|
|
--libexecdir=/usr/lib \
|
2006-01-23 20:49:38 +01:00
|
|
|
--sysconfdir=/etc \
|
2007-01-14 04:52:21 +01:00
|
|
|
--datadir=/usr/share \
|
|
|
|
--localstatedir=/var \
|
|
|
|
--includedir=/include \
|
|
|
|
--mandir=/usr/man \
|
|
|
|
--infodir=/usr/info \
|
2006-01-23 20:49:38 +01:00
|
|
|
);
|
|
|
|
touch $(LIBCGI_DIR)/.configured;
|
|
|
|
|
|
|
|
$(LIBCGI_DIR)/$(LIBCGI_LIBRARY): $(LIBCGI_DIR)/.configured
|
|
|
|
$(MAKE) CC=$(TARGET_CC) -C $(LIBCGI_DIR)
|
|
|
|
|
2006-12-12 14:16:31 +01:00
|
|
|
$(STAGING_DIR)/lib/libcgi.so: $(LIBCGI_DIR)/$(LIBCGI_LIBRARY)
|
2007-01-14 04:52:21 +01:00
|
|
|
$(MAKE) DESTDIR=$(STAGING_DIR) -C $(LIBCGI_DIR) install
|
2006-12-12 14:16:31 +01:00
|
|
|
touch -c $(STAGING_DIR)/lib/libcgi.so
|
|
|
|
|
|
|
|
$(TARGET_DIR)/$(LIBCGI_TARGET_LIBRARY): $(STAGING_DIR)/lib/libcgi.so
|
|
|
|
cp -dpf $(STAGING_DIR)/lib/libcgi.so* $(TARGET_DIR)/usr/lib/
|
2006-01-23 20:49:38 +01:00
|
|
|
|
|
|
|
libcgi: uclibc $(TARGET_DIR)/$(LIBCGI_TARGET_LIBRARY)
|
|
|
|
|
|
|
|
libcgi-source: $(DL_DIR)/$(LIBCGI_SOURCE)
|
|
|
|
|
|
|
|
libcgi-clean:
|
2006-12-12 14:16:31 +01:00
|
|
|
rm $(TARGET_DIR)/usr/lib/libcgi.so*
|
2006-01-23 20:49:38 +01:00
|
|
|
-$(MAKE) -C $(LIBCGI_DIR) clean
|
|
|
|
|
|
|
|
libcgi-dirclean:
|
|
|
|
rm -rf $(LIBCGI_DIR)
|
|
|
|
|
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# Toplevel Makefile options
|
|
|
|
#
|
|
|
|
#############################################################
|
|
|
|
ifeq ($(strip $(BR2_PACKAGE_LIBCGI)),y)
|
2006-12-12 14:16:31 +01:00
|
|
|
TARGETS+=libcgi
|
2006-01-23 20:49:38 +01:00
|
|
|
endif
|
|
|
|
|