summaryrefslogtreecommitdiff
path: root/package/fconfig/fconfig.mk
blob: 72f6c4a8db86dcc84e4503e00ea1d4bc3db45671 (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
#############################################################
#
# fconfig
#
#############################################################
FCONFIG_VERSION:=20060419
FCONFIG_SOURCE:=fconfig-$(FCONFIG_VERSION).tar.gz
FCONFIG_SITE:=http://andrzejekiert.ovh.org/software/fconfig/
FCONFIG_CAT:=$(ZCAT)
FCONFIG_DIR:=$(BUILD_DIR)/fconfig
FCONFIG_BINARY:=fconfig
FCONFIG_TARGET_BINARY:=sbin/fconfig

$(DL_DIR)/$(FCONFIG_SOURCE):
	 $(call DOWNLOAD,$(FCONFIG_SITE),$(FCONFIG_SOURCE))

fconfig-source: $(DL_DIR)/$(FCONFIG_SOURCE)

$(FCONFIG_DIR)/.unpacked: $(DL_DIR)/$(FCONFIG_SOURCE)
	$(FCONFIG_CAT) $(DL_DIR)/$(FCONFIG_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
	toolchain/patch-kernel.sh $(FCONFIG_DIR) package/fconfig \*.patch
	touch $@

$(FCONFIG_DIR)/$(FCONFIG_BINARY): $(FCONFIG_DIR)/.unpacked
	$(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(FCONFIG_DIR) \
		CFLAGS="$(TARGET_CFLAGS)" \
		LDFLAGS="$(TARGET_LDFLAGS)"

$(TARGET_DIR)/$(FCONFIG_TARGET_BINARY): $(FCONFIG_DIR)/$(FCONFIG_BINARY)
	rm -f $(TARGET_DIR)/$(FCONFIG_TARGET_BINARY)
	$(INSTALL) -D -m 0755 $(FCONFIG_DIR)/$(FCONFIG_BINARY) $(TARGET_DIR)/$(FCONFIG_TARGET_BINARY)
	$(STRIPCMD) $(STRIP_STRIP_ALL) $@

fconfig: $(TARGET_DIR)/$(FCONFIG_TARGET_BINARY)

fconfig-clean:
	-$(MAKE) -C $(FCONFIG_DIR) clean
	rm -f $(TARGET_DIR)/$(FCONFIG_TARGET_BINARY)

fconfig-dirclean:
	rm -rf $(FCONFIG_DIR)

#############################################################
#
# Toplevel Makefile options
#
#############################################################
ifeq ($(BR2_PACKAGE_FCONFIG),y)
TARGETS+=fconfig
endif