2006-09-28 12:19:43 +02:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# nbd (client only)
|
|
|
|
#
|
|
|
|
#############################################################
|
|
|
|
|
2008-06-18 17:03:07 +02:00
|
|
|
NBD_VERSION=2.9.11
|
2006-09-28 12:19:43 +02:00
|
|
|
NBD_SOURCE=nbd-$(NBD_VERSION).tar.bz2
|
2006-11-17 16:43:51 +01:00
|
|
|
NBD_CAT:=$(BZCAT)
|
2006-09-28 12:19:43 +02:00
|
|
|
NBD_SITE=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/nbd/
|
|
|
|
NBD_DIR=$(BUILD_DIR)/nbd-$(NBD_VERSION)
|
|
|
|
|
2009-11-22 21:18:11 +01:00
|
|
|
ifeq ($(BR2_NBD_CLIENT),y)
|
|
|
|
NBD_TARGET_BINARY+= $(TARGET_DIR)/sbin/nbd-client
|
|
|
|
endif
|
|
|
|
ifeq ($(BR2_NBD_SERVER),y)
|
|
|
|
NBD_TARGET_BINARY+= $(TARGET_DIR)/bin/nbd-server
|
|
|
|
endif
|
|
|
|
|
2006-09-28 12:19:43 +02:00
|
|
|
$(DL_DIR)/$(NBD_SOURCE):
|
2009-01-16 12:42:52 +01:00
|
|
|
$(call DOWNLOAD,$(NBD_SITE),$(NBD_SOURCE))
|
2006-09-28 12:19:43 +02:00
|
|
|
|
|
|
|
$(NBD_DIR)/.unpacked: $(DL_DIR)/$(NBD_SOURCE)
|
|
|
|
$(NBD_CAT) $(DL_DIR)/$(NBD_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
|
2008-06-18 17:03:07 +02:00
|
|
|
touch $@
|
2006-09-28 12:19:43 +02:00
|
|
|
|
2009-11-22 21:18:11 +01:00
|
|
|
$(NBD_DIR)/.patched: $(NBD_DIR)/.unpacked
|
|
|
|
toolchain/patch-kernel.sh $(NBD_DIR) package/nbd/ nbd\*.patch
|
|
|
|
touch $@
|
|
|
|
|
|
|
|
$(NBD_DIR)/.configured: $(NBD_DIR)/.patched
|
2006-09-28 12:19:43 +02:00
|
|
|
(cd $(NBD_DIR); rm -rf config.cache; \
|
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
2007-06-27 14:01:27 +02:00
|
|
|
$(TARGET_CONFIGURE_ARGS) \
|
2006-09-28 12:19:43 +02:00
|
|
|
CC=$(TARGET_CC) \
|
2009-10-01 21:24:42 +02:00
|
|
|
./configure $(QUIET) \
|
2006-09-28 12:19:43 +02:00
|
|
|
--target=$(GNU_TARGET_NAME) \
|
|
|
|
--host=$(GNU_TARGET_NAME) \
|
|
|
|
--build=$(GNU_HOST_NAME) \
|
|
|
|
--prefix=/usr \
|
2009-11-22 21:18:11 +01:00
|
|
|
--sysconfdir=/etc \
|
2009-11-22 23:14:45 +01:00
|
|
|
$(if $(BR2_LARGEFILE),--enable-lfs,--disable-lfs) \
|
2007-08-21 21:20:18 +02:00
|
|
|
)
|
2008-06-18 17:03:07 +02:00
|
|
|
touch $@
|
2006-09-28 12:19:43 +02:00
|
|
|
|
|
|
|
$(NBD_DIR)/nbd-client: $(NBD_DIR)/.configured
|
|
|
|
$(MAKE) -C $(NBD_DIR) nbd-client
|
|
|
|
|
|
|
|
$(TARGET_DIR)/sbin/nbd-client: $(NBD_DIR)/nbd-client
|
|
|
|
cp $< $@
|
2007-10-01 18:15:31 +02:00
|
|
|
$(STRIPCMD) $@
|
2006-09-28 12:19:43 +02:00
|
|
|
|
2009-11-22 21:18:11 +01:00
|
|
|
$(NBD_DIR)/nbd-server: $(NBD_DIR)/.configured
|
|
|
|
$(MAKE) -C $(NBD_DIR) nbd-server
|
|
|
|
|
|
|
|
$(TARGET_DIR)/bin/nbd-server: $(NBD_DIR)/nbd-server
|
|
|
|
cp $< $@
|
|
|
|
$(STRIPCMD) $@
|
|
|
|
|
|
|
|
nbd: libglib2 $(NBD_TARGET_BINARY)
|
2006-09-28 12:19:43 +02:00
|
|
|
|
|
|
|
nbd-source: $(DL_DIR)/$(NBD_SOURCE)
|
|
|
|
|
|
|
|
nbd-clean:
|
2009-11-22 21:18:11 +01:00
|
|
|
rm -f $(NBD_TARGET_BINARY)
|
2008-03-27 16:42:42 +01:00
|
|
|
-$(MAKE) -C $(NBD_DIR) clean
|
2006-09-28 12:19:43 +02:00
|
|
|
|
|
|
|
nbd-dirclean:
|
|
|
|
rm -rf $(NBD_DIR)
|
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# Toplevel Makefile options
|
|
|
|
#
|
|
|
|
#############################################################
|
2008-12-08 09:15:27 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_NBD),y)
|
2006-09-28 12:19:43 +02:00
|
|
|
TARGETS+=nbd
|
|
|
|
endif
|