aboutsummaryrefslogtreecommitdiffstats
path: root/package/fbv/fbv.mk
blob: 8b4d296f8ce30052d48cfb284748259386080d3e (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
#############################################################
#
# fbv
#
#############################################################
FBV_VERSION:=1.0b
FBV_SOURCE:=fbv-$(FBV_VERSION).tar.gz
FBV_SITE:=http://s-tech.elsat.net.pl/fbv
FBV_DIR:=$(BUILD_DIR)/fbv-$(FBV_VERSION)
FBV_CAT:=$(ZCAT)
FBV_BINARY:=fbv
FBV_TARGET_BINARY:=usr/bin/$(FBV_BINARY)

$(DL_DIR)/$(FBV_SOURCE):
	$(call DOWNLOAD,$(FBV_SITE),$(FBV_SOURCE))

fbv-source: $(DL_DIR)/$(FBV_SOURCE)

$(FBV_DIR)/.unpacked: $(DL_DIR)/$(FBV_SOURCE)
	$(FBV_CAT) $(DL_DIR)/$(FBV_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
	toolchain/patch-kernel.sh $(FBV_DIR) package/fbv/ \
		fbv-$(FBV_VERSION)\*.patch fbv-$(FBV_VERSION)\*.patch.$(ARCH)
	touch $@

$(FBV_DIR)/.configured: $(FBV_DIR)/.unpacked
	(cd $(FBV_DIR); rm -f config.cache; \
		$(TARGET_CONFIGURE_OPTS) \
		$(TARGET_CONFIGURE_ARGS) \
		./configure \
		--prefix=/usr \
		--libs="-lz -lm" \
	)
	touch $@

$(FBV_DIR)/$(FBV_BINARY): $(FBV_DIR)/.configured
	$(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(FBV_DIR)

$(TARGET_DIR)/$(FBV_TARGET_BINARY): $(FBV_DIR)/$(FBV_BINARY)
	install -D $(FBV_DIR)/$(FBV_BINARY) $(TARGET_DIR)/$(FBV_TARGET_BINARY)

fbv: uclibc libpng jpeg libungif $(TARGET_DIR)/$(FBV_TARGET_BINARY)

fbv-clean:
	rm -f $(TARGET_DIR)/$(FBV_TARGET_BINARY)
	-$(MAKE) -C $(FBV_DIR) clean

fbv-dirclean:
	rm -rf $(FBV_DIR)
#############################################################
#
# Toplevel Makefile options
#
#############################################################
ifeq ($(BR2_PACKAGE_FBV),y)
TARGETS+=fbv
endif