summaryrefslogtreecommitdiff
path: root/package/wipe/wipe.mk
blob: db06c53aa335105b702210b546afa211820f3a6c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#############################################################
#
# wipe
#
# http://abaababa.ouvaton.org/wipe/wipe-0.20.tar.gz
#############################################################
WIPE_SOURCE:=wipe-0.20.tar.gz
#WIPE_PATCH:=wipe_0.2-19.diff.gz
WIPE_SITE:=http://abaababa.ouvaton.org/wipe
WIPE_CAT:=zcat
WIPE_DIR:=$(BUILD_DIR)/wipe-0.20
WIPE_BINARY:=wipe
WIPE_TARGET_BINARY:=bin/wipe

$(DL_DIR)/$(WIPE_SOURCE):
	 $(WGET) -P $(DL_DIR) $(WIPE_SITE)/$(WIPE_SOURCE)

$(DL_DIR)/$(WIPE_PATCH):
	 $(WGET) -P $(DL_DIR) $(WIPE_SITE)/$(WIPE_PATCH)

wipe-source: $(DL_DIR)/$(WIPE_SOURCE) $(DL_DIR)/$(WIPE_PATCH)

$(WIPE_DIR)/.unpacked: $(DL_DIR)/$(WIPE_SOURCE) $(DL_DIR)/$(WIPE_PATCH)
	$(WIPE_CAT) $(DL_DIR)/$(WIPE_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
	toolchain/patch-kernel.sh $(WIPE_DIR) $(DL_DIR) $(WIPE_PATCH)
	touch $(WIPE_DIR)/.unpacked

$(WIPE_DIR)/.configured: $(WIPE_DIR)/.unpacked
	(cd $(WIPE_DIR); rm -rf config.cache; \
		$(TARGET_CONFIGURE_OPTS) \
		CFLAGS="$(TARGET_CFLAGS)" \
		./configure \
		--target=$(GNU_TARGET_NAME) \
		--host=$(GNU_TARGET_NAME) \
		--build=$(GNU_HOST_NAME) \
		--prefix=/usr \
		--exec-prefix=/usr \
		$(DISABLE_NLS) \
	);
	touch  $(WIPE_DIR)/.configured

$(WIPE_DIR)/$(WIPE_BINARY): $(WIPE_DIR)/.configured
	$(MAKE) CC=$(TARGET_CC) -C $(WIPE_DIR)

$(TARGET_DIR)/$(WIPE_TARGET_BINARY): $(WIPE_DIR)/$(WIPE_BINARY)
	cp -a $(WIPE_DIR)/$(WIPE_BINARY) $(TARGET_DIR)/$(WIPE_TARGET_BINARY)

wipe: uclibc $(TARGET_DIR)/$(WIPE_TARGET_BINARY)

wipe-clean:
	$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(WIPE_DIR) uninstall
	-$(MAKE) -C $(WIPE_DIR) clean

wipe-dirclean:
	rm -rf $(WIPE_DIR)

#############################################################
#
# Toplevel Makefile options
#
#############################################################
ifeq ($(strip $(BR2_PACKAGE_WIPE)),y)
TARGETS+=wipe
endif