2007-07-17 02:23:31 +02:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# tinyhttpd
|
|
|
|
#
|
|
|
|
#############################################################
|
|
|
|
TINYHTTPD_VER:=0.1.0
|
|
|
|
TINYHTTPD_SOURCE:=tinyhttpd-$(TINYHTTPD_VER).tar.gz
|
|
|
|
TINYHTTPD_SITE:=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/tinyhttpd/$(TINYHTTPD_SOURCE)
|
|
|
|
TINYHTTPD_DIR:=$(BUILD_DIR)/tinyhttpd-$(TINYHTTPD_VER)
|
|
|
|
TINYHTTPD_CAT:=$(ZCAT)
|
|
|
|
TINYHTTPD_BINARY:=httpd
|
|
|
|
TINYHTTPD_TARGET_BINARY:=usr/sbin/tinyhttpd
|
|
|
|
|
|
|
|
$(DL_DIR)/$(TINYHTTPD_SOURCE):
|
2009-01-16 12:42:52 +01:00
|
|
|
$(call DOWNLOAD,$(TINYHTTPD_SITE),$(TINYHTTPD_SOURCE))
|
2007-07-17 02:23:31 +02:00
|
|
|
|
|
|
|
tinyhttpd-source: $(DL_DIR)/$(TINYHTTPD_SOURCE)
|
|
|
|
|
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# build tinyhttpd for use on the target system
|
|
|
|
#
|
|
|
|
#############################################################
|
|
|
|
$(TINYHTTPD_DIR)/.unpacked: $(DL_DIR)/$(TINYHTTPD_SOURCE)
|
|
|
|
$(TINYHTTPD_CAT) $(DL_DIR)/$(TINYHTTPD_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
|
|
|
|
toolchain/patch-kernel.sh $(TINYHTTPD_DIR) package/tinyhttpd/ tinyhttpd\*.patch
|
2007-08-22 14:35:41 +02:00
|
|
|
touch $(TINYHTTPD_DIR)/.unpacked
|
2007-07-17 02:23:31 +02:00
|
|
|
|
|
|
|
$(TINYHTTPD_DIR)/$(TINYHTTPD_BINARY): $(TINYHTTPD_DIR)/.unpacked
|
|
|
|
$(TARGET_CONFIGURE_OPTS) CFLAGS="$(TARGET_CFLAGS)" LDFLAGS="$(TARGET_LDFLAGS)" $(MAKE) -C $(TINYHTTPD_DIR)
|
2008-08-04 21:07:05 +02:00
|
|
|
|
2007-07-17 02:23:31 +02:00
|
|
|
$(TARGET_DIR)/$(TINYHTTPD_TARGET_BINARY): $(TINYHTTPD_DIR)/$(TINYHTTPD_BINARY)
|
|
|
|
$(INSTALL) -m 0755 $(TINYHTTPD_DIR)/$(TINYHTTPD_BINARY) $(TARGET_DIR)/$(TINYHTTPD_TARGET_BINARY)
|
2007-10-01 18:15:31 +02:00
|
|
|
$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/$(TINYHTTPD_TARGET_BINARY)
|
2007-07-17 02:23:31 +02:00
|
|
|
$(INSTALL) -m 0755 package/tinyhttpd/S85tinyhttpd $(TARGET_DIR)/etc/init.d
|
|
|
|
mkdir -p $(TARGET_DIR)/var/www
|
|
|
|
|
2009-09-02 17:02:02 +02:00
|
|
|
tinyhttpd: $(TARGET_DIR)/$(TINYHTTPD_TARGET_BINARY)
|
2007-07-17 02:23:31 +02:00
|
|
|
|
|
|
|
tinyhttpd-clean:
|
2008-03-27 16:42:42 +01:00
|
|
|
-$(MAKE) -C $(TINYHTTPD_DIR) clean
|
2007-07-17 02:23:31 +02:00
|
|
|
@rm -f $(TARGET_DIR)/$(TINYHTTPD_TARGET_BINARY)
|
|
|
|
@rm -f $(TARGET_DIR)/etc/init.d/S85tinyhttpd
|
|
|
|
@rmdir --ignore-fail-on-non-empty $(TARGET_DIR)/var/www
|
|
|
|
|
|
|
|
tinyhttpd-dirclean:
|
|
|
|
rm -rf $(TINYHTTPD_DIR)
|
|
|
|
|
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# Toplevel Makefile options
|
|
|
|
#
|
|
|
|
#############################################################
|
2008-12-08 09:15:27 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_TINYHTTPD),y)
|
2007-07-17 02:23:31 +02:00
|
|
|
TARGETS+=tinyhttpd
|
|
|
|
endif
|