pass ARCH down to uClibc
[buildroot.git] / package / bsdiff / bsdiff.mk
blob731d81d4994ceee87979be26565f4393321c0c1e
1 #############################################################
3 # bsdiff
5 #############################################################
6 BSDIFF_VERSION:=4.3
7 BSDIFF_SOURCE:=bsdiff-$(BSDIFF_VERSION).tar.gz
8 BSDIFF_SITE:=http://www.daemonology.net/bsdiff
9 BSDIFF_DIR:=$(BUILD_DIR)/bsdiff-$(BSDIFF_VERSION)
10 BSDIFF_BINARY:=bsdiff
11 BSDIFF_TARGET_BINARY:=usr/bin/bsdiff
12 BSDIFF_ZCAT=$(ZCAT)
14 $(DL_DIR)/$(BSDIFF_SOURCE):
15 $(WGET) -P $(DL_DIR) $(BSDIFF_SITE)/$(BSDIFF_SOURCE)
17 $(BSDIFF_DIR)/.source: $(DL_DIR)/$(BSDIFF_SOURCE)
18 $(BSDIFF_ZCAT) $(DL_DIR)/$(BSDIFF_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
19 touch $(BSDIFF_DIR)/.source
21 $(BSDIFF_DIR)/$(BSDIFF_BINARY): $(BSDIFF_DIR)/.source
22 (cd $(BSDIFF_DIR); \
23 $(TARGET_CONFIGURE_ARGS) \
24 $(TARGET_CONFIGURE_OPTS) \
25 $(TARGET_CC) -L $(STAGING_DIR)/lib -lbz2 \
26 $(TARGET_CFLAGS) bsdiff.c -o bsdiff; \
27 $(TARGET_CONFIGURE_OPTS) \
28 $(TARGET_CC) -L $(STAGING_DIR)/lib -lbz2 \
29 $(TARGET_CFLAGS) bspatch.c -o bspatch; \
32 $(TARGET_DIR)/$(BSDIFF_TARGET_BINARY): $(BSDIFF_DIR)/$(BSDIFF_BINARY)
33 cp -dpf $(BSDIFF_DIR)/bsdiff $(TARGET_DIR)/usr/bin/.
34 cp -dpf $(BSDIFF_DIR)/bspatch $(TARGET_DIR)/usr/bin/.
36 bsdiff: bzip2 $(TARGET_DIR)/$(BSDIFF_TARGET_BINARY)
38 bsdiff-source: $(DL_DIR)/$(BSDIFF_SOURCE)
40 bsdiff-clean:
41 -rm $(TARGET_DIR)/usr/bin/{bsdiff,bspatch}
42 -rm $(BSDIFF_DIR)/{bsdiff,bspatch}
44 bsdiff-dirclean:
45 rm -rf $(BSDIFF_DIR)
47 #############################################################
49 # Toplevel Makefile options
51 #############################################################
52 ifeq ($(BR2_PACKAGE_BSDIFF),y)
53 TARGETS+=bsdiff
54 endif